Popularity shocks and political selection