Near-surface ion distribution and buffer effects during electrochemical reactions.