presence of mind
UK /ˌpɹɛzn̩s əv ˈmaɪnd/US /ˌpɹɛz(ə)ns əv ˈmaɪnd/
noun1
- Focused alertness, good sense, quick-thinking resourcefulness, or stability of feeling and thought, especially in spite of circumstances which are distracting, stressful, or otherwise challenging.