Preheat the oven to 175°C and line a 20 x 20 centimeter square baking pan with parchment paper, leaving overhang on two sides for easy lifting.
Place the butter in a medium saucepan over medium heat. Cook, stirring often, until the butter foams, the milk solids turn golden brown, and it smells nutty, about 5 to 7 minutes. Immediately remove from the heat.
Add the granulated sugar, light brown sugar, and cocoa powder to the hot browned butter and whisk until combined. Let the mixture cool for 5 minutes so it is warm but not piping hot.
Whisk in the eggs one at a time until fully incorporated and the batter looks glossy. Whisk in the vanilla extract and peppermint extract.
Add the finely chopped dark chocolate and stir until melted into the warm batter. If a few small pieces remain, that is fine.
Add the rye flour and fine sea salt. Fold gently with a spatula just until no dry streaks remain. Fold in the semisweet chocolate chips.
Spread the batter evenly into the prepared pan and smooth the top. If using the flaky sea salt, sprinkle it lightly over the surface.
Bake for 28 to 30 minutes, until the top is set and a toothpick inserted near the center comes out with moist crumbs but not wet batter.
Place the pan on a wire rack and cool completely for about 45 minutes. Lift the brownies out using the parchment, then cut into 16 squares with a sharp knife.