The Republican primary calendar could hardly have worked out better for Donald Trump. There is plenty of evidence that he’s had the most to lose from a field that’s winnowed as the presidential primaries have progressed. But in the home stretch, Trump’s bid for 1,237 delegates may be rescued by geographic terrain that’s improving for him and deteriorating for his strongest rival, Ted Cruz — even as Cruz and John Kasich begin to collude.

Thus far, the two best predictors of GOP voter preferences have been white socioeconomic status and an area’s partisanship. Trump has performed best among non-Hispanic whites with low socioeconomic status, especially in blue areas. Meanwhile, Cruz has fared best in more conservative areas, Kasich has run best in blue areas, and both have run slightly better in areas with high white socioeconomic status.

To illustrate this phenomenon, let’s divide the counties that have voted into four quadrants. First, let’s divide the GOP electorate by white socioeconomic status, based on a composite index we created, so that 50 percent of Republican voters that have cast a ballot so far fall in each each half (High, Low). Then let’s cut the GOP electorate into two halves by partisanship (Blue, Red): About half of the 23 million GOP primary votes have been cast in counties where President Obama won at least 44.6 percent of the two-party vote in 2012; the other half have been cast in counties where Mitt Romney took at least 55.4 percent.

And voila: We have four quadrants that represent four unique segments of the GOP electorate: Let’s call them HighBlue, LowBlue, HighRed and LowRed.

Let’s take a quick tour of each quadrant:

HighBlue

Examples: Columbus, Ohio; Arlington, Virginia; Burlington, Vermont

Results so far: Trump 36 percent, Cruz 23 percent, Kasich 18 percent, Rubio 18 percent

These liberal, elite urban and academic havens aren’t home to many GOP voters, but they dominate the Northeast, Mid-Atlantic and West Coast and punch above their weight in the delegate count. This is the only quadrant where Kasich and Marco Rubio have combined for more votes than Trump. In fact, outside of Ohio, 83 percent of the counties Kasich and Rubio have carried fall into HighBlue.

The biggest problem for #NeverTrump is that since Rubio’s exit, Kasich hasn’t proven he can top Trump on his own in these places (save for a handful of the very bluest and most elite ZIP codes). Outside of Ohio, the only places Kasich has topped Trump in delegates are the Chicago Loop and Chicago’s wealthy North Shore, the District of Columbia and Manhattan in New York City. Kasich would need Cruz to cede him more than Oregon and New Mexico (apparently their current plan) to meaningfully change that.

LowBlue

Examples: Valdosta, Georgia; Lowell, Massachusetts; Utica, New York

Results so far: Trump 43 percent, Cruz 25 percent, Kasich 17 percent, Rubio 10 percent

What do Binghamton, New York; Fall River, Massachusetts; and the Mississippi Delta have in common? They’re all traditionally Democratic-leaning areas of low socioeconomic status where Trump has posted his highest percentages in the country. These GOP voters tend to live in the midst of racial minorities, urban Democratic machines or declining industrial bases, and their sense of alienation is rocket fuel for Trump’s nativist and protectionist message.

Kasich hasn’t actually performed much worse in LowBlue than HighBlue. The problem for him, though, is that LowBlue is easily Trump’s best quadrant. Trump has carried 82 percent of the counties in LowBlue, often by landslide margins. Even if Cruz’s votes were added to Kasich’s total, it wouldn’t be enough to overtake Trump in this quadrant.

HighRed

Examples: Plano, Texas; Provo, Utah; Waukesha, Wisconsin

Results so far: Trump 32 percent, Cruz 33 percent, Kasich 11 percent, Rubio 18 percent

Well-educated Mormons in the West and well-heeled conservatives in suburbs of Milwaukee and Dallas have had little use for Trump. This is Cruz’s best quadrant and Trump’s worst. In fact, it’s the only quadrant where Trump is losing. This was also one of Rubio’s two best quadrants, and as Wisconsin’s outcome demonstrated, Cruz has stood to gain the most in these areas from Rubio’s exit.

GOP primary voters in HighRed locales have turned out at some of the highest rates in the country. Unfortunately for Cruz, many have low ratios of delegates to votes. For example, Cruz won 113,522 votes in Wisconsin’s 5th Congressional District (HighRed). Two weeks later, Trump won 636 votes in New York’s 15th District (LowBlue). Each showing was good for three delegates.

LowRed

Examples: Yuma, Arizona; Pensacola, Florida; Myrtle Beach, South Carolina

Results so far: Trump 40 percent, Cruz 31 percent, Kasich 9 percent, Rubio 13 percent

Deeply red areas with low white socioeconomic status are mostly located in the South and the Sun Belt and include many areas popular with retirees. Cruz hasn’t performed much worse in LowRed than he has in HighRed, but Trump does much better in LowRed than HighRed — by about 8 percentage points. For example, Trump won 55 percent of the vote in Ocala, Florida, and 65 percent in Lake Havasu City, Arizona.

Kasich hasn’t been competitive in LowRed; in fact, his share of votes here has been less than half of his share in HighBlue. Still, Cruz’s ability to win tactical votes from the few Kasich supporters in this quadrant could make a big difference in a few primaries to come; for example, six of Indiana’s nine districts fall into LowRed — and they’re worth 18 delegates.

Add it all up, and Trump has dominated three of the four quadrants, losing only HighRed. Trump’s two largest leads have come in the two blue quadrants, thanks to Cruz’s weakness there. That’s a drastic departure from our pre-primary expectations about “blue zone” GOP voters last fall, and it’s critical to understanding why Trump has a built-in edge in the remaining 15 contests.

If we use the same technique to divide the areas represented by the 2,472 delegates that will go to the Republican convention in Cleveland into four quadrants, we can see that New York’s primary marked a sharp left turn on the calendar. From New York through the end of the primaries, 51 percent of delegates will be awarded in HighBlue — Cruz’s weakest quadrant — a huge 32 percentage point jump from primaries before New York. Kasich’s best quadrant is HighBlue, but he’s Trump’s weaker opponent by far.

Meanwhile, of the 769 delegates at stake in the final stretch that started with New York, just 11 percent will be awarded in states and districts that fall into Cruz’s best quadrant, HighRed — down 14 percentage points from contests before New York. The HighRed states and districts remaining on the calendar include Nebraska, suburban Indianapolis and Orange County, California; but by themselves they aren’t enough to guarantee a floor fight.

This late geographic shift represents a timely boost to Trump, especially considering that 68 percent of the remaining delegates will be awarded on a winner-take-all basis, allowing Trump to keep winning huge delegate shares with simple pluralities. Sure, Cruz keeps winning shadow primaries, but for those victories to have any relevance in Cleveland, he’ll need to beat Trump in actual primaries held in unfriendly quadrants.

Desperate times call for desperate measures. That explains why Cruz, who recently fumed at Kasich for playing spoiler, relented and announced Sunday that he and the Ohio governor would launch a last-ditch scheme to cede each other specific states to avoid splitting anti-Trump votes. However, if Cruz falls even one vote short of victory in Indiana on May 3, it’ll be difficult to stop Trump from winning the GOP nomination on the first ballot.

Check out our live coverage of the April 26 primary elections.