Arizona attorney general reaches ethics deal involving clashes with secretary of state in election suits