Cadmium in Cacao: ‘From Soil to Bar’ the Journey of Cadmium at a Farm Level

Cadmium (Cd) is a non-nutritive element present across the earth. In cacao crops from South America, Cd has become one of the biggest challenges due to its ux from soils, and due to the enriched content of this metal, it makes its way into the beans and nally affects the chocolate quality. This manuscript aims to show how the ux of Cd occurs, from the soil to the post-harvest phase and chocolate production, by analysing the possible inputs to the system in a single farm assessed as a model for enriched-Cd status. This study shows that both geogenic and anthropogenic activities have an incidence on the nal Cd content in chocolate, especially with respect to soil properties, fertiliser applications, post-harvest treatments and chocolate production. laminar ow work bench. Seeds were rinsed in 70 % ethanol for 1 min in order to exclude any remaining microorganisms on the surfaces of the seeds. Two trials of TUCC were run using independently two fermentation by-products as experienced in a spontaneous fermentation: acetic acid (TUCC-AA) (CH (cid:0) COOH, 100 %, Merck, Darmstadt, Germany), and lactic acid (TUCC-AL) (C 3 H 6 O 3 , 98 %, Merck, Darmstadt, Germany) that were used as incubation media to investigate the effect of pH on the cadmium concentration in the seeds. Both, TUCC-AA and TUCC-LA carried out in triplicate. TUCC was carried out in 36 of 500 ml Erlenmeyers. 45 cocoa seeds were placed in such glass asks containing 280 ml of the incubation media. The incubation media contained acetic acid or lactic acid at 30 g/L. The glass asks were placed in incubators under shaking at 200 rpm. The incubation temperature was adjusted to 30°C on day one, 35°C on day two, 45°C until the end of the process. The pH was measured from each replica every 24 h. Ten g of cocoa seeds were collected from the six Erlenmeyers and stored at − 20°C until analysis.

The soil parameters above represent a picture of the complexity of soil management in the case of cacao crops. Nevertheless, in addition to these factors, fertiliser application can in uence Cd phytoavailability when contaminated with this heavy metal. Regular fertiliser application could also be a key factor in bioavailability, acting as a long-term anthropogenic source of contamination and affecting both soil pH and ionic ligand interactions 14 with the biota in the soil solution. Hence, fertilisation, mainly in P-like and NPK-like forms, might in uence Cd speciation and complexation, thus increasing the mobility of the available Cd from the soils into the cacao roots.

Cocoa in the post-harvest phase
The type of post-harvest transformation of cocoa from seeds (fresh material removed from the pods) to beans (fermented and dried cocoa) along with the transformation of beans into nibs signi cantly in uences the quality of the nal product such as chocolate. This is due to the biochemical reactions involved due to the mass and heat transfer phenomena occurring inside the seeds during fermentation as well as the effects of drying and roasting 19 . It is possible to describe the seeds' transformation into chocolate in terms of two main steps: From seeds to beans: During seed fermentation, the temperature rises from 28 to 50°C, and the pH drops from 6.5 to 4.5 units. Interestingly, this is due to the microbial succession of yeasts and bacteria during the fermentation of the cocoa beans 20 , where yeasts, lactic acid and acetic acid bacteria are the main populations interacting in diauxic metabolic ratios. During this process, 40 % of seed weight is lost to evaporation due to the liquefaction of the seed mucilage. Another 30 % of weight is lost through drying 21 .
From beans to chocolate: During roasting, the beans are processed at temperatures ranging between 110 to 160°C and a time duration between 5 to 120 minutes 22 .
Despite the importance of the post-harvest and processing stages with respect to cocoa quality, there has been little research 23 assessing how artisanal, non-techni ed post-harvest operations, might reduce the bean' Cd content. Some studies have noted Cd decreases comparing fresh whole seeds and fermented dried testa 21 , as well as derived products such as cocoa powder and chocolate; in such cases, a relationship has been established between Cd content, single-origin cacao and genotypes 7,21,24−26 . The ndings from a previous study 21 indicate that there is a higher Cd content in the testa (1.83 mg/kg on average) than in the cotyledon (0.88 mg/kg on average), with considerable variation in the genetic material 21 . This nal aspect in the post-harvest operation in uences the Cd values of chocolate within the range of 0.004-3.15 mg/kg 24 .
Therefore, the aim of this study was to analyse the Cd ux using cacao from a single farm by considering the in uence of i. soil parameters, ii. fertiliser amendments and iii. post-harvest operating processes. The study describes the movement of Cd from soil to beans to fermented beans to chocolate, in a single process.

