Text this: Gravity from AKSZ-Manin theories in two, three, and four dimensions