Where does the legally relevant fasting intention reside?

Kitab al-Sawm: Categories of Fasting and Rules of Intention