WASHINGTON — Days after Democrats won back the House, Massachusetts Sen. Elizabeth Warren stood confidently before Democratic activists and pitched a half-trillion-dollar plan — reminiscent of the New Deal — to build millions of homes in low-income neighborhoods.

The expected 2020 presidential hopeful vowed to pay for it all with a new estate tax on America’s wealthy families.

“Who is government supposed to work for?” she asked. “Is it supposed to work for the 10,000 richest families or is it supposed to work for the rest of America? We are a democracy. There are a whole lot more of us than there are of them.”

There was just one hitch. Such costly progressive policy proposals were not the winning formula for most Democrats in the midterm.

In the purple and red districts where Democrats picked up new seats, many of the candidates who won avoided talking about Medicare for all, free college tuition, abolishing the immigration enforcement agency and Warren’s plan to subsidize 3.2 million new homes. Instead they typically focused on more moderate themes, such as promising to protect Obamacare.

Yet little about the way Democrats are positioning for the upcoming presidential primary reflects that formula. The candidates are already looking to outdo one another with proposals to upend the economic and social order.

“A lot of the candidates who won in the midterms avoided making extravagant promises,” said Will Marshall, president of the centrist Progressive Policy Institute. “We saw in this election that voters are looking for changes. But there was nothing about it that would support the conclusion that there is a big public appetite for a statist agenda or a massive redistribution of wealth. At least not in the areas where Democrats made inroads.”

Marshall and other centrists in the party note that the swing-state Democrats who most prominently identified with the left wing of the party fell short.

Andrew Gillum narrowly lost the governor’s race in Florida, robbing progressives of an opportunity to demonstrate that their agenda can win in the fractured political regions most crucial for Democrats to take back. In Texas, Rep. Beto O’Rourke’s $69-million campaign, with all the energy and enthusiasm it sparked, ultimately failed to unseat Sen. Ted Cruz.

One notable exception was Ohio Sen. Sherrod Brown, a progressive and unyielding champion of organized labor who won reelection in one of the toughest states for Democrats. But he focused his message not on ambitious new programs and entitlements, but on the value of work and the erosion of opportunities for voters willing to put in a 40-hour workweek to earn a secure middle-class living.

It’s a familiar and predictable postelection debate, with business-backed center-left groups such as the Progressive Policy Institute and the think tank Third Way clashing with activist flanks of the Democratic Party.

In many ways, presidential candidates have little choice but to embrace the more progressive messages because that’s increasingly what is needed to win the party’s nomination, as seen by Hillary Clinton’s struggle in 2016 against progressive firebrand Sen. Bernie Sanders of Vermont.

The stakes are even higher at a time the national party is so adrift, with no clear leader, no clear vision for the future, and a presidential primary that is more up for grabs than any in recent history.

“Politics is complicated and every district is different; I am not going to deny that,” Sanders said.

Even as he points to polls showing the idea of Medicare for all is popular with voters, he acknowledges that many of the Democrats who flipped House seats in the party’s favor didn’t crusade on it, saying, “In some districts, a set of policies will work better than others.”

But he uniformly rejected the prospect that making it a campaign centerpiece for Democrats in 2020 could cost them the suburban Republicans and independents who propelled the midterm victory. He said O’Rourke and Gillum lured masses of new voters to the polls, expanding the base for Democrats in a way centrist candidates could not, which played a crucial role in the many GOP House seats that flipped to blue in Florida and Texas this year.

“The establishment is fighting hard, telling us we have to go back to the good old days when Republicans captured the House and Senate, not to mention the White House, and Democrats lost 1,100 state legislative seats,” Sanders said. “Look at the polling. Seventy percent of the American people believe in Medicare for all. Why wouldn’t we move forward?”

The idea does poll well. The details, not always. The nonprofit Kaiser Family Foundation probed deeper into public attitudes last year. Its survey found broad support for the general concept of Medicare for all, but the support plunged as voters were presented with descriptions and opposition arguments stressing the huge price tag and the expanded role government would have in managing the healthcare system.

Sanders argues that it will be easy for Democrats to win on the issue because the bottom line is that less money will come out of Americans’ pockets to pay for healthcare.

But some of the candidates who emphasized Medicare for all in the midterm found articulating the details a challenge. That became a potent weapon for GOP attacks, which warned voters they would have to give up their employer-provided health coverage for a government plan.

“This issue is just a complete dead weight for Democrats,” said Lanae Erickson Hatalsky, vice president for social policy and politics at Third Way. “It is why only two of the 92 House candidates running in red districts targeted by Democrats ran ads touting it.”

On Capitol Hill, a proxy war has broken out as Third Way presents Democratic lawmakers — especially potential presidential candidates — with polling and other data suggesting moderation won out in the midterm.

The million-member Progressive Change Campaign Committee, which brands itself the “Elizabeth Warren wing of American politics,” is circulating its own white paper that accuses Third Way of distorting the facts to serve the interest of the think tank’s Wall Street donors.

The committee plowed through reams of campaign material published by midterm candidates to produce a spreadsheet showing the overwhelming majority of them pledged support for ideas such as Medicare for all, even if they didn’t make such themes centerpieces of their general election campaign.

“It is inarguable that the people who won homed in on pro-working people, economic populist issues,” said Adam Green, co-founder of the committee. “So many of the candidates who won got attacked by [House Speaker] Paul D. Ryan’s super PAC, with millions of dollars in ads saying they believed in Medicare for all. They won anyway.”

In this frenzied moment in Democratic politics, some potential presidential candidates are claimed by both the left and the center of the party. Brown’s emphasis on work and opportunity while still embracing some of the programs championed by activists has some prominent Democrats from across the ideological spectrum encouraging him to mount a White House run. He’s considering it.

But if he goes that route, he probably won’t be leading with Medicare for all. “Medicare for all is a down-the-road question for a different day,” Brown said in an interview. He said Democrats should be running on a theme that emphasizes work and opportunity.

That could prove a hard sell to a restive base, which still holds that Democrats lost the last presidential election because their candidate failed to offer a bold, new vision and embrace game-changing ideas.

California billionaire donor and activist Tom Steyer, who launched the political organization Need to Impeach and is himself considering a White House run, says that “people are begging for … a compelling vision for what should happen and how to get there.”

His network of nonprofits helped inspire millions of disaffected voters to go to the polls for Democrats by talking with them not just about impeachment, but also promoting progressive ideas like Medicare for all.

“American politics is failing,” he said, “except where people are actually willing to tell the truth about what is going on on the ground.”