Total: 1
The origin of the X-ray plateau phase observed in a large fraction of gamma-ray burst afterglows remains debated. We present a novel analytic framework for the hydrodynamics of ultra-relativistic, radially stratified outflows interacting with an external medium. By explicitly accounting for a continuous distribution of Lorentz factors within the ejecta, we derive analytic expressions describing the evolution of a long-lived, mildly relativistic reverse shock and determine its crossing time. Then, we compute the resulting synchrotron emission from both the forward and reverse shocks. The forward shock naturally produces a shallow, long-lasting X-ray decay consistent with the observed properties of X-ray plateaus (including the Dainotti relation). We further show that reproducing the observed plateau durations requires the stratified ejecta to extend to Lorentz factors of order $\gtrsim 100$, consistent with the ultra-relativistic outflow that powers the prompt $γ$-ray emission. The reverse shock generates a long-lived millimeter emission component that outshines the forward shock emission at these wavelengths. Both the plateau and reverse shock emission terminate smoothly once the slowest ejecta are processed, marking a transition to the standard Blandford-McKee self-similar evolution without requiring late-time energy injection or an additional emission component. Such stratified outflows are expected on physical grounds, as the ultra-relativistic ejecta responsible for the prompt $γ$-ray emission are unlikely to be launched with a single Lorentz factor. This model provides a unified picture in which the same outflow powers the prompt emission, the X-ray plateau, and the subsequent afterglow evolution.