Why Are Fewer Women than Men Elected? Gender and the Dynamics of Candidate Selection