In 2011, it suddenly became much more difficult to buy a Ford in three specific shades of red.

Those colors, as well as one called “tuxedo black,” relied on a gleaming pigment called Xirallic, which was made by a German company, Merck KGaA, in Onahama, Japan. Onahama was hard-hit by the tsunami and the Fukushima Daiichi nuclear disaster — and the Merck factory there was the only place that made the pigment.

The new coronavirus is spreading through the US, and several states have made emergency declarations. The World Health Organization has declared it a pandemic. Here are the basics: Everything you need to know about the coronavirus

It wasn’t just Ford that was left scrambling; GM, Toyota, and BMW used Xirallic in their paint, too. The shortage affected about a third of the 200 colors Toyota offered, or 20 percent of production, The Wall Street Journal reported.

The auto industry relies on something called “just-in-time manufacturing,” or JIT. An efficient JIT system puts the right number of parts in the right plant at the right time — with nothing left to spare. Cars lose value the longer they sit without buyers; JIT reduces the amount of inventory sitting around. JIT also increases profits by allowing new products to enter the market faster, since there’s less old inventory sitting around to compete against.

Before he was Apple’s CEO, Tim Cook’s job as COO was to implement just-in-time manufacturing

Just-in-time manufacturing is highly efficient. It is also, as the Xirallic example suggests, fragile. But the lure of reducing inventory and increasing potential profits has made JIT a quiet revolution in manufacturing — perhaps most famously at Apple. It worked pretty well until the novel coronavirus rocked China.

Before he was Apple’s CEO, Tim Cook’s job as COO was to implement just-in-time manufacturing. Cook was familiar with the practice because it had been part of his first job at IBM. Steve Jobs knew he needed someone to reform Apple’s manufacturing, and hired Cook from Compaq to do it.

Cook “closed factories and warehouses around the world and instead established relationships with contract manufacturers,” according to a 2008 article in Fortune Magazine. Cook called inventory “fundamentally evil,” and so reduced the amount of time inventory was on the company balance sheet “from months to days.” In 2012, an article in The Atlantic praised Apple for turning over its inventory once every five days. Apple’s ability to launch, manufacture, and ship millions of iPhones around the world every year like clockwork with little remaining inventory is a miracle of globalized just-in-time manufacturing — but the entire JIT system is being tested by the coronavirus.

The coronavirus originated in Wuhan, a major Chinese manufacturing center that ships to pretty much the entire rest of the world; as a result, the supply chain disruptions have been widespread. Apple will miss its forecast for the second quarter; its iPhone production is particularly constrained. Microsoft announced that its next quarter of earnings will take a hit — specifically, its Windows and Surface businesses, both dependent on shipping hardware, will miss the guidance Microsoft had previously given. “The supply chain is returning to normal operations at a slower pace than anticipated,” the company said in a statement.

Smartphones are vulnerable, because they require a lot of human labor and also a lot of parts that are manufactured elsewhere

TrendForce, a supply chain analytics provider, has forecast a shortage in laptop computers because of labor and material shortages, as well as restrictions on transportation. The company expects 5.7 million laptop computers will ship in February, a 48 percent decrease from this time last year.

Smartphone production will dip 12 percent this quarter compared to this time last year, TrendForce has also predicted. Smartphones are vulnerable because they require a lot of human labor and also a lot of parts that are manufactured elsewhere. On March 5th, TrendForce put out a note saying that the outbreak will continue to affect smartphone production for one to three months. The introduction of Apple’s 5G iPhone and iPhone SE2 may be delayed, Bank of America has predicted.

That may have a sizable impact on the economy, says Koray Köse, a supply chain expert at Gartner. Companies that have to delay the introduction of big products in their portfolio face an unenviable choice: either they can change their product introduction cycle to accommodate the delay, or they can squeeze the lifetime that a product is available.

The supply chain problems aren’t limited to China, either. Italy and South Korea have both experienced outbreaks, which will likely affect Hyundai and Fiat Chrysler. Samsung temporarily stopped work at one of its South Korean factories after some staff there tested positive for the virus.

