Seasonal selection and resource dynamics in a seasonally polyphenic butterfly