A biologist studied shell colour in two populations of the snail Cepaea nemoralis. Shell colour is controlled by a single gene with multiple alleles. In Population A, the snails live in woodland with mixed leaf litter, where intermediate colours are best camouflaged from predators. In Population B, the snails live on a rocky shore with two distinct backgrounds: light-coloured rocks and dark-coloured rocks, where extreme colours (very light or very dark) are best camouflaged.
The table shows the number of snails in each shell colour category before and after a period of intense predation.
| Shell colour | Population A initial | Population A after predation | Population B initial | Population B after predation |
|---|---|---|---|---|
| Very light | 20 | 10 | 20 | 35 |
| Light | 30 | 25 | 30 | 15 |
| Medium | 40 | 50 | 40 | 20 |
| Dark | 30 | 25 | 30 | 15 |
| Very dark | 20 | 10 | 20 | 35 |
Describe the types of natural selection occurring in each population, and explain how each type affects the allele frequencies and the range of phenotypes in the population.