Line the a 20cm square tin with baking paper and pre-heat oven to 175°C conventional / 160°C fan.
Brown the butter until deep golden. Cool for 10–15 minutes. Whisk in both sugars. Add the egg, yolk and vanilla and whisk until combined.
Combine flour, cornflour, baking powder and salt. Fold into the wet mixture until almost combined, then fold through the chocolate.
Take approximately two-thirds of the dough and press it firmly and evenly into the tin.
Bake for 10–12 minutes. The surface should just be starting to set and lightly colour. Cool for about 10 minutes.
Spoon the cold thick caramel over the base, then crumble the remaining cookie dough irregularly over the caramel. Don’t completely cover it—you want small glimpses of caramel.
Bake for another 23–28 minutes, until the crumble is properly golden but the centre remains slightly soft.
Sprinkle sparingly with flaky salt. Cool completely in the tin before cutting