Make the dough:
In the bowl of an electric mixer, using the paddle attachment, cream the butter and sugar on medium speed. Beat in the egg yolks, one at a time. Add the vanilla. Add the flour and sea salt and mix until the dough just comes together. Form the dough into a disk, wrap in plastic wrap and chill for at least 1 hour.
Make the frangipane:
In the bowl of an electric mixer, using the paddle attachment, beat the almond paste on medium speed. Alternate adding the butter and confectioners' sugar, a little at a time, and scrape down the sides of the bowl with a rubber spatula frequently; this will help to break up any lumps of almond paste. Beat in the egg and vanilla. When the mixture is light and fluffy, add the flour and sea salt and mix until just combined.
Make the lemon custard:
In a mixing bowl, whisk together the sugar and flour. Whisk in the lemon juice, egg and egg yolks, then the cream and sea salt. Strain through a fine-mesh sieve, stir in the lemon zest and set aside.
Assemble and bake the tart:
Preheat the oven to 375°F.
Tear off small pieces of dough and press them into the sides and bottom of an 8-inch fluted tart pan with a removable bottom. Keep pressing in pieces until the entire pan is covered with a 1/4-inch-thick layer of dough. Bake for 10 to 12 minutes, until the crust is just golden. Remove and let cool.
Spread the bottom of the tart shell with a 1/2-inch-thick layer of frangipane. Return the tart to the oven and bake for another 10 to 15 minutes, until the frangipane is set.
Turn the oven temperature down to 325°F. Sprinkle the raspberries on top of the frangipane. Stir the lemon custard and carefully pour it over the frangipane. Bake the tart until the custard does not wiggle when you gently nudge the pan, about 20 minutes. Remove and cool to room temperature. Serve each piece with a dollop of whipped cream and sprinkle with toasted almonds.
Make Ahead Tips
The dough can be refrigerated, wrapped in plastic, for up to 2 days.The frangipane can be made a few days ahead and refrigerated, covered
Photo: Christopher Hirsheimer