The anomalous atmospheric structure of the strongly magnetic Ap star HD 166473