“Just-in-time means there isn’t much inventory built up.”

It’s not just the factories at the end of production that are affected. The supply chain has been disrupted in several places, Köse says. Raw materials like steel, copper, and aluminum have been tied up in inventory, leading to slowdowns on products made from those materials. Köse doesn’t think the effects of the supply chain disruption are going to go away in one quarter. “2020 will see a big impact,” he tells The Verge. “And just-in-time means there isn’t much inventory built up.”

Just-in-time manufacturing is highly efficient, but it’s not resilient, Köse says. This style of manufacturing cuts costs — but it also means that if the supply chain is disrupted, there will be shortages. If you’re thinking of making a big purchase, like a car or a laptop, you should make up your mind while products are still available, Köse says. “Probably by the end of Q1, you’ll see shortages across the board,” he says. “Don’t panic-buy anything, but evaluate your investment or expense timeline.”

In the automotive industry, the coronavirus means multiple suppliers can’t deliver their products on schedule, says Caroline Chen, an analyst at TrendForce. Work stoppages mean that many suppliers are affected. Chen points out that logistics and transportation have also been impaired.

“When something goes awry, it goes awry big.”

The main problem in trying to project exactly how long it will take to recover is that there isn’t a lot of insight into the supply chain, says Michelle Krebs, an executive analyst for Autotrader. Most companies — like Ford or GM — know who’s supplying them. But they don’t know who’s supplying their suppliers. What’s more, the number of suppliers has decreased through consolidation, she said. More volume means better profits — but it can also mean a fragile supply chain. “When something goes awry, it goes awry big,” she tells The Verge.

To make a more resilient system, a lot of companies may have to rethink just-in-time manufacturing. “The sky high cost of fragility built into Just-In-Time inventory and trans-national supply chains is something too infrequently discussed,” Eric Weinstein, a managing director at Thiel Capital, said on Twitter. Resilience doesn’t show up as clearly on balance sheets as cost reduction, but it’s crucial for surviving disruptive events. Lowering costs by creating economies of scale and volume looks good most of the time, but once there’s a failure, companies don’t have many options, Köse points out. “You put yourself into a very difficult situation by believing the economics of scale are the best option for the most competitive pricing,” Köse says.

Köse doesn’t think this will be the last time we see disruptions in the supply chain unless manufacturers are willing to invest in resilience and multisource strategies. In fact, that’s what Merck KGaA did in the wake of the tsunami that wiped out its pigment Xirallic: it created another pigment called Meoxal, and started stockpiling it and Xirallic at places besides Onahama. It took six months for Merck KGaA to catch up on back orders of Xirallic.

Cook has called the supply chain problems a “temporary condition”

By 2013, Xirallic wasn’t just made at Onahama — a backup plant in Gernsheim, Germany was making it, too. But this kind of resilience will be tougher for Apple. Making Apple products requires a great deal of skilled labor. “The skill here is just incredible,” Cook said at a 2017 conference in China, according to The New York Times. “In the US, you could have a meeting of tooling engineers and I’m not sure we could fill the room. In China, you could fill multiple football fields.”

And so, accordingly, Cook has called the supply chain problems a “temporary condition,” and has said Apple won’t move out of China. “We’re talking about adjusting some knobs, not some sort of wholesale, fundamental change,” Cook told Fox Business News. Terry Gou Tai-ming, founder of Foxconn — Apple’s major manufacturing partner — said on March 12th that the resumed production had “exceeded our expectations and imagination.” But Gou’s rosy outlook was tempered by concerns about the electronics supply chain in Japan and South Korea, both of which are experiencing their own outbreaks.

Another large area is starting to experience an outbreak: the US. In theory, just-in-time manufacturing should allow Apple to adjust for lowered demand, if more people are staying home and not buying devices — or if local governments order Apple stores to close. In practice, we’re about to find out.