Federal judge says Trump plan to halve FEMA workforce was unlawful