Rare-earth geochemistry of phosphorites