U.S. court rules civil rights law protects LGBT workers