A federal appeals court ruled late Wednesday that the Trump administration acted illegally when it ended legal protections ...