Outspent 4-to-1, Republicans still made gains in state legislative elections