  We combine state-of-the-art models for the production of stellar radiation
and its transfer through the interstellar medium (ISM) to investigate
ultraviolet-line diagnostics of stars, the ionized and the neutral ISM in
star-forming galaxies. We start by assessing the reliability of our stellar
population synthesis modelling by fitting absorption-line indices in the
ISM-free ultraviolet spectra of 10 Large-Magellanic-Cloud clusters. In doing
so, we find that neglecting stochastic sampling of the stellar initial mass
function in these young ($\sim10$-100 Myr), low-mass clusters affects
negligibly ultraviolet-based age and metallicity estimates but can lead to
significant overestimates of stellar mass. Then, we proceed and develop a
simple approach, based on an idealized description of the main features of the
ISM, to compute in a physically consistent way the combined influence of
nebular emission and interstellar absorption on ultraviolet spectra of
star-forming galaxies. Our model accounts for the transfer of radiation through
the ionized interiors and outer neutral envelopes of short-lived stellar birth
clouds, as well as for radiative transfer through a diffuse intercloud medium.
We use this approach to explore the entangled signatures of stars, the ionized
and the neutral ISM in ultraviolet spectra of star-forming galaxies. We find
that, aside from a few notable exceptions, most standard ultraviolet indices
defined in the spectra of ISM-free stellar populations are prone to significant
contamination by the ISM, which increases with metallicity. We also identify
several nebular-emission and interstellar-absorption features, which stand out
as particularly clean tracers of the different phases of the ISM.
