Deal reached on reducing mercury emissions