FICA tax does not affect federal or state income tax.
Various pre-tax amounts (HSA, 401k, employer-provided health insurance, etc.) can affect both federal and state income tax.
State tax goes on the state tax return. Only if you itemize on the federal return might your state tax affect your federal tax.
Might be worth going line by line through your most recent
https://www.irs.gov/pub/irs-pdf/f1040.pdf and analogous state return so you understand why each line/box has the value it does.
The
Case Study Spreadsheet will display the formulas used for each cell, so you might compare those with the official form instructions. Some comparisons will be straightforward, while some - due to this being Excel and trying to accommodate various situations, with all that entails - may be harder to decipher in the spreadsheet than in the IRS instructions.
It would be interesting to hear how it goes if you do try the line-by-line analysis of your most recent return.