Reproductive success of a keystone herbivore is more variable and responsive to climate in habitats with lower resource diversity