When Katie Packer Gage and Ashley O’Connor sat down to lunch at Boston’s Anthem restaurant one day in the winter of 2012, their conversation quickly turned to what had gone wrong with Mitt Romney’s presidential campaign.

Gage had been Romney’s deputy campaign manager, while O’Connor was director of advertising. Both took part in the campaign’s daily strategy meetings, and both were asking themselves how Romney had lost to Barack Obama by four points. That defeat was driven largely by Romney losing women voters by an insurmountable 11 points.

“Republicans weren’t doing a very effective job of communicating the Republican message to women,” said Gage. “We asked how we could go about doing that better, and ultimately that’s how Burning Glass came together.”

Burning Glass Consulting is the all-female consulting firm Gage and O’Connor founded in 2013 along with GOP pollster Christine Matthews to focus Republican campaigns solely on refining their message to women voters. Burning Glass is also a major piece of the puzzle of how the GOP was able not only to neutralize but in some cases defeat the Democrats’ “war on women” message that had hurt some Republican campaigns badly with female voters in 2010 and 2012.

As a party, Burning Glass told Republicans, they needed to recruit better candidates, shut down GOP voices that made comments that would be offensive to women voters, and prepare campaigns for the Democrats to replay their “war on women” message in 2014 on a national scale.

“One of the first things that we felt was important was avoiding another Todd Akin or Richard Murdock moment, which was so difficult to deal with in 2012,” Gage said. “The whole candidate-recruitment process, making sure that one candidate was not going to put our whole party in a negative light, was something we felt strongly about.”

O’Connor also said the party needed better polling information about women voters, including why so many had responded to the Democrats’ message in 2012 that Republicans were essentially bad for women, especially on social issues.

“Coming into 2014, we really wanted to have some good research and data to be able to talk about how to handle this, because we knew it was coming,” O’Connor said. “For us, it was really important to make sure that candidates were ready for this and that they knew how to handle it. We learned that you can’t just dismiss it. You have to be ready to talk about those issues as well as other issues.”

Over the course of 2013 and 2014, as Democratic campaigns targeted female voters on abortion rights, equal pay, and access to birth control, Burning Glass worked with the House Republican caucus to train members to avoid Todd Akin-style gaffes about things like “legitimate rape”; with Senate Republican candidates on debate prep and issue messaging around the Affordable Care Act; and with independent expenditure groups on the tone and tenor of their ads.

The results speak for themselves. Burning Glass’s 2014 client list reads like a page out of the new Senate roster, including candidates or groups in Arkansas, Georgia, Colorado, Louisiana, North Carolina, and Virginia. In each contest, the Republican candidate outperformed the GOP result from 2012 among women voters. All but Ed Gillespie in Virginia won, and even Gillespie made significant gains among female voters compared to now-Gov. Terry McAuliffe’s nine-point win over Ken Cuccinelli.

Among GOP victories in 2014, no other race is quite as emblematic of Republicans’ new approach to women as the Colorado Senate race, where incumbent Democratic Sen. Mark Udall lost to Rep. Cory Gardner after Udall spent nearly the entire campaign talking about women’s access to abortion and birth control. Gardner, a sunny, 40-year-old House member, responded with a position championed by Burning Glass for Republicans to stand by their opposition to abortion, but also push for women’s expanded access by making it available without a prescription.Udall won with women by four points, but it wasn’t enough to counter Gardner’s 20-point margin among men.

“Colorado was a great example of Democrats deciding to run a playbook and stick to it,” said O’Connor. “I think Sen. Udall make a really grave mistake by only focusing on ‘women’s issues’ and just beating it over and over and over when people, and especially women, in Colorado wanted to hear more from him.”

In Iowa, a state that had never elected a women to Congress, women split their votes evenly, 49 percent to 49 percent, between Joni Ernst and the Democrat, Rep. Bruce Braley, while Ernst swept men’s votes by 18 points.

In Georgia, North Carolina, and Louisiana, where Democrats had female candidates, Burning Glass suggested Republicans stay away from aggressively negative ads and instead feature Michelle Nunn, Kay Hagan, and Mary Landrieu’s own words supporting President Obama, who was unpopular in those states among the women who were likely to turn out in the midterm elections.

“You let the opponents’ own words work against them,” O’Connor said of the strategy. “Therefore, we’re not attacking her, we’re saying, ‘Here’s where she stands, here’s what she’s saying.’”

When all of the votes were counted, Republicans nationwide lost women voters by four points, but the results were a sea change from the party’s 11-point rout in 2012.

But Gage and O’Connor are cautioning Republicans not to read so much into their victories this cycle that they assume voters, especially women, will give the party the same results as they did in 2014.

“The fact that we’re going to have a woman running for president on the other side and that it’s a presidential year, all of these are going to make 2016 more challenging than it was in 2014,” Gage said. “So we hope that people in our party will continue to pay attention to this.”