Smog Rules Illegally Weakened, Court Says