Molecular engineering of a conjugated polymer as a hole transporting layer for versatile p–i–n perovskite solar cells