Republicans suffered a serious defeat in the Pennsylvania special election Tuesday night.

While the results aren’t 100 percent official yet, it looks like Democrat Conor Lamb will walk away with an upset in the deep red district.

The tentative results are prompting a round of media predictions that 2018 is going to be a massive blue wave and that the special election was a referendum on Trump.

But that prognosis puts way too much of the blame on Trump and overlooks how Lamb managed to win a solid Republican district. The Democrat didn’t base his campaign around Trump as he remained rather muted on the subject of the president. In fact, Lamb struck a conservative-populist tone in his campaign.

He supported Trump’s plan to place tariffs on steel and aluminum imports — a smart decision in the working-class region. He released an ad showing him firing off an AR-15 and is hesitant to support further gun restrictions. He vowed to not vote for Nancy Pelosi as the House Democratic leader. He also stayed largely silent on immigration and even avoided reporters who wanted his comments on the subject.

Combined with his youthful charisma and service in the Marine Corps, Lamb made for the perfect candidate to run in a deep-red district. But while appearing to be a conservative, he was actually progressive on most issues.

Even though House Speaker Paul Ryan claimed Lamb was pro-life, the Democrat is definitely pro-choice. He stated that legalized abortion is the law of the land and opposed 20-week abortion bans — something that a strong majority of Americans support.

While he delivered the cliche “I’m personally opposed to abortion” line like many Catholic Democrats, that personal opposition showed no influence on his policy positions. Lamb was smart enough to not make his stance on abortion a major part of the campaign.

The same with immigration. While trying to avoid the topic, Lamb was on record in support of granting amnesty to all illegal immigrants in the United States — a position in keeping with the Democratic mainstream.

All it took for him was to appear conservative on social issues and stick to economic populism to win his Republican district.

This is a marked contrast from the liberal heart-throb running for Senate in Texas. Like Lamb, Beto O’Rourke is young and charismatic. Unlike Lamb, no one will ever confuse O’Rourke for having conservative positions.

The man running to defeat Ted Cruz is open about his progressive stances. O’Rourke is very vocal in his support of gun control. He’s very pro-abortion and doesn’t hide his stance. He’s hoping to make liberal immigration policies a major part of his campaign.

O’Rourke also relishes the opportunity to attack Trump and has no problem making the Senate race a referendum on the president — a strategy that Lamb astutely avoided.

The Texas Democrat’s style is that of an upwardly-mobile white liberal: someone who would have a hard time relating with a rural gun owner. Conor Lamb didn’t struggle with that.

This all seems like a bad campaign strategy for a Democrat in Texas, but that hasn’t convinced the press to stop fawning over O’Rourke. The media did the same thing for liberal Wendy Davis when she was clobbered in the 2014 Texas gubernatorial race.

Even though Trump won Texas pretty easily, O’Rourke is making no effort to appeal to his voters. That doesn’t matter to his adoring fans in the press, but it will matter come November.

But O’Rourke is certainly not alone in this lack of concern for Trump voters

Hillary Clinton managed to grab headlines this week by voicing her contempt for middle Americans as backward, racist, sexist leeches who are bringing down the vibrant, economically prosperous parts of our country.

Condemned by most commentators as bad form, Clinton’s comments expressed a view that many liberals and Democrats share, albeit not in the same language: Trump voters don’t deserve Democratic appeals, they should just be defeated and their interests ignored in favor of the party’s preferred demographics.

O’Rourke typifies that view.

Lamb rejected it simply by appearing to understand Trump voters’ cultural concerns and vowing to stand up for their economic interests.

It’s unlikely that the majority of Democrats will follow Lamb’s lead. There are more retweets and CNN appearances waiting for those who appeal exclusively to the Resistance.

Follow Scott on Twitter and buy his book, “No Campus for White Men.”