Haha I think this website botches the time zones for me but it does seem like it was early when you posted this!
Anyways, in general, states start with your federal AGI and make a few modifications.
But remember, that's AGI, NOT taxable income. This is important because charitable donations (along with other federal itemized deductions and exemptions) reduce your taxable income, NOT AGI.
Suppose MD does just use your federal AGI. Then MD would have to allow for charitable donations to be tax deductible for you to reduce your state (+ county) taxes with them.