Dozens of state and local budgets depend heavily on tax revenue from oil, gas and coal to fund schools, hospitals and more. Replacing that money is turning out to be a major challenge in the fight against climate change.