Over the last few weeks, and seemingly out of nowhere, Donald Trump began praising Planned Parenthood. “Planned Parenthood does a lot, a really good job in a lot of different areas, but not on abortion,” he told Chuck Todd on Meet the Press. At the debate in Houston one week later, Trump declared: “Millions of millions of women—cervical cancer, breast cancer—are helped by Planned Parenthood.”

This was glaringly out of step with a political party that has made great hay in Congress over defunding Planned Parenthood, and opened Trump up to attacks from Marco Rubio and particularly Ted Cruz, who flirted with forcing a government shutdown over Planned Parenthood funding last year. Trump maintained during all of these exchanges that he supports defunding the group and is pro-life, but nevertheless seemed to be taking a tremendous gamble by telegraphing moderation on abortion—particularly since he was expressly pro-choice for most of his life before ostensibly changing his mind.

But yet again, there is a method to Trump’s madness. He either has an uncanny feel for the Republican base, has excellent pollsters, or is just incredibly lucky with his scattershot positions, because he is accessing an ever-growing portion of the Republican base that is comfortable with abortion, accepts the sexual revolution, and wants candidates to stop talking so much about social issues.

This dynamic helps Trump while clearly hurting Rubio and Cruz, according to new polling from Democracy Corps, and moderation on social issues is an under-discussed factor in Trump’s success.

The Democracy Corps survey is worth reading in full, because it establishes Trump’s basic appeal and outlines what fractures exist inside the Republican party. The key finding is that two things unify and animate GOP voters, from Tea Partiers to moderates: a deep antipathy to Democrats and Democratic politicians, and strong anti-immigration views.

Being anti-Democrat is actually twice as powerful as a motivating factor than being pro-Republican, the polling found. The party overwhelmingly agrees that there is no difference between the Democratic Party and socialism, by a 79–21 margin, and by an 88–12 margin thinks the Democratic Party’s policies are so misguided they threaten the nation’s well-being.

The feeling is most intense among Tea Party voters and evangelicals, but even moderates agree on the socialism charge by a 64–36 margin. Moderates also believe that Democrats threaten America’s well-being by a 76–24 margin. Hillary Clinton, Nancy Pelosi, and Barack Obama have favorability ratings somewhere in the neighborhood of infectious flesh-eating diseases among all Republican voters, with only 1 percent of Republicans expressing warm feelings about them.

The polling also clearly shows that Republican moderates are deeply apprehensive about immigration. Moderates agree by a 59–41 spread with the statement, “it bothers me when I come in contact with immigrants who speak little or no English,” and by a 79–21 margin they want a Republican nominee who will “fight” the fact that 12 million undocumented immigrants live in the United States instead of one who “accepts it.” (Observant Catholics, who tend to align with moderates on many issues as a counterweight to evangelicals and Tea Partiers, also want a fighter on immigration by 91 percent to 9 percent. That may explain why Trump’s tussle with the pope on the specific topic of immigration didn’t appear to harm his support at all.)

In short, there really aren’t many moderates in the Republican Party when it comes to immigration and opposition to Democrats. Trump clearly understood this, and by going harder and more extreme than anyone else on those two issues, he built up a huge base of support among Tea Party voters without sacrificing much moderate support. He leads Cruz and Rubio among Tea Partiers by 50 to 26 to 12 percent, respectively, and leads Rubio among moderates 24–21, with the hard-charging Cruz picking up a paltry 4 percent.

Without strong moderate support—they make up 31 percent of the GOP base, a slight plurality, according to Democracy Corps—Trump would be in serious trouble and at risk of being a factional candidate like Cruz.

Social issues, and specifically abortion, are among the biggest areas of disagreement between moderate Republicans and the rest of the party. They are pro-choice by a 65–35 margin, whereas all other Republican subgroups (evangelicals, Tea Partiers, and observant Catholics) are all strongly pro-life. Eighty-six percent of moderate Republicans want politicians who “accept that women and men feel free to have sex without any interest in getting married, forming a family or a long-term relationship.” No other subgroup even has a majority that agrees, let alone 86 percent.

And social issues, perhaps not surprisingly, are where Rubio and Cruz run into the most trouble with the moderate voting bloc. Of all the reasons for voting against Rubio that Democracy Corps tested with GOP moderates—from being too weak to negotiate with Putin to his proposal for $1 trillion in lower-income tax credits—the only subject that gave a majority of moderate Republicans “serious doubts” about his candidacy was that Rubio “thinks abortion should be illegal in all cases, even in cases of rape and incest.” Fifty-seven percent of moderates said this raised serious doubts for them, versus 43 percent who were not seriously bothered.

That 57–43 split was actually reversed on the question of Rubio’s Gang of Eight immigration efforts, with the majority of moderates saying they did not have serious concerns about Rubio working on the bill. That means that while GOP moderates have strong feelings about immigration, they may be open to a negotiated approach with Democrats, and feel that being strongly anti-abortion is worse.

Cruz, too, gets killed among moderates for the hard-line abortion stance, by 59 to 41 percent. Majorities of moderates also don’t like that Cruz led government shutdown efforts, is disliked by his peers, helped kill comprehensive immigration reform without offering any solutions, and because he would appoint Supreme Court justices who would end marriage equality.

Trump, aside from being pro-choice for much of his adult life, also supports abortion exceptions for rape and incest. “I absolutely am for the exceptions, and so was Ronald Reagan for the exceptions, by the way. There’s nothing wrong with that. You have to do it, in my opinion,” he said last summer. So he doesn’t run into that same trouble with moderates. Given that moderates are themselves pro-choice as a group, it’s possible they don’t even believe he’s really pro-life.

Moderates also break dramatically with the rest of the party over specific opinions about pro- and anti-choice groups. Only 29 percent of GOP moderates have a favorable opinion of “pro-life groups,” compared with 74 percent of evangelicals and 50 percent of Tea Party voters. (That Tea Party voters are evenly split on this question is rather remarkable in itself. And only 52 percent of observant Catholics have a favorable opinion of “pro-life” groups.)

As for Planned Parenthood, only a minority of moderate GOP voters (44 percent) have an unfavorable opinion of the group. So when Trump talked up their good work, it seems he knew what he was doing. “When Trump said he was open to Planned Parenthood, [Cruz and Rubio] attacked him on this, and probably helped him with moderate voters rather than hurt him,” says Stan Greenberg of Democracy Corps.

“Within the Republican Party, these moderate voters are orphans. No one took advantage of them, even though there was such a glaring opportunity,” Greenberg says. “No one other than Trump, by hinting that Planned Parenthood does some good things when they’re not doing abortions—none of the candidates, none of the establishment when they mulled over the strategies to save their party, they’ve not been willing to appeal to these voters.”