document is the root handle for everything: query methods (getElementById, querySelector), creation (createElement), the body/head references, cookie, title, and lifecycle (readyState, DOMContentLoaded). Nearly every DHTML operation starts by reaching into document.