How inequality changes marriage