US court gives Trump's tariffs a 'rare' win