Control of Virginia’s House and Senate will be up for grabs in 2019. (Matt McClain/The Washington Post)

— The math in state Sen. Glen H. Sturtevant Jr.’s suburban district is looking a little uncomfortable for Republicans like him.

Sen. Tim Kaine (D) carried his once solidly GOP district with 60 percent of the vote earlier this month. And Democrat Ralph Northam won the district with 57 percent in last year’s race for governor.

So Sturtevant, who is seeking a second term in state elections next year, is doing something a little unusual for a Republican. He’s backing the Equal Rights Amendment, working to make Virginia the 38th state to ratify it.

That would enshrine a ban on sex discrimination in the U.S. Constitution — a goal more typically championed by Democrats.

“It’s something that’s a fundamentally American value, that we treat every single American fairly and equally before the law,” Sturtevant said.

Although he has backed the ERA in the past, Sturtevant is taking a more prominent role this time around, sponsoring the Senate bill and participating in a recent bus tour to draw attention to the cause.

Playing up issues that appeal to suburban voters — and women in particular — is one way Virginia Republicans hope to snap the losing streak they’ve endured in the suburbs since President Trump took office.

Republicans first felt the wrath of suburban swing voters in 2017. Their 2-to-1 majority in the House of Delegates all but evaporated as Democrats picked up 15 seats and swept statewide offices for governor, lieutenant governor and attorney general.

This year’s midterm elections signaled continued peril for Republicans, who are trying to hang on to their two-seat majorities in the state House and Senate. Voters in once reliably red suburbs outside Richmond, Washington and Hampton Roads flipped three congressional seats from Republican to Democratic and helped Kaine handily defeat his GOP challenger, Corey Stewart.

Kaine won in seven Virginia Senate districts and 12 House of Delegates districts held by Republicans.

If every district voted the same way next year, Democrats would have advantages of 61-39 in the House and 26-14 in the Senate.

Republicans hope they can head that off by recruiting a more diverse slate of candidates, focusing on practical issues and getting an early start on their ground game. Some strategists predict softening on certain social issues, such as gay rights.

“It’s adapt or die,” said one GOP strategist, who spoke on the condition of anonymity to frankly discuss the party’s prospects. All 100 seats in the House and all 40 in the Senate, which last faced voters in 2015, will be on the ballot next year.

Adding to the angst: It is not yet clear what the House map will look like. A federal district court found that 11 districts in Hampton Roads and greater Richmond were racially gerrymandered and has appointed a “special master” to draw new boundaries that will also affect adjacent districts. But the U.S. Supreme Court agreed this month to hear an appeal filed by Republican legislators defending the existing map.

Even if they get to keep their map, Republicans expect a challenge in the suburbs as long as Trump is in the White House.

But some expressed hope that next year’s legislative races will be harder for Democrats to nationalize than the midterms and governor’s race, during which Northam famously called Trump a “narcissistic maniac.”

“Clearly there will still be those on the Democratic side that will have their issues with the president, but a lot of those issues that play out in Washington really don’t matter in Culpeper,” said Jack Wilson, who took over as chairman of the Republican Party of Virginia in September.

Many of the Republicans whose districts flipped for Kaine are moderates, simply because that’s the type of Republican suburbanites have tended to support in the past. Those moderates say they can weather the storm because they have always been focused on “kitchen table” issues.

That’s the case for two Virginia Beach Republicans — Sen. Frank W. Wagner and Del. Glenn R. Davis Jr. — who broke with a majority of their party to pass Medicaid expansion earlier this year. Both said their pragmatic records will help them next year even though Kaine won handily in their area.

But former delegate G. Manoli Loupassi (Richmond) was not so lucky. A moderate who in 2013 led the effort to appoint the state’s first openly gay judge, Loupassi lost his seat in the 2017 wave. He said discussions about policy have gotten lost in the tribal political climate.

