How can I align a gradient with a rotated shape?

Thank you, @Mathemensch, for the thorough explanation.
Scaling the stops works well to shrink the gradient.
However, at other angles (e.g., 30deg), the results don’t align. I believe the gradient angle must also be recomputed relative to the new full width.