Timing of meristem initiation and maintenance determines the morphology of fern gametophytes.