This sleek tart looks like it just came from a bakery case. Serve at the end of an elegant dinner.
Make dough: Combine flour, cocoa, sugar, and salt in the bowl of a stand mixer. Add butter. Using the paddle attachment, mix on low speed until butter is smaller than pea-size but not totally crumbly. Whisk egg yolk, cream, and vanilla in a small bowl and add to flour mixture. Blend just until dough comes together and is smooth. Do not overmix--otherwise it will be tough.
Form dough into a disk. Wrap in plastic wrap and chill at least 2 hours and up to 4 days.
Make chocolate custard: Heat milk and cream in a medium saucepan over medium heat until it begins to simmer. Meanwhile, whisk yolks and sugar in a medium bowl. Whisk in cornstarch, cocoa, and salt. Slowly whisk milk mixture into yolks, adding about 1/2 cup at a time. Pour mixture back to pan and cook, whisking constantly, until as thick as pudding, about 4 minutes. Pour custard through a strainer into a clean bowl. Stir in melted chocolate.
Lay a piece of plastic wrap against surface of custard to prevent a skin from forming. Chill until cold, at least 3 hours and up to 4 days.
Form and bake tart shell: Preheat oven to 375°. Roll dough out on a lightly floured surface until about 1/4 in. thick or slightly thicker. Roll dough onto rolling pin, and then unroll over a 4- by 13-in. rectangular tart pan with removable bottom. Press dough flush against bottom of pan, into bottom corners, and lastly up sides of pan. Use your thumb to brush dough even with edge of pan. If you have any cracks or holes, patch with extra dough from the edges.
Lay a piece of parchment over dough, cutting to fit as needed. Fill parchment with baking beans or pie weights.
Bake tart shell until fragrant and dry around edges, about 15 min. Carefully remove parchment with beans. Return shell to oven and bake until center of dough looks very dry and you can't make a mark in the dough with your fingernail, 15 to 20 minutes more (slightly overbaked is better than underbaked). Let cool completely, then remove pan rim by setting tart on a couple of cans and letting the rim fall away. Carefully transfer shell, still resting on pan's bottom, to a serving plate.
Assemble tart: Whisk cold custard to smoothen it. Spread or pipe custard into tart shell and top with rows of fresh raspberries.