From carbon to competition: understanding the ecological causes of phenotypic diversity