Almost analytic models of ultramagnetized neutron star envelopes