A majority of justices ruled Trump overreached his authority by unilaterally imposing tariffs under national emergency powers.