Re: paint first? trimwork first? floors first?
Pull carpet, install trim, paint, install floor.
Pulling the carpet will allow the painting to be done all the way to the floor before the new flooring is installed. Installing any trim and doing any wall repair before paint. New paint covers new trim and wall patches. Installing flooring last will prevent the need for drop cloths or being overly careful. After the new floor is installed, you may have a little touch-up to do, no big deal.
I suffer from CDO ... Its like OCD, but in alphabetical order, LIKE IT SHOULD BE!!!