The 2018 midterm elections, like the 2016 presidential contest, are proving to be far more interesting than conventional wisdom ever suspected. Two years ago, pundits were sure that Trump would lose, right up to the early evening of election day. This year, the conventional wisdom has it that Democrats will take back control of at least the House of Representatives, probably by a landslide, if not the Senate as well.

But two critical polling indicators suggest the GOP’s hand is getting stronger. President Trump’s approval ratings are solidly into the 40s in recent polls, and even hit 50 percent in the most in the Rasmussen survey last week (which, to be sure, has consistently shown better numbers for Trump). This is an improvement on the high-30s to low-40s range polls had pegged the president at throughout his first year in office.

Second, and if anything even more significant, are the “generic ballot” figures for which party Americans prefer to vote for in the November midterms. The Democrats’ lead here has been dwindling, and the RealClearPolitics polling average since late April gives them only a 4-point advantage. In the Reuters-Ipsos poll released last week, the Democrats held a generic ballot lead of just one point. The New York Times’s Nate Cohn wrote in late April, “In recent wave elections, the party out of power has won the House national popular vote by six to eight points.” The way the Democrats’ generic ballot numbers are going, they can’t count on hitting that range.

Then there’s the mixed verdict rendered by recent primary and special elections. Last year was brutal for Republicans, who suffered an electoral bloodbath in Virginia and New Jersey. So far this year, Republican congressmen running for higher office have had a hard time even winning their primaries—Rep. Raul Labrador, for example, a leading figure in the House Freedom Caucus, fell short in his bid for the GOP gubernatorial nod in Idaho, losing to the state’s current lieutenant governor. House Republicans are retiring in significant numbers, including Speaker Paul Ryan. These are ill omens for the House majority.

Democrats, by contrast, are fired up—but what excites the grassroots isn’t what the party leadership is trying to force feed them. This year, as they did last year in Virginia, candidates affiliated with the Democratic Socialists of America are gaining ground. Last week, DSA members beat Democratic incumbents in two Pittsburgh-area party primaries for the Pennsylvania House of Representatives. Throughout the Keystone State, in fact, left-leaning Democrats outmatched center-left opponents. The story was much the same in Democratic primaries from Nebraska to Oregon. The party of Bernie Sanders is beating the party of Chuck Schumer and Nancy Pelosi.

Much was made of Democratic Conor Lamb’s victory over Republican Rick Saccone in the special election for Pennsylvania’s 18th Congressional District in April. But Lamb was precisely the kind of middle-of-the-road Democrat who didn’t win primaries this month. Lamb is the sort who can win what were once called “Reagan Democrats” and now might be considered “Trump nationalists”—economically anxious voters who are proud of their country. The Sanders wing of the Democratic Party wants to appeal to their economic interests, but the Republicans have the advantage of a president who has already ushered in tax cuts, lower unemployment, and tough trade negotiations with tariffs as leverage. The president’s stance against immigration also has an attraction to workers who feel economically and culturally besieged. Left-wing Democrats have only hypothetical economic benefits to offer, and “Medicare for All” has no buy-in with the party’s own elites, beginning with Schumer and Pelosi.

Trump, by winning the GOP presidential nomination two years ago, was in a position to reorient his party on a number of issues over the heads of leaders like Paul Ryan and Mitch McConnell—Trump was not just one more faction in a party split between Ryan’s leadership, the Freedom Caucus, and the centrist Tuesday Group (to name just the major players in the House of Representatives), he was a national figure who could remake the party’s identity for all Americans. The DSA and Sanders Democrats, on the other hand, are just a faction of the Democratic Party, a kind of mirror image to the Freedom Caucus. Left-wing Democrats are culturally out of sync with the old Reagan Democrats and new nationalists, but they’re also a poor fit for centrists who fear that Trump is too right-wing. Different backlashes against Trump—one on the left (or even two on the left, if we count economics and multiculturalism separately) and one in the centre—threaten to cancel one another out, or at least complicate the path back to power in Congress.

Even the bad news for Republicans has a silver lining: Paul Ryan’s retirement sends a signal that Romney-Ryan Republicanism, with its divisive belief in “job creators” versus “the 47 percent,” is dead, and the GOP will now be a party for more than just the wealthy (but them too, certainly). The Trump transformation of the Republican Party is still ongoing, and while that incenses leftists and elite centrists, it appeals to what’s left of the late 20th-century majority base that gave Richard Nixon and Ronald Reagan their landslide re-election victories.

Still, there are clouds on the horizon that Republicans cannot afford to overlook. A reduced House majority is almost certain, and losing control is still more likely than not if history is any guide. Trump’s successes of a few weeks ago in North Korean diplomacy coincided with an uptick in his popularity. The difficulty of keeping negotiations on track, and the risk of getting sidetracked into Middle East intrigues, might make the upswing in approval numbers hard to sustain. The key to the GOP’s midterm survival, and to Trump’s success, is in keeping focused on an America First agenda. It’s a slogan and an idea that the Democrats can’t outflank.