  The census of heavy elements (metals) produced by all stars through cosmic
times up to present-day is limited to ~50%; of these only half are still found
within their parent galaxy. The majority of metals is expelled from galaxies
into the circumgalactic (or even more distant, intergalactic) space by powerful
galactic winds, leaving unpleasant uncertainty on the amount, thermal
properties and distribution of these key chemical species. These dispersed
metals unavoidably absorb soft X-ray photons from distant sources. We show that
their integrated contribution can be detected in the form of increasing X-ray
absorption with distance, for all kinds of high-energy cosmic sources. Based on
extensive cosmological simulations, we assess that $\sim$ 10\% of all cosmic
metals reside in the intergalactic medium. Most of the X-ray absorption arises
instead from a few discrete structures along the line of sight. These extended
structures, possibly pin-pointing galaxy groups, contain million degree,
metal-enriched gas, 100-1,000 times denser than the cosmic mean. An additional
~10% of cosmic metals could reside in this phase.
