Reaction pathways toward the formation of dolomite