Stanford-led team reveals nanoscale secrets of rechargeable batteries