EDIT: Found the solution with a different Google search than what I tried before and got this. So as I thought, "using UnityEngine.UI;"I is required, but then the variable type is simply Text, not UI.Text.
Hope this answer helps anyone who comes across this issue!
For the record, you could also write out the fully qualified name, as in UnityEngine.UI.Text. It doesn’t make much sense for UI, but I frequently use it when I just want to get a single type, and am not interested in the rest of the namespace.