The court found the process of deciding Elon Musk’s huge 2018 pay award was “deeply flawed”.