01 - In a large mixing bowl, whisk together the all-purpose flour, cocoa powder, powdered sugar, and fine sea salt until evenly blended.
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 some pea-sized pieces remaining.
03 - Add the egg yolk and 2 tablespoons of cold water. Mix gently until the dough just begins to come together. If the dough feels too dry, add the remaining tablespoon of water. Shape into a flat disc, wrap tightly in plastic wrap, and refrigerate for at least 30 minutes.
04 - On a lightly floured surface, roll the chilled dough out to a 12-inch circle. Carefully transfer it into a 9-inch tart pan with a removable bottom. Press the dough firmly into the corners and up the sides. Trim any overhanging edges and prick the base all over with a fork. Refrigerate for 15 minutes.
05 - Preheat oven to 350°F. Line the chilled tart shell with parchment paper and fill with baking weights or dried beans. Bake for 15 minutes, then remove the weights and parchment. Continue baking for 8 to 10 more minutes until the crust looks dry and set. Let cool completely in the pan.
06 - 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. Remove from heat immediately and pour the hot cream over the chocolate. Let stand for 2 minutes to melt, then stir gently from the center outward until smooth and glossy.
07 - Add the softened butter and vanilla extract to the ganache. Stir until fully incorporated and the mixture has a silky, uniform sheen.
08 - Pour the ganache into the fully cooled tart shell, spreading it into an even layer with an offset spatula.
09 - Scatter the chopped pistachios evenly over the surface of the ganache. Sprinkle lightly with flaky sea salt if desired.
10 - Refrigerate the tart for at least 2 hours until the ganache is firmly set. To serve, remove the tart from the pan and slice with a hot, dry knife for clean, sharp edges. Wipe the blade between cuts.