  Dark sectors provide a compelling theoretical framework for thermally
producing sub-GeV dark matter, and motivate an expansive new accelerator and
direct-detection experimental program. We demonstrate the power of constraining
such dark sectors using the measured effective number of neutrino species,
$N_\text{eff}$, from the Cosmic Microwave Background (CMB) and primordial
elemental abundances from Big Bang Nucleosynthesis (BBN). As a concrete
example, we consider a dark matter particle of arbitrary spin that interacts
with the Standard Model via a massive dark photon, accounting for an arbitrary
number of light degrees of freedom in the dark sector. We exclude dark matter
masses below $\sim$ 4 MeV at 95% confidence for all dark matter spins and dark
photon masses. These bounds hold regardless of additional new light, inert
degrees of freedom in the dark sector, and for dark matter-electron scattering
cross sections many orders of magnitude below current experimental constraints.
The strength of these constraints will only continue to improve with future CMB
experiments.
