Unified picture of anionic redox in Li/Na-ion batteries