U.S. and China reach trade deal that eases tech, rare earth restrictions