The next US president will have to address citizens' economic grievances without sacrificing the openness and diversity that has long fueled America's success. But domestic concerns cannot overwhelm foreign-policy imperatives like bringing North Korea to heel.