Beijing has been swamped for days in a beige-gray miasma of smog, bringing coughs and rasping, hospitals crowded from respiratory ailments, a midday sky so dim that it could pass for evening, and head-shaking disgust from residents who had hoped the city was over the worst of its chronic pollution.