Taxable income comes first
Pre-tax deductions come off the top of gross income: 401(k) or 403(b) contributions, HSA and FSA contributions, and the share of health premiums payroll takes before tax. What remains is adjusted gross income, and that is the figure the rest of the calculation works from.
The larger of the standard deduction and your itemized deductions is then subtracted, and the page names which one it used. Only what survives both steps is taxable income, and only taxable income is fed through the brackets. Deductions cannot push taxable income below zero, and a gross income of zero stops the page with a prompt rather than producing a breakdown of nothing.