Catharine Baker was the only Republican representing the Bay Area in either the Legislature or Congress, until she lost her re-election bid to the Assembly in November. Now there is none.

The two-term incumbent practically ran as a Democrat, and still lost to a political neophyte. That raised the question: If Baker can’t win in the Bay Area, what Republican can?

The answer Baker found after spending weeks combing through post-election data and campaign trail anecdotes should be a red flag for Republicans in the Bay Area and beyond in California, heading into President Trump’s 2020 re-election campaign.

“Ninety percent of the feedback we received was, ‘I can’t vote for you because you’re Republican,’” Baker said. “That message to Republicans is, ‘Your brand is toxic in this state.’ That’s why the party has a very faint pulse right now.”

Being a Republican wasn’t a problem for Baker before Trump’s presidency. The Dublin resident won two elections in a district that stretches through the suburbs of central Contra Costa and eastern Alameda counties, where Democrats outnumber Republicans, by advocating policies that appeal across party lines.

Baker is pro-choice. She supports same-sex marriage rights and a pathway to citizenship for undocumented immigrants. She voted for the state’s leading-edge climate change law. She supported gun control measures in the Legislature.

Baker reached out to Democrats and independents — she held 16 town hall meetings with Democratic state Sen. Steve Glazer of Orinda, whose district overlapped hers. She said internal polling showed that 60 percent of voters surveyed in her 16th District approved of her job performance.

Yet Baker lost in November by two percentage points to Rebecca Bauer-Kahan, a Democratic attorney from Orinda who had never run for public office before.

Baker drowned in a wave election with a concrete “R” chained to her ankle.

She wasn’t alone. The GOP lost half the 14 House seats it controlled in California. As usual, no Republicans were elected to statewide office — the last time a GOP candidate won one of those races was in 2006. There are so few Republicans in the Legislature that Democrats tried to invent a word (“giga-majority”) to describe what now amounts to more than a two-thirds supermajority.

Last month, the GOP lost another one. San Diego Assemblyman Brian Maienschein left the Republican Party to join the Democrats because he couldn’t stomach Trump any longer.

“I can either keep fighting to change the Republican Party, or I can fight for my constituents,” Maienschein said. “There wasn’t a way that I could continue and feel good about myself and the choices I was making.”

Baker was as anti-Trump as any Republican in the state. She said she wrote in former Secretary of State Condoleezza Rice’s name on her 2016 presidential ballot and supported motions to censure Trump while in the Assembly.

She said she’s lost Republican friends and donors by publicly opposing Trump. Some told Baker that they supported her despite her liberal positions on abortion, same-sex marriage and the environment, and couldn’t understand why she wouldn’t stand by the president despite their differences.

“I just felt he was too far out of the bounds,” Baker said in an interview for The Chronicle’s “It’s All Political” podcast. She was still happy to accept Republican help while disapproving of the party’s standard-bearer: “I suppose there’s a hypocrisy there, but one that I’m OK with.”

“Like every self-respecting Republican” who has opposed Trump, Baker said, she is constantly asked why she doesn’t leave the party.

“For me, it is not the right path,” Baker said. “I feel it is so important to not give up on the principles that made me a Republican.”

Baker, 47, grew up during Ronald Reagan’s presidency. She says he stood for things that appealed to her: individual freedom, small government, the power of the free market.

She paraphrased Ohio Gov. John Kasich, a prominent GOP Trump critic, in explaining her decision to stay in the party. “If someone comes in and robs your house,” Baker said, “you don’t help them pack or just sit there and watch. You fight.”

The challenge for Baker and others who share her frustrations is what to do next. How to get her party to win again. How to change.

For starters, she is concerned about who will be the next California Republican Party chair. In particular, she’s concerned about former Orange County Assemblyman Travis Allen.

The party chair, who will be elected at the state Republican convention this month, is not only the public face of California Republicans, but must raise money to help elect GOP candidates across the state.

Allen has the most name recognition among the three top candidates for chair after his failed run for governor last year. He finished a distant fourth in the June primary, with 10 percent of the vote. But he has a robust social media presence and has tapped into a vein of pro-Trump supporters in the state — even though Trump endorsed another Republican in the governor’s race, San Diego County businessman John Cox.

Allen has said he wants to rebuild the Republican Party by stressing “Republican values” instead of the “backward thinking” of trying to act more like Democrats. It’s hard to get to the right of him on most issues.

During his campaign for governor, Allen said “the verdict is still out on climate change” as “it will take quite some time for the science to be settled on this.” He promised that he would “cut taxes, get tough on crime, fix our roads and expand our freeways with no new taxes, fix our broken education system, and complete the California state water project.” He offered few policy details beyond his promises to “fix” and “get tough,” even on his campaign website.

He focuses much of his ire on “Bay Area elites” like Gov. Gavin Newsom and House Speaker Nancy Pelosi for ruining the state with liberal ideas.

Baker said the GOP needs to articulate a more positive vision of California’s future. But most troubling of all for Baker is Allen’s argument that Republicans must “support our Republican president.”

Today I am announcing my candidacy to be your CA Republican Party Chairman. Californians deserve a STRONG REPUBLICAN PARTY that supports our values, ideals, and OUR REPUBLICAN PRESIDENT. It's time we rebuild the Party from the ground up. It's time we TAKE BACK CALIFORNIA. pic.twitter.com/0xtUGv3WkT — Travis Allen (@JoinTravisAllen) November 15, 2018

Supporting Trump would be “a path to death for the Republican Party” in California, Baker said.

Allen defended his support of Trump, telling The Chronicle in an email that “Republicans in California didn’t lose because our country has the best economy in decades or record low unemployment. We didn’t lose because we’ve fixed international trade deals or strengthened our military. Republicans in California lost because the California Democrats out planned, out spent, and out executed the establishment Republican Party.”

Baker thinks it was more than a case of the GOP being outhustled. In California, at least, the party has to embrace comprehensive immigration reform instead of lining up only behind Trump’s plan for a wall on the Mexican border, she said. Most Republicans say they don’t want to address the question of the nation’s 11 million undocumented residents until its borders are secure. But Baker says Republicans must do both and must give undocumented immigrants a way to become citizens.

“If our party can’t come to terms with that — and I mean immediately — we are done in California,” she said.

The other area where Republicans are seriously out of touch with the state is the environment, Baker said. She was one of seven Assembly Republicans in 2017 to support then-Gov. Jerry Brown’s extension of the state’s cap-and-trade program to combat climate change. It’s a market-based approach to curbing greenhouse gas emissions, under which companies must buy permits for every metric ton of gas they emit. Baker said Republicans should recognize that it’s better than heavy-handed government regulation.

But Republicans excoriated Baker and the other GOP lawmakers who backed Brown’s measure, calling them traitors. Chad Mayes, who led the party in the Assembly, was forced to resign his leadership post over it.

“I thought it was one of the most conservative votes I cast in my four years in the Legislature,” Baker said. “We offered a solution that’s consistent with our principles, and the pitchforks came out. You would have thought that Republicans were anti-environment.”

It’s hard to see a political future for someone like Baker. Her state party is largely to the right of her and seems to think its biggest problem is that it’s not conservative enough. There were once enough Democrats open to the idea of electing a moderate Republican, but Baker’s experience shows that may no longer be true.

Baker, however, isn’t discouraged. She’s working as a lawyer now, still in her old district, and pondering her next political step.

“My time in public service,” she said, “is not over.”

Joe Garofoli is The San Francisco Chronicle’s senior political writer. Email: jgarofoli@sfchronicle.com Twitter: @joegarofoli