Statistical mechanics has long provided the theoretical bedrock for understanding phase transitions—sharp changes in the physical state of matter—and, more recently, the associated large deviations ...