Such resilient grid design would protect us all from cascading and potentially economy-shattering blackouts that could make Sandy look trivial. Earthquakes, superstorms, floods, and wildfires are the least of our worries. Solar storms make massive grid failures inevitable — the only question is when, and it’s about time for another big one. A simple acts of terrorism could black out a city for months. A concerted cyberattack launched anonymously from anywhere on earth could physically destroy key grid assets across much or all of the country, returning America instantly to the seventh century, with dim prospects for recovery.

The solution is in our hands, and it’s proven. When wildfire cut a major power line, the University of California at San Diego’s microgrid switched from importing to exporting power from its onsite sources in less than a half-hour. Denmark is reorganizing its grid in “cellular” fashion, stress-testing annually by cutting off the grid to make sure each “cell” still meets vital loads. Prof. Rikiya Abe at Tokyo University has even invented a “digital grid” whose “routers” can exchange power between microgrids without needing to run in lockstep like today’s analog grid.