Greg Gianforte’s 7 percentage point win in the Montana special election keeps a seat in Republican hands but fundamentally represents bad news for the GOP. The basic issue, as David Wasserman breaks down for the Cook Political Report, is that for prognostication purposes you don’t only want to know who wins or loses a special election — you want to know the margin.

Montana is considerably redder than the average congressional district. According to Wasserman’s calculations, in an election where Democrats got 50 percent of the two-party vote nationwide, you’d expect them to get just 39 percent in Montana. Quist scored 44 percent, and with the Libertarian pulling in 6 percent, his share of the two-party vote is more like 46.

Things aren’t as simple as saying that Rob Quist outperformed the 39 percent benchmark and therefore Democrats are on track to win — geography means Republicans can hold their majority with less than 50 percent of the vote. But the GOP underperformed badly in Montana, after a similar underperformance in the special election for Kansas’s Fourth Congressional District.

There are 120 Republican-held House seats that are more GOP-friendly than Montana’s at-large district. If Republicans are winning in places like Montana by just 7 percentage points, then they are in extreme peril of losing their House majority in November 2018.

Republican leaders have taken their party on a risky course, and they ought to strongly consider turning the ship around.

Republicans are counting on geography to win

The GOP’s House majority is safeguarded, first and foremost, by geography. Donald Trump lost the popular vote nationally by 2.1 percentage points but won the median House seat by 3.4 points. Or to look at it another way, despite garnering fewer votes than Clinton overall, Trump carried a plurality of the vote in 230 congressional seats against just 205 for Clinton.

A somewhat pointless debate tends to play out among operatives and political handicappers over how much we should characterize this geographical skew as a question of “gerrymandering” versus the allegedly natural “clustering” of Democratic voters in big cities. The reality is that whatever you call it, the lines are drawn in such a way that Republicans could easily hold the majority even if millions more people vote for Democratic candidates.

And that’s lucky for them. With Trump’s approval rating 15 points underwater, the policy agenda dominated by a deeply unpopular health care bill, and a steady drip of stories about Trump’s connections to Russia, the basic ingredients are in place for Republicans to take a drubbing.

Under the circumstances, the knowledge that geography has created safe redoubts that are significantly more Republican than the nation as a whole is what gives the GOP confidence that it can forge ahead with this path. To win by only 7 in Montana, a state that Trump won by 20 points, is a clear sign that seats Trump won by 4 or 5 points or more aren’t truly safe.

Out-of-power parties can localize cultural cues

The precise dynamics of the Quist-Gianforte race obviously aren’t going to play out in other districts. Nor is there particularly any need for them to when they are dozens of good pickup opportunities for Democrats in diverse Sunbelt suburbs.

But the Montana race demonstrates an important principle that does apply across the board — when your party doesn't control the White House, it’s relatively easy for candidates to customize their cultural self-presentation to local conditions. Quist’s policy positions are fundamentally not all that distinct from what Barack Obama or Hillary Clinton offered — a bit more left-wing on health care and a bit more right-wing on guns and energy issue — but his personality is very different. He’s a banjo-playing folk singer who’s all Montana and castigated his opponent as essentially a plutocratic carpetbagger from New Jersey.

You wouldn’t want to repeat that exact formula in districts across the country, but the ability to run a banjo player in banjo country and a 30-year-old documentary producer with a master’s degree from the London School of Economics in the suburbs of Atlanta is a powerful tool. Against it, the only thing the in-power party can hope for is a broadly popular incumbent president. And Republicans don’t have it.

The GOP should consider changing course

Right up until the morning of Election Day 2016, Washington Republicans were profoundly skeptical of Donald Trump. They saw him as unpopular, undisciplined, and unlikely to be an effective candidate or an effective president. Many Republicans in Congress even said they would refuse to vote for him.

When Trump unexpectedly won, that assessment pivoted rapidly even though he pulled it off with an underwhelming 46 percent of the vote against a candidate who herself had unusually weak approval numbers. Republicans lined up, in lockstep, around the propositions that there was no need for an independent inquiry into Russian hacking, no need for serious congressional oversight of Trump’s business conflicts of interest, and no need to push back against Trump’s affection for thinly qualified Cabinet nominees.

And yet everything that’s happened since Election Day only confirms those old doubts. Trump is unpopular, undisciplined, unskilled, and ineffective. His shtick plays well in some areas but not others, and with adequate recruiting Democrats can neutralize the aspects of his shtick that people find appealing. And rather than devise some exciting new way to turn the GOP into a populist tribune of working-class economic interests, he’s simply taken up the business-first policy agenda of Mitt Romney while stripping it of the veneer of businesslike competence and respectability.

The good news for Republicans is that the midterms are still a long way off. But unless they put that time to use by changing something about their current approach, they’re positioning themselves to reap the whirlwind.