Reproductive plasticity and landscape heterogeneity benefit a ground-nesting bird in a fire-prone ecosystem.