The state of Montana may owe civil rights attorneys tens of thousands of dollars after a Billings judge on Monday held the state health department in contempt for what he called “flagrant disregard” of court orders in a case about how transgender people can update the sex on their birth certificates.