THE COASTAL Chinese city of Zhuhai is linked to Hong Kong by a showy piece of infrastructure: a 55km bridge and tunnel, the largest sea crossing of its kind.

Some Hong Kongers use it to visit Chimelong Ocean Kingdom, a theme park featuring a whale shark, rollercoasters and a hotel shaped like a spaceship.

Others are motorists with a more mundane purpose.

They travel to Zhuhai to fill up their tanks with petrol, available at a big enough discount to make the drive worthwhile.

The mainland’s petrol-price formula smooths out the international market’s ups and downs.

As such, it is one of the ways China is shielding citizens from the effects of the war in Iran, which has trapped oil tankers on either side of the Strait of Hormuz and damaged energy infrastructure in the Gulf.

There are plenty more.

As an emergency measure, China’s planning agency has banned exports of refined products including petrol, diesel and jet fuel.

The country’s small, independent “teapot” refiners, clustered in Shandong province, are busy processing Iranian crude, which is still allowed to pass through the strait.

And if the war drags on, China may also dip into its vast strategic reserve of oil, which it diligently topped up when oil prices were low last year.

“This is China’s nightmare,” said Lindsey Graham, an American senator, earlier this month.

But precisely because China’s vulnerability to an energy shock haunts its leaders, they have taken steps to mitigate it.

China’s exposure is a result of its gargantuan appetite.

The country produces more oil than Kuwait or the United Arab Emirates; including petrol and other refined liquids, it also outproduces Iraq.

The problem is that China consumes more energy than America, Russia and India combined—an amount that dwarfs its domestic output.

Coal, which runs in thick seams across the provinces of Shanxi, Shaanxi and Inner Mongolia, provides most of that energy.

Renewables represent a fast-growing share.

But oil still produces over 18% (see chart).

Despite China’s own crude production, it relies on oil imports for about 13-14% of its energy needs, over half of which come from the Middle East.

Much of this is now stuck.

The war has snarled up Hormuz, the narrow waterway through which over 15m barrels of oil per day used to travel.

Shipments from Iran’s neighbours have slowed to a trickle.

View full Image Chart: The Economist Meanwhile, much of the oil Saudi Arabia is frantically piping to its west coast, to avoid the strait, does not suit China’s refiners.

And Russian crude was promptly bought by India after America gave its blessing, suspending the tariff threat it....