Heading into 2018, Republicans in Congress are unloved and endangered. Their continued control over the House and Senate after the November midterm elections appears precarious – and that spells trouble for President Trump.

Democrats hold a commanding 13-point lead over the GOP in the generic congressional ballot, according to Real Clear Politics average of multiple polls. And the Real Clear Politics average of polls on presidential job performance found only 39 percent of Americans approve of the job President Trump is doing.

Senate Majority Leader Mitch McConnell, R-Ky., has reportedly privately acknowledged that come January 2019 it looks like Sen. Chuck Schumer of New York and Rep. Nancy Pelosi of California – now leaders of the Democratic minority in each legislative chamber – could be running the show, with both chambers controlled by their party.

But looking at the map and that calendar, a Democratic takeover of the House and Senate is not inevitable.

In the Senate, Democrats are defending 25 seats, including 10 in states that President Trump carried in 2016. Five of those states favored Trump by double digits.

Sounds good for the GOP, right? Not exactly.

After the Republicans’ recent loss in an Alabama special election, the Senate will have 51 Republicans and 49 Democrats starting next month. That means Democrats will have to pick up just two more seats in November to seize control of the Senate. Republican seats in Arizona, Nevada and Tennessee are most definitely in play.

As for the House, Speaker Paul Ryan, R-Wis., has good reason to worry. Going back in time, the Republicans recaptured the House majority in 2010 after showing little more than a 9-point lead on the generic ballot in pre-election polls.

Democrats wrested the speaker’s gavel in 2006 from Rep. John Boehner, R-Ohio, with an 11.5 percent margin in pre-election polling. At the same time, however, in 2006 the Democrats did not emerge with a commanding lead on the generic ballot until September, while in 2010 the Democrats were consistently ahead through June.

In other words, there are plenty of reasons for Republicans to be scared, but it is way too soon for despair. The situation is remediable. It is time for the GOP to breathe deep and think.

Still, some of the problems that haunted the GOP in Alabama aren’t going away – even if alleged pedophile Roy Moore isn’t on the ballot. So here are some early New Year’s resolutions that Republicans in Congress should make.

For starters, stop talking about stupid stuff that stands to harm the Republican base, like cutting Social Security and Medicare – especially you, Speaker Ryan. Fortunately, Sen. McConnell has finally figured this one out.

In his pre-Christmas news conference, McConnell took entitlement cuts off the table. As New York Magazine headlined: “McConnell Says No to Ryan’s Dream of Cutting Entitlements in 2018.”

McConnell said: "I think entitlement changes, to be sustained, almost always have to be bipartisan.… The House may have a different agenda. If our Democratic friends in the Senate want to join us to tackle any kind of entitlement reform, I'd be happy to take a look at it.”

Translation: Senate Republicans are not prepared to jump off a cliff without the Democrats holding their hands, and if the far-right Republicans in the House Freedom Caucus are suicidal and Ryan is hopelessly ideological … well, it’s their problem.

Next, don’t nominate crazies or candidates who offend women. Sure, venting your collective spleen may be fun, but so is knocking back a pint of Jack Daniels in a single sitting and then doing 110 miles per hour on the highway. It never ends well.

For the record, women made the difference in the special election for a Senate seat in Alabama earlier this month. Democrat Doug Jones won the women’s vote by 16 points, which was particularly helpful given that women constituted the majority of voters.

As for crazy, Republican history offers a cornucopia of cautionary tales. In 2010, Christine O'Donnell, the Delaware Republican U.S. Senate nominee, told the state’s voters: “I’m not a witch.”

Four years later, Missouri Republican Senate candidate Todd Akin, delivered what we would today call fake news about the female reproductive system, saying that abortions wouldn’t be necessary for rape victims because “if it’s legitimate rape, the female body has ways to try to shut the whole thing down.”

My final advice to Republicans is to embrace the positive news about the economy. The unemployment rate is at a 17-year low, the stock market is at an all-time high and the economy is humming. These are all good things. As for the tax cuts, your task isn’t easy.

The public doesn’t like the new tax cuts. And over the weekend, President Trump fessed up to making his rich friends richer. Lots of synonyms for deception come to mind.

But that’s life. It your job to turn lemons into lemonade and tie the boom to the cuts. Bottom line, if you can sidestep missteps, smile enough, and stay off Twitter, you may yet still be Kings of the Hill in 2019. Just maybe.