Apple leads megacap losses

A selloff in major tech stocks pulled markets lower, ending a three-day rally that had brought the S&P 500 close to its record highs…