01 - In a large mixing bowl, whisk together the all-purpose flour, unsweetened cocoa powder, powdered sugar, and fine sea salt until evenly distributed.
02 - Add the cold cubed butter to the dry mixture. Using a pastry cutter or your fingertips, work the butter into the flour until the mixture resembles coarse crumbs with some pea-sized pieces remaining.
03 - Add the egg yolk and 2 tablespoons of cold water to the mixture. Stir gently until the dough just begins to come together. Add the remaining tablespoon of water if the dough feels too dry and crumbly. Do not overwork.
04 - Shape the dough into a flat disc, wrap tightly in plastic wrap, and refrigerate for at least 30 minutes to firm up the butter and relax the gluten.
05 - On a lightly floured surface, roll the chilled dough out to a circle large enough to fit a 9-inch tart pan with a removable bottom. Gently press the dough into the bottom and up the sides of the pan. Trim any excess overhang. Prick the base all over with a fork and chill for another 15 minutes.
06 - Preheat the oven to 350°F. Line the crust with parchment paper and fill with baking weights or dried beans. Bake for 15 minutes, then carefully remove the weights and parchment. Continue baking for 8 to 10 more minutes until the crust looks dry and set. Let it cool completely in the pan.
07 - Place the finely chopped dark chocolate in a heatproof bowl. Heat the heavy cream in a small saucepan over medium heat until it just begins to simmer around the edges. Immediately pour the hot cream over the chocolate and let it sit undisturbed for 2 minutes to melt the chocolate.
08 - Starting from the center, stir the chocolate and cream mixture slowly in small circles until a smooth, glossy ganache forms. Add the softened butter and vanilla extract, stirring until fully incorporated and silky.
09 - Pour the ganache into the fully cooled tart shell, using an offset spatula to smooth the surface into an even layer.
10 - Scatter the roughly chopped pistachios evenly over the surface of the ganache. Sprinkle lightly with flaky sea salt if desired.
11 - Refrigerate the assembled tart for at least 2 hours, or until the ganache is firm and set throughout.
12 - Remove the tart from the pan and transfer to a serving plate. Dip a sharp knife in hot water and wipe dry before each cut for clean, professional-looking slices.