All XANES spectra were collected at beamline B18 (Diamond Light Source, Harwell, UK) equipped with a Si (111) double-crystal monochromator. The measurements were performed in transmission mode for Mn and Se K-edges and in fluorescence mode for the S K-edge. For measurements in transmission mode, 10-20 mg of the powder samples were diluted in ca. 100 mg of dried microcrystalline cellulose, pressed into 13 mm pellets, and enclosed in aluminised polythene bags under inert atmosphere For fluorescence mode, powder samples were sprinkled on carbon tapes and samples transferred from the preparation glove box to a He-filled experimental chamber using a vacuum suitcase system specifically designed for the B18 tender X-ray endstation. For Mn and Se K edges, samples were enclosed in aluminised polythene bags under inert atmosphere. In both cases, their spectra were recorded without opening the polythene bags to prevent air exposure. Mn and Se Kedge spectra were calibrated respectively against the Mn K-edge and Pt L2-edge of elemental metal foils placed in the reference channel. Data processing, calibration and normalisation were carried out using the Athena software package.