Brown the butter. Melt the butter in a light-colored skillet or saucepan over medium-low heat. Using a rubber spatula, stir continuously as the butter begins to foam. Continue to stir until the butter turns a rich amber color and gives off a nutty aroma, then remove the pan from the heat. Quickly pour the butter into the bowl of a stand mixer or a large mixing bowl. Make sure to scrape out all of the toasty brown bits from the bottom of the pan and into the bowl. Let the brown butter cool for 15-20 minutes.
Chop the chocolate and pistachios. While the butter cools, finely chop the pistachios into small pieces. If using a bar of chocolate cut the bar into small chunks or if using the Ghiradelli dark chocolate wafers, weigh out 130 grams and set them aside.
Combine the wet ingredients. Once the butter has cooled, add the regular cane sugar and dark brown sugar to the bowl. Mix with a whisk attachment on medium speed for 1 minute.
Add the egg, egg yolk, and extracts. Add the large egg, egg yolk, vanilla extract, and almond extract. Whisk until just combined, do not over-mix. Turn off the mixer.
Add the dry ingredients. Whisk together the gluten-free flour, almond flour, baking soda, and salt in a medium-sized bowl. Add the dry ingredients to the wet ingredients and mix at low speed until combined.
Fold in the chopped chocolate and chopped pistachios. Using a rubber spatula, fold the dark chocolate and pistachios into the dough.
Scoop and chill the dough. Use a large cookie scoop (2 Tablespoon size) to scoop the cookie dough into 40-gram balls (weigh on a food scale). Cover and chill the cookie dough balls in an airtight container for at least 2 hours. (If chilling longer than 2 hours, let the dough come to room temperature for 45 minutes before baking.
Bake the cookies. Preheat the oven to 350°F. Line two large baking sheets with parchment paper. Roll each ball of dough in between your palms until smooth, and then place 6 balls onto a prepared baking sheet. Add a few extra pieces of chocolate on top, then place the baking sheet in the oven for 9-10 minutes, or until the edges are golden brown and the center looks pale and slightly underdone.
Sprinkle with extra pistachios and flaky sea salt. Remove the tray from the oven and sprinkle the top of each cookie with finely chopped pistachios and flaky sea salt. (To achieve perfectly round cookies, place a large cookie cutter or glass cup over the top of each cookie and gently swirl in a circular motion until they form a perfect circle.) Let the cookies cool for 5 minutes on the baking sheets before transferring them to a wire rack to finish cooling.