  We revisit the distant future of the Sun and the solar system, based on
stellar models computed with a thoroughly tested evolution code. For the solar
giant stages, mass-loss by the cool (but not dust-driven) wind is considered in
detail. Using the new and well-calibrated mass-loss formula of Schroder & Cuntz
(2005, 2007), we find that the mass lost by the Sun as an RGB giant (0.332
M_Sun, 7.59 Gy from now) potentially gives planet Earth a significant orbital
expansion, inversely proportional to the remaining solar mass.
  According to these solar evolution models, the closest encounter of planet
Earth with the solar cool giant photosphere will occur during the tip-RGB
phase. During this critical episode, for each time-step of the evolution model,
we consider the loss of orbital angular momentum suffered by planet Earth from
tidal interaction with the giant Sun, as well as dynamical drag in the lower
chromosphere. We find that planet Earth will not be able to escape engulfment,
despite the positive effect of solar mass-loss. In order to survive the solar
tip-RGB phase, any hypothetical planet would require a present-day minimum
orbital radius of about 1.15 AU.
  Furthermore, our solar evolution models with detailed mass-loss description
predict that the resulting tip-AGB giant will not reach its tip-RGB size. The
main reason is the more significant amount of mass lost already in the RGB
phase of the Sun. Hence, the tip-AGB luminosity will come short of driving a
final, dust-driven superwind, and there will be no regular solar planetary
nebula (PN). But a last thermal pulse may produce a circumstellar (CS) shell
similar to, but rather smaller than, that of the peculiar PN IC 2149 with an
estimated total CS shell mass of just a few hundredths of a solar mass.
