How China scrambled to counter Trump shock