The state has amassed a little more than $1.4 million in legal bills for defending election laws that were passed by the Legislature in 2021 and have been mired in court for more than three years.