Supreme court gives qualified support for EPA to set emissions limits