There are some hard-right legislators from the suburbs, including Sen. Richard H. Black (R-Loudoun), who represents a district where 58 percent of voters chose Kaine earlier this year. Four Democrats have already lined up to challenge Black, known for his vocal opposition to abortion and gay rights and support for Syrian President Bashar al-Assad. Some Republicans say privately their only hope of holding the seat would be for a moderate Republican to be the nominee, although no candidate has declared. In any case, Black has no plan to rebrand himself.

“I have never really been a politician,” he said. “I kind of do what I do.”

Some suburban moderates face challenges from the left and right, as is the case with Del. Bob Thomas (R-Stafford), a freshman who eked out a win last year after a recount. He voted to expand Medicaid and instantly drew a primary challenger. As he tries to fend him off, Thomas must also contend with the continued blue slide of the district, where Rep. Rob Wittman (R) struggled this year even as he cruised to an 11-point win in the 1st Congressional District overall.

Thomas is one of two Republican House members who already has a campaign manager. The other is Del. David E. Yancey (Newport News), who last year won reelection after he tied with Democratic challenger Shelly Simonds and the race was decided by a random drawing.

Thomas has kept up a brisk schedule of public appearances — 175 since the General Assembly session concluded early this year. “I had four events on Saturday alone,” Thomas said. “I’ve been just working my butt off. That’s what I was hired to do.”

He said he thinks voters will support him because he tends to focus on issues that make a difference in daily life. One of his bills that became law gives local and state officials the option to use drones to help analyze highway accidents, something he said can slash the time needed to clear a major crash scene.

Robert F. McDonnell, the last Republican to win statewide office when he was elected governor in 2009, played up “kitchen table” issues in his race for that seat as well as an earlier successful bid for attorney general. That helped him shed the culture warrior image he had acquired as a state delegate.

Over the past year, Virginia House Speaker Kirk Cox (R-Colonial Heights) has pursued a McDonnell-like strategy under the banner “practical solutions for everyday problems.” One of his first acts as speaker was to offer generous paid family leave for employees of the chamber. Senate Republicans were following suit about a week ago, as they rolled out a package of bills intended to lower the cost of health insurance.

The midterm results in particular may overstate the forces working against the GOP in legislative races for a number of reasons, including the singular unpopularity of Stewart, a Trump-style provocateur who attacked the Republican establishment and Democrats and was dogged by past associations with white nationalists.

Stewart dragged down the rest of the ticket and probably suppressed his party’s turnout, said Quentin Kidd, a political scientist at Christopher Newport University in Newport News. The effect might have been magnified in a place like Hampton Roads, which is represented in the legislature by Republicans Christopher P. Stolle and Davis but where Kaine and Democratic congressional candidate Elaine Luria won in November.

In that area, Republican enthusiasm was dimmed not just by Stewart, but also a scandal surrounding incumbent U.S. Rep. Scott W. Taylor over forged petition signatures, Kidd said. Those factors won’t be in play next year.

What’s more, he said, races for the state legislature involve candidates who have deep familiarity with many voters. Stolle, for instance, is part of a Virginia Beach political dynasty — one brother is sheriff, and another is the local prosecutor.

“I’m not convinced that just because you’re a Luria voter this year, and you really despise Trump, you are going to vote Chris Stolle out of office,” Kidd said.

Even Democrats concede the 2017 wins are no guarantee of success a year from now

“Unfortunately, we’re not going to be able to run against Corey Stewart in 2019, so it would be naive to think these are all folks who are permanent Democrats now,” said Del. Marcus B. Simon (D-Fairfax). “We’re going to have to work for those voters to hold on to them.”

Wilson, the state GOP party chair, said Republicans need to focus on voter registration, as Barack Obama’s first presidential campaign did to great effect in 2008. He also said activists in more conservative parts of the state need to stop attacking suburban Republicans who break with party orthodoxy on issues — from Medicaid expansion to taxes to the ERA.

“What I’m trying to communicate to party activists is, you can’t be sitting out in southwest Virginia or Roanoke and going on social media ripping Glen Sturtevant for what he’s doing in his district,” Wilson said. “You have to allow elected officials in suburban areas the latitude to represent their areas.”