Chancellor restores headroom amid risky outlook