Through a chance horizontal gene transfer, ferns acquired a light sensor that allowed them to survive in low light.