Forget all the “retail apocalypse” headlines. The phrase suggests the whole industry is collapsing, consulting firm Deloitte says. In reality, it’s not.

But it is changing in significant and fundamental ways. In an in-depth study conducted over more than a year, Deloitte dug into what’s really going on in the industry, which employs millions of Americans and accounts for an important share of the country’s GDP. It examined the large-scale changes happening in the US economy, polled a representative sample of 2,000 consumers, and even laid out all public US retailers along a value spectrum for its analysis.

There’s no apocalypse, Deloitte found, but there is a “renaissance” of sorts going on.

At the high and low ends, retail is thriving. It’s in the middle that it’s faltering. This split is playing out right along with the shrinking of the US middle class (paywall). Over the last decade, most Americans saw their discretionary funds either fail to grow or even shrink. The bottom 40%, for instance, actually had less discretionary money to spend in 2016 than in 2007. For the middle 40% discretionary funds remained unchanged, while income dwindled. The rich, on the other hand, saw their net worth and discretionary money grow.

The 80% of Americans who didn’t see their discretionary funds grow in the last decade have become more price sensitive, driving traffic to outlets that sell at the lowest possible prices, such as off-price retailers. The growing wealth at the top is creating more customers for high-end items. This is making winners of low-cost retailers, including Old Navy, and premium brands, such as Coach. These high and low categories, Deloitte says, are also where brands are adapting best to their customers’ needs.

Brands in the middle, which rely on a mix of price and promotions to drive sales of goods that aren’t exclusive or the cheapest on the market, like a certain J. Crew, have watched their customers flee. Deloitte calls it the “great retail bifurcation.”

The widening wealth gap is having an effect, despite the more recent reassuring signs for retailers, such as high consumer confidence (paywall), low unemployment, and—yes—actual growth in retail. It’s just mostly online. According to Deloitte, between 2012 and 2016, online retail had a compound annual growth rate of 12.5%, while stores grew 1.3%—modest growth but still growth, in the channel that still makes up 91% of all sales.

In the past year, the trends have only grown more pronounced. Sales at mid-priced retailers declined 2%. At premium and low-priced retailers, they grew 8% and 7%, respectively. (Interestingly, Deloitte notes that these changes are also fueling a divide in how people shop, since low-income consumers are more likely to shop in stores, while their high-income counterparts are the shoppers most likely to buy online.)

The same dynamic plays out in the main metric driving the “retail apocalypse” narrative: store closures. According to Deloitte, more stores are actually opening than closing. But they’re all on the low and high ends. If you look at the middle only, the situation does look dire.

In this environment, many brands will not survive. A separate report from Moody’s predicts that US retail bankruptcies will peak this month, and weaker brands will continue to struggle.