01 - In a large mixing bowl, whisk together the all-purpose flour, cocoa powder, powdered sugar, and fine sea salt until evenly distributed.
02 - Add the cold, cubed butter to the flour mixture. Using a pastry cutter or your fingertips, work the butter into the dry ingredients until the mixture resembles coarse crumbs with a few pea-sized pieces remaining.
03 - Add the egg yolk and 2 tablespoons of cold water to the crumb mixture. Gently mix until the dough just comes together, adding the remaining tablespoon of water only if the dough feels too dry and crumbly.
04 - Shape the dough into a flat disc, wrap it 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 out the chilled dough to a circle about 11 inches in diameter. Carefully transfer it into a 9-inch tart pan with a removable bottom. Press the dough evenly into the corners and up the sides, then 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 chilled crust with parchment paper and fill it with baking weights or dried beans. Bake for 15 minutes, then carefully remove the weights and parchment. Return the crust to the oven and bake for 8 to 10 more minutes until the surface looks dry and set. Let it cool completely in the pan.
07 - Place the finely chopped dark chocolate in a heatproof bowl. In a small saucepan, heat the heavy cream 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. Stir gently from the center outward until the mixture is completely smooth and glossy. Mix in the softened butter and vanilla extract until fully incorporated.
08 - Pour the ganache into the fully cooled tart shell, smoothing the top with an offset spatula. Sprinkle the chopped pistachios evenly over the surface and finish with a light pinch of flaky sea salt if desired.
09 - Refrigerate the tart for at least 2 hours, or until the ganache is firmly set. To serve, remove the tart from the pan and slice with a hot, clean knife for neat, sharp edges.