A Theory of Civil Conflict and Democracy in Rentier States