Investors decided the risk of a conflict with Syria is shrinking, lifting stocks. A drop in Apple and other tech firms, however, handcuffed the S&P and Nasdaq. US and Russian diplomats are working on a plan that would lead to Syria giving up chemical weapons that President Obama says were used against civilians. Restoration Hardware sunk after it reported second-quarter sales that were not as strong as the first quarter. Walt Disney rose after delaying its fifth ‘‘Pirates of the Caribbean’’ movie from a planned 2015 opening. IBM rose after saying it would sell a customer care outsourcing business to Synnex for $505 million.