X-ray absorption fine-structure (XAFS) spectroscopy can assess the chemical speciation of the elements providing their coordination and oxidation state, information generally hidden to other techniques. In the case of trace elements, achieving a good quality XAFS signal poses several challenges, as it requires high photon flux, counting statistics and detector linearity. Here, a new multi-element X-ray fluorescence detector is presented, specifically designed to probe the chemical speciation of trace 3d elements down to the p.p.m. range. The potentialities of the detector are presented through a case study: The speciation of ultra-diluted elements (Fe, Mn and Cr) in geological rocks from a calcareous formation related to the dispersal proce...