Soil cadmium content and distribution
The farm was located in the municipality of San Vicente de Chucurí in Santander, a cacao producing district of Colombia. The farm was found to have a high pseudo-total soil Cd content (3.50 mg/kg). Regarding pseudo-total soil Cd per soil boundary, according to the resistivities found at the same pit pro les, higher values were found at boundaries A (ranging in soil depth from 0-20 cm) and B (ranging in soil depth from 21-72 cm), with average Cd values of 1.37 ± 0.4 and 2.38 ± 0.3 mg/kg, respectively. According to the 2D-ERT technique (Fig. 1a), the resistivities ranging from 950-1000 Ω × m were related to Cd content at the same boundaries. Therefore, the A and B boundaries were more related to Cd content in the soil pro les in that farm rather than other boundaries. Other farms from the municipality of El Carmen de Chucurí, allocation area dedicated to cacao production near to the assessed farm, have shown similar patterns of subsoil Cd distribution at the A and B boundaries, with average Cd values of 1.92 ± 1 and 3.24 ± 0.5 mg/kg, respectively.
The apparent resistivity ranging from 900-1270 Ω × m was related to a high concentration of rock geomorphs at the C bottom boundary (ranging from 75-100 cm in soil depth). For instance, a resistivity of 926 Ω × m was found speci cally at 0.437 m of soil depth. These data were highly correlated with the reference material used in the calibration curve of resistivity 9 . The results of the 2D-ERT technique were con rmed by the exploration in trial pits and by performing an XRD analysis of rock material found at the C boundary, probing the existence of otavite (see Fig. 1c). However, it is not clear whether Cd is primarily favoured for secondary carbonate bioprecipitation (otavite) rather than other mineral forms biologically induced, such as uorapatite, greenockite or hawleyite. The resistivity above 2000 Ω × m was related to the high-density rock material and high clay content in the assessed farm.
Indeed, a segregated patchy distribution of rock material with a resistivity ranging from 850-950 Ω × m was observed across the second section line (inverse model resistivity tomogram, Fig. 1b). This prospected line exhibited high SOM content with fragmented solid-state phase rocks, and rock formation was observed from underground through to the surface (1.21 m soil depth, as shown in the tomography of Fig. 1c). Thus, it is important to highlight that the 2D-ERT plot shows that, even at the same farm, the distribution of Cd in rock material in the subsoil is highly patchy and greatly heterogenous, as observed in other farms nearby. However, its distribution could be driven by outcropping rock material and ligand dynamics due to changes in climatic conditions such as wet or dry seasons and rock bio weathering, as previously reported 5,27 . Table 2 summarises the mean soil pseudo-total Cd content with resistivity tomography results at three sampling sites of the cropped farm and includes the determined soil pH and SOM values. The Pearson correlation between resistivity pro ling and Cd determination by ICP-OES was high (R 2 = 0.86) considering the eld data. The pH after fertiliser application had decreased since P made ligands with the H 2 + protons available in the soil solution, as has been also observed in other studies 28,29 .

