The extreme geniality of San Francisco’s economic, intellectual and political climate makes it the most varied and challenging city in the United States.