Can a successful, prestigious post-doc make up for a PhD from a mid-ranked university and make you competitive for a tenure-track position?
To my perception, the later you manage to "hit" a high-status place, the better, actually, because the standard pattern is a slight-but-steady ever-lesser-status trend. That is, typically, and statistically so if only for reasons of the available positions of various sorts, one's PhD institution is probably (and on the average, certainly) the highest-status place one will ever be. In particular, one corollary is that high-status post-docs are not typical sequels to high-status PhDs (even though a reason, if no other, is that there aren't as many such positions!)

On the other hand, a higher-status post-doc than PhD assures nothing. A momentary "surprise improvement", with no permanent "advantage".

The more genuine advantage is that, in the best-case scenarios, the high status is due to good, energetic, communicative, stimulating people who will help you do better for the rest of your life than if you'd been in the company of lethargic, disinterested people... though "status" is imperfectly correlated...

And, further, it does require considerable effort on your part to benefit from the potential of the environment... so it is just as easy to fail/languish in a high-status environment as in a low-status one... Perhaps easier, since things are more intimidating, no easy triumphs, etc. Almost to the point of being misleading. (Hence, the desire of some to be big fish in small ponds, etc.)

So, actually, I'd recommend accepting some risks to be in a more intense environment. If that intensity is attached to status, ok, good, that's a cosmetic virtue that will help you get peoples' attention (on hiring committees) subsequently.