Modulating the mechanism of electrocatalytic CO2 reduction by cobalt phthalocyanine through polymer coordination and encapsulation