Linking conflict to inequality and polarization