On paper, Republicans were poised to have a very good year in Virginia’s off-year elections. For over a generation, whichever party controlled the White House invariably lost in the commonwealth. And in Virginia this year, Democrats nominated a gubernatorial candidate who’d never held public office, didn’t have deep political roots in the state, and wasn’t especially well liked by voters.

It looked like a recipe for GOP success. It wasn’t. As the dust settles on Election Day, Terry McAuliffe (D) has narrowly won Virginia’s gubernatorial race, Ralph Northam (D) was easily elected Virginia’s next lieutenant governor, and Mark Herring (D) very narrowly leads the still-uncalled race for state attorney general.

The Tea Party wing of Virginia’s Republican Party got the extremist candidates they wanted, and it looks like they lost in a clean sweep.

There’s no shortage of relevant angles to the Virginia elections, but there are two of particular interest. The first relates to the Affordable Care Act.

For Republican Ken Cuccinelli, who knew he was losing, condemnations of “Obamacare” became the driving message of his entire campaign in the race’s closing weeks. The GOP gubernatorial hopeful said, over and over again , that the gubernatorial race would be “ a referendum on Obamacare .” As recently as Monday – the day before the election – Cuccinelli said , “Tomorrow in Virginia is a referendum on Obamacare. Let’s send a message and say ‘no’ tomorrow to Obamacare.”

At the same event, Sen. Marco Rubio (R-Fla.) told Virginians, “This is the first election in America since the full impact of Obamacare has been felt. This is the first chance that people in America have to speak clearly at the ballot box about the impact this law is having on their lives and our economy.”

And then Cuccinelli lost, at which point the right said that the race was close because Virginians don’t like the Affordable Care Act.

Maybe it’s worth pausing to remind Republicans what the word referendum means : “an event in which the people of a county, state, etc., vote for or against a law that deals with a specific issue.” I don’t mean to sound picky, but folks shouldn’t call a race a referendum, lose, and then say the referendum proves how right they were – at least if they want to be taken seriously.

Second, it’s important to realize just how significant women’s health was in this race, which McAuliffe won thanks to a sizable gender gap. Dahlia Lithwick explained overnight, “An official who consistently used his elected office to promote policies that shamed, marginalized, and patronized women and other minorities was met with a ‘no.’ This wasn’t just about money, or the shutdown, or Star Scientific, or Terry McAuliffe’s fancy Clinton-era friends. It was about voters and what they know to be true.”

Irin Carmon added some important context

Democrats already generally enjoy an advantage with female and non-white voters, and particularly with voters who fall in both of those categories. But the 2009 race in Virginia was dominated by concerns about the economy and anger at Obama, which in the tradition of Virginia off-year elections, wound up being predictive of the 2010 midterms. In 2012, the focus on a broad range of women’s issues, including an unapologetic position in favor of abortion rights, helped Barack Obama. The gift to the McAuliffe campaign was that the McDonnell administration, with Attorney General Ken Cuccinelli as a faithful warrior, went on to put restricting reproductive rights front and center on the legislative agenda.

If recent history is any guide, the right will come up with a variety of creative excuses for failure, explaining why their defeats were really victories if you close one eye and tilt your head just so. But reality is stubborn – Republicans in a competitive, “purple,” battleground state nominated right-wing candidates, alienated the voting mainstream, and lost races they probably should have won.