Fig. 1: Conceptual illustration of the methodology.

A Inferring the environmental niche of a hypothetical species and its centroid from its contemporary distribution. The environmental distance of each sampled population from the niche centroid is calculated. B Species distribution under Last Glacial Maximum (LGM) and contemporary conditions, highlighting range shifts over time. We hypothesize that genetic diversity decreases with increasing environmental distance from the niche centroid. The environmental distances of each sampled population from the niche centroid are estimated under both LGM and contemporary conditions.