  We report on the construction of a factorization theorem for the contribution
of the electromagnetic dipole operator ${\cal O}_7$ to the $\bar B_s \to
\mu^+\mu^-$ decay amplitude. The leading-order contribution from a QED box
diagram features a double-logarithmic enhancement associated to the different
rapidities of the light quark in the $\bar B_s$-meson and the energetic muons
in the final state. We analyse the cancellation of the related endpoint
divergences appearing in individual momentum regions, and show how the rapidity
logarithms can be isolated by suitable subtractions applied to the
corresponding bare factorization theorem. This allows us to include in a
straightforward manner the QCD corrections arising from the
renormalization-group running of the hard matching coefficient, the
hard-collinear scattering kernel, and the $\bar B_s$-meson distribution
amplitude.
