Swing state faces major election integrity setback over court’s ruling