From hierarchies to markets and partially back again in electricity: responding to decarbonization and security of supply goals