Social institutions and inequality