Phosphate-containing fertilisers
It was found that two out of four phosphate-based fertilisers leached out Cd in greater levels (ranging from 3-30 mg/kg). One fertiliser of a national brand (called 'Triple 15') was shown to have 3.68 mg/kg of Cd, whereas an international one (called '12M 15-8-12') was shown to have 29.9 mg/kg of this metal. Table 2 shows the distribution of soil P after fertilisation. Even if there is not actually a nationwide regulation for admissible Cd content or a regulation for advertising information of heavy metal content within the product label, the study of polluted fertiliser with Cd to avoid such input in the system should be taken into account to tackle this issue. Figure 2 shows the dynamics of Cd concentration from seeds to beans and chocolate, stage by stage of its transformation. The Cd content from seeds to beans did not vary with any statistically signi cant difference (p > 0.05). The Cd content detected in those treatments showed an average value of 4.17 ± 0.8 mg/kg. Similar results were found when several spontaneous fermentations SF were carried out in other cacao-growing regions, following the same procedure and with their particular mix of cocoa varieties (See supplementary material in Table S1 and Figure S3). Figure 3 shows the changes in pH and temperature during the post-harvest transformation of cocoa seeds according to the spontaneous fermentation (SF) and transformation under controlled conditions (TUCC) treatments. It is known that SF involves two transformation phases. The rst corresponds to an anaerobic phase. In this phase, pectinolytic yeasts produce ethanol. Yeast populations are responsible for liquefying the mucilage, which causes pulp drainage (release by sweating) that comes out from the fermented system and allowing for the entry of oxygen into the fermented mass 30 . The temperature increases slowly along with the exothermal activities of yeasts and bacteria 20 . LAB use citric acid and the residual carbohydrates of the mucilage to produce lactic acid and acetic acid. The second phase corresponds to an aerobic phase, where the predominant microorganisms are acetic acid bacteria (AAB), which are involved in both ethanol and lactic acid oxidations to produce acetic acid 30 . During the aerobic phase in SF, the diffusion of ethanol, acetic acid and lactic acid into cocoa seeds occurred, causing a pH decrease from 6.5 to 4.9 inside the seeds (Fig. 3). Furthermore, in such cases, exothermic reactions occur, reaching a temperature near 45°C that favours the activity of endogenous enzymes, resulting in cocoa avour precursors 31 As shown in Fig. 3, during SF, a drop of pH was observed between 0 and 72 h. Then, it remained constant until 96 h, however, increased in the last hours near to 5.5. The temperature reached 46°C between 72 h and 96 h; however, after 96 h, the temperature was stable at 45°C. Thus, the increase of pH values and the decrease of temperature can be explained by the activity of both the AAB and LAB populations. This inverse relationship was followed by a decreasing substrate availability and, consequently, the acidic metabolites that should migrate inside the seeds were not generated, as described previously 32 .

Effects of post-harvest treatments on Cd concentration
To assess whether a stronger decrease in seed pH over time has an effect on Cd concentration, this variable was analysed using the TUCC treatment with two weak acids, acetic and lactic acid, using a temperature gradient along the process. In Fig. 3, it was observed that the pH decreased from 6.5 to 4.5 in both treatments between 0-72 h of fermentation; however, after 120 h, a second pH decrease was observed reaching 4.4 and 4.0 units in the TUCC-AA and TUCC-LA treatments, respectively. Hence, in these results the postharvest process established more acidic pH conditions for seed transformation.
In both the SF and TUCC treatments, despite the observed dynamics, there was no statistically signi cant variance (p > 0.05) in Cd content of the seeds. These results are not in concordance with those reported in a recent work 33 , where the migration of Cd from the seeds to the testa was observed when the seed pH dropped below 5, and the acidic pH was determined to have resulted from a longer fermentation time (up to seven days). In contrast, as shown in Fig. 3, although a pH value < 5.0 was reached between 72 and 96 h for the SF treatment, a decrease in Cd content was not observed in the seeds at all. Additionally, when the SF treatment time was prolonged, the pH increased again; thus, the hypothesis of a recent study 33 which argued that a pH < 5 and extending the fermentation more than seven days, will favour the Cd migration during fermentation, is not supported by our study. The same pH kinetic decrease of the values until 72 hours and then increasing were observed in several fermentation trials performed into other regions (See the Supplementary Figure S3). Conversely, long fermentation times may cause overfermentation, blackening of the cocoa seeds and the development of off-avours caused by bacilli and lamentous fungi related to saprophytic activity 32 . Otherwise, the strongest and most sustained drop in pH over time was found when performing the cocoa transformation process with the assessed acids within the TUCC treatment, but it did not cause a lower concentration of Cd in the cocoa seeds at day 5 of fermentation even with pH values below 4.5.
The effect of drying on Cd seed content was studied here. This was assessed on unfermented seeds to evaluate the direct effect of drying, and a sample of previously fermented cocoa seeds were evaluated for the possible effect of endogenous bacterial populations that had participated in the process. There was no statistically signi cant variation (p > 0.05) in the Cd content of those samples.
When processing cocoa beans into chocolate, looking at the mass balance, even if the cocoa content varies from step to step of processing, the Cd content did not. During cocoa transformation from beans to nibs, especially in the roasting and deshelling operations, Cd contents of 3.28 and 6.57 mg/kg were observed in the nibs and testa, respectively. Therefore, our data suggest that the Cd content in the testa was signi cantly higher than in the nibs (p < 0.05). Similar ndings were observed in another study 21 .
When the Cd content was assessed through the transformation of nibs into chocolate, made with 50 % (w/w) of nibs, it was found that chocolate exhibited a Cd content of 1.60 mg/kg, which is, as expected, almost 50 % of the reported Cd value in nibs before. Thus, the decrease of Cd content is due to the chocolate making process, speci cally, by the percentage of nibs used in this process (50 %) in its total mass balance. These results are similar to those of a recent study 24 , where it is stated that Cd contents in chocolate are closely related to the percent of cocoa solids and cacao origin, highlighting that chocolates from Central and South America usually tend to have higher contents of this metal than those from elsewhere. Furthermore, our results support the perception that lower Cd concentrations in the nal product are the result of winnowing the testa 34 , which have no utility for chocolate production.
3. Discussion Figure 4 shows the change of Cd content from both soil/fertiliser application to post-harvesting/chocolate production, in a single farm with Cd issues. Despite the fact that the Cd content found in the chocolate of this farm was above the mandatory regulated level approved by the Codex Alimentarius 35 , an integration of innovative remediation methods, from soils to chocolate, could be designed.
Our ndings indicate that no process, either physical (pH, temperature or oxygen concentration) or chemical (enzymatic and catalytic reactions) that occur during the post-harvest transformation of cocoa seeds to beans and chocolate, help to decrease Cd content in cocoa beans. Thus, a window for microbiological evaluations is open to follow up in further studies.
Over the past two years, more research has been focusing on reducing higher Cd contents in both soils and crop management but also in the postharvest state by using several approaches without decreasing chocolate quality. The bioremediation processes, i.e., by bioaugmentation of both soil Cd-tolerant bacterial (CdtB) and cocoa bean endophytic bacterial populations (ECdtB), could remove Cd in several steps of the cacao system 5 .
Further research should be conducted to tackle the origin and distribution of Cd in soils in consideration of soil chemistry and fertiliser input, as well as, the importance of the cacao variety used in farms, the age the trees and crop losses and management 36 in the function of Cd uxes through the system. Knowledge about difference in the translocation and bioaccumulation rate in cacao varieties is scarce, showing that more physiological and agroforestry studies are also required. Moreover, future studies should focus on designing and developing post-harvest treatments including bioremediation or the use of nanoparticles (i.e. Ag-NPs) to chelate Cd content at the very last stages for chocolate production to avoid losses in quality while still maintaining its safety, complying to cadmium threshold.
The presence of Cd in cacao plantations is a challenge. However, there are now opportunities to understand how it uxes through the system. The biogeochemistry of the system has the in uence of exerting a nal deposition of Cd in beans or chocolate. Even so, if it is the starting point of the system, it is not the only one. The contamination by Cd is due, in part, to the low buffering capacity of acidic tropical soils whereas cacao is cropped. Therefore, higher levels of Cd are also related to soil acidi cation (the value of 2.38 mg/kg should be considered as contaminated in soils), as observed in cases of low pH values such as these found in the assessed farm, from 4.7 to 4.9, where Cd is more active chemically and therefore available for cacao uptake. Under acidic conditions, the electronegative property of Cd allows for the metal to be very labile in the system, increasing the translocation ratios as we observed in the case of Cd content in cocoa seeds or beans in this particular farm (where soil/bean ratios above 1 mg/kg are considered high). In comparison with other elements such as Pb, Cd is much more labile, as has been described.
Reducing the available Cd in chemical species such as Cd hydroxides, Cd carbonates or even Cd sulphates by increasing soil pH values is a rst step to suggest for this farm. As shown, the Cd content of P-based fertilisers is a second input in the system. The nal disposition of this input is re ected in the Cd beans as a function of bioaccumulation.
In this study, no signi cant changes were observed following a variety of post-harvest and processing treatments that allow the physical and biochemical transformation of the seeds to beans and to chocolate. However, peeling the testa decreases the Cd content of nibs and it was shown to be the most likelihood short-term strategy to reducing it. Therefore, performing an integrative diagnosis of Cd is a critical component in managing Cd content through the system. The picture shown here of a single farm suggests that by using the biology of the system (mainly using CdtB and ECdtB), the chemical speciation of Cd in the soils might change, with a decreasing effect of nal deposition in beans and favouring the sequestering of Cd in geostable forms into the soil. By performing a detailed diagnosis of the system, a sound strategy could be properly designed to change the Cd content of enriched farms.

Selecting the farm
A farm in the district of Santander was selected due to i. the economic and social importance of cocoa in the district; ii. the known problem of cadmium in the cocoa-chocolate value chain in Santander iii. the diversity of the cocoa materials produced in Santander, comprising both international materials such as CCN51, EET8, IMC67, ICS1, ICS95, TSH565 and ICS60, and regional materials such as TCS01, TCS06, FEC2 and FSV41; iv. Record of the highest soil Cd content found in the district 9 and v. the appropriate level of technology in terms of methods and systems for post-harvest based on the processing criteria to obtain high quality cocoa products 37 .
The farm comprised an intercropping system of cacao trees separated from one another by 4 m, interspersed with two timber wood species (Ceiba tolua and Cedrus brevifolia). The cacao trees were eight years old in average to all the varieties found. Five kilos of fresh cacao pods and 500 g of composite soil samples were collected one month after pruning.

Soil Cd distribution and quantitation: From soils to cocoa seeds
Soil Cd distribution was monitored using an electrical resistivity tomography (2D-ERT) pro ling in order to obtain an initial image of possible hotspots of Cd in the rhizospheric soil. The technique was performed according to the speci cations in a previous study 9 , using Cd carbonate and Cd sulphate as soluble and insoluble sources of cadmium, respectively. The plot of soil where the resistivity tomography was assessed, was representative of the farm since the topography and the stratigraphy data did not showed representative differences (p-value < 0.05). The resistivity pro les were used to excavate soil trial pits, from which soil samples were taken at each soil boundary related to the cacao rhizosphere. The 2D-ERT pro les were obtained after a calibration test for the soil samples collected all across the plot selected. To calibrate the resistivity of cadmium-like compounds, three commercial reference reagents were used during the calibration of the technique as a proxy for the stable Cd forms that might be found in eld. The references were otavite, greenockite and sphalerite in three concentrations (0. Soil Cd content was quanti ed using an inducted conductive plasma spectrometer ICP-OES (Thermo ICAP-6500, ThermoFisher Scienti c Inc., NY, USA) using the methodology previously described 5 . Cd content was determined at each boundary and spot selected according to the 2D-ERT pro les. The spectrometric determinations were carried out in replicates, and the standard deviations are shown graphically as vertical bars. To compare with the soil samples collected, a standard reagent of clay soil WEPAL ISE 961 (0.8 mg/kg Cd; Herveld, The Netherlands) and a clay soil WEPAL ISE970 (7.04 mg/kg Cd; River clay from Netherlands), were used and a standard curve of calibration was performed.

Soil pH and SOM determination
Soil pH [H2O] was measured with a multi-parameter electrode (YSI 556 OH, US) at each boundary of the rhizoplane pits. Soil organic matter (SOM) and phosphorus content were determined by atomic absortion spectrometry (IAA) using the digestion protocol applied in a previous study 5 .

Assessing fertiliser amendments
A pool of 13 phosphate-containing fertilisers were selected to be analysed for Cd content. The fertilisers were selected by taking into account the farmers' preferences for application. This is important in order to perform a good diagnosis of the reliable Cd inputs. Five commercial brands belonged to international companies, and two local produced brands within the national market were tested for Cd. The digestion method and determinations were performed according to the international EPA method 6010C, as reported in previous studies 38,39 .

Post-harvest treatments: From seeds to beans and to chocolate
In terms of analysing the different possibilities of Cd ux depending on the postharvest operation in uence, we submitted the same batch of fresh seeds to the three possibilities of kind of postharvest transformation processes (Fig. 5), using three experimental conditions i. Two operations were assessed between the transformation from seeds to beans based on previous work 19 , on the one hand, a natural spontaneous fermentation process (SF); and on the other hand, a transformation under controlled conditions using acidic solutions. This latter treatment was used to evaluate the effect of pH on the Cd content of seeds when they were subjected to more acidic conditions. ii. Only drying, and iii. during the processing of the nibs into chocolate, where roasting was considered. Table 1 shows the samples derived from the treatments previously de ned.

Spontaneous fermentation (SF)
A trial of SF was developed in the selected farm for the above -mentioned mix of cocoa materials (Supplementary Figure S1). Only mature and healthy pods were selected for this trial. The pods were harvested, and seeds were removed. Fifty kg of fresh seeds from a mix of cocoa material were placed in each of 6 compartments of the wooden fermenter shown in Fig. 6. This fermenter system allowed to establish 6 fermentations as repetitions of the assay. Any contact with the steel nails was avoided, ensuring no interference with the Cd determination in the seed matrix. The SF lasted 120 h, and the anaerobic phase was maintained for 48 h. The aeration of the beans was performed manually every 12 h by moving them from one compartment to another. The cut test was carried out every 24 hours to measure the fermentation degree of cocoa seeds. The internal temperature of the cocoa mass at the central point of each compartment of the fermenter system was monitored throughout the fermentation time with a thermocouple (Testo-735-1). The internal seed pH was determined by applying a protocol established in another study 40 . For this, rst the testa of the seed was removed and then the seed was ground with a blade grinder. Furthermore, 2.5 g of ground material was suspended in 22.5 mL MilliQ water in 50 mL centrifuge tubes and shaken head -over -head for 5 min. The suspension was centrifuged at 1000 rpm for 10 min, and the pellet was discarded. A pH meter (Mettler Toledo, Giessen, Germany) was used to measure the pH of the supernatant.

Transformation under controlled conditions (TUCC) using acidic solutions: acetic acid and lactic acid
The TUCC treatment was developed according to the protocol reported by Santander et al., 2020 In prep. This is a process by which the cocoa seeds from the mix of cacao materials mentioned above, were transformed through the simulation of the conditions of SF occurring on the eld (Supplementary Figure S2). The TUCC process was developed under sterile conditions, for this, all equipment used was autoclaved or wiped with 70% ethanol. One kg of fresh seeds of the mix of cocoa materials were de-pulped using sterilised plastic mesh pads under inside a laminar ow work bench. Seeds were rinsed in 70 % ethanol for 1 min in order to exclude any remaining microorganisms on the surfaces of the seeds. Two trials of TUCC were run using independently two fermentation by-products as experienced in a spontaneous fermentation: acetic acid (TUCC-AA) (CH COOH, 100 %, Merck, Darmstadt, Germany), and lactic acid (TUCC-AL) (C 3 H 6 O 3 , 98 %, Merck, Darmstadt, Germany) that were used as incubation media to investigate the effect of pH on the cadmium concentration in the seeds. Both, TUCC-AA and TUCC-LA carried out in triplicate.
TUCC was carried out in 36 of 500 ml Erlenmeyers. 45 cocoa seeds were placed in such glass asks containing 280 ml of the incubation media. The incubation media contained acetic acid or lactic acid at 30 g/L. The glass asks were placed in incubators under shaking at 200 rpm. The incubation temperature was adjusted to 30°C on day one, 35°C on day two, 45°C until the end of the process. The pH was measured from each replica every 24 h. Ten g of cocoa seeds were collected from the six Erlenmeyers and stored at − 20°C until analysis. Table 1 describes the treatments used to evaluate the Cd content of the seeds and beans during the post-harvest processes. In the case of SF, for all Cd analyses, a sample was obtained from a mix of cocoa seeds which was taken from three parts of the fermentation chamber: upper, middle and bottom zone. This sampling method was repeated for each of the six compartments of the fermenter (six replicas for each sample). For fresh seeds and fermented cocoa seeds, six samples of 100 g of seeds were sampled and stored in sterile plastic zip bags at -80°C until further analysis. For the unfermented and only dried cocoa beans, six samples of 100 g of fresh seeds, as replicas, were sampled from the upper, middle, and lower zone of the initial fermentation cocoa mass and placed in a drying system. For chocolate production, 300 g of fermented cocoa seeds from the fth day of each of the six compartments of the wooden fermenter were sampled and dried at 50°C for three days and stored in bags at 25°C. For the TUCC treatment, from each of the three replicas, 30 g of cocoa seeds from fth day of the process were sampled for analysis. The drying operation by sun exposure lasted 120 h. The beans were extended in a drying system composed of a sliding roof and a wooden platform.

Seeds and beans sampling
The end of the drying step was determined when cocoa beans reached an approximated moisture below 7 % (w/w) 41 .

Chocolate production: From beans to bar
Chocolate production was completed in the Chocolate Factory Laboratory of the Institute of Food and Beverage Innovation of the University of Applied Sciences (Zürich, Switzerland) by a standard protocol 42 . The chocolate samples were produced with the 50 % (w/w) of the nibs from the whole cocoa beans.

Cd determination in post-harvested samples
A microwave-assisted acid digestion protocol was applied to the seeds and beans according to the protocol of a previous study 43 with some modi cations. Brie y, the modi cations consisted of using 4 mL of concentrated Suprapur® nitric acid (HNO , 65% w/w, Merck, Darmstadt, Germany) and 1 mL of hydrogen peroxide (H 2 O 2, 30% w/w, Merck, Darmstadt, Germany) together with 0.8 g of sample. The samples were heated in a microwave unit at 1500 W and 220°C for 20 min with a pressure of 150 bars. The digested samples were diluted to 30 mL with nano-pure distilled water and ltered using a 0.45 µm membrane lter prior to the Cd counts.
The content of Cd in the samples was quanti ed by ICP-OES, using the same instrument utilized to perform the Cd determinations for the soil (Thermo iCAP-6500, ThermoFisher Scienti c Inc., NY, USA).
The limit of quanti cation (LOQ) for the ICP-OES analysis was 0.28 mg/kg dry matter. For all Cd analysis, triplicates were included every 15 samples to evaluate reproducibility. The coe cient of variation (CV) for the triplicate digestions ranged 0.9-25% (average CV 7 %). The certi ed reference material WEPAL-IPE-213 Milk Thistle Seed/Silybum marianum (Cd 0.355 ± 0.016 mg/kg) was included in all digestions and treated the same way as the cocoa derived samples for quality assurance. The recoveries of Cd regard to the certi ed reference material was 93 % ± 8.5 for seeds and beans.

Soil
A test for ANOVA was performed in order to compare differences in the means between both soils' Cd contents and the Cd contents of the fresh seeds and fermented and dried beans. A Tukey test was performed to observe the meaningful differences (p < 0.05). A Pearson correlation was calculated for soil resistivity (Ω × m) and soil Cd content (mg/kg) to compare the 2D-ERT pro les with the spectrometric Cd determinations. The Cd content of both the soils and post-harvest treatments were plotted in a single representation. The statistical analysis was performed using QtiPlot.

Post-harvest treatments and Chocolate production
Data were processed using R v. 3.6.0 software and graphs (Cd contents in fermented seeds and pH dynamics from different Colombian regions) were constructed using OriginLab 2015. Cd concentration means and standard errors of the mean were calculated for all samples mentioned in Table 1. To establish signi cant differences among samples derived from the different postharvest treatments (to independently compare, on the one hand, the samples from 1 to 10 and, on the other hand, the samples 10 to 13 of Table 1), F tests were calculated in the ANOVA and then a post-hoc Tukey's HSD (Honestly Signi cant Difference) test was carried out, to identify signi cantly different samples regarding their Cd contents. Statistical signi cance was established at p < 0.05. Table 1.

Declarations
Cocoa seeds postharvest treatments and sampling stages to analyse the dynamics of the cadmium content along of them.  Figure 3 pH and temperature uxes of cacao seeds when using spontaneous (SF) and 'transformation under controlled conditions' (TUCC) treatments, at steady-state conditions. Vertical bars denote standard deviation values. Figure 4