The Economics of Democracy in Resource-Producing Countries