Prep the pan. Heat oven to 350°F (175°C). Line an 8-inch square pan with parchment, leaving overhang for easy lifting.
Lightly grease the sides.
Melt the butter with spices. In a small saucepan, melt the butter over low heat. Stir in cinnamon, ancho chili, cayenne (if using), and espresso powder. Let it gently bubble for 30 seconds to bloom the spices.
Remove from heat and stir in the oil.
Whisk in sugars. Add granulated and brown sugar to the warm butter mixture and whisk until glossy and well combined. Let cool for 2–3 minutes so the mixture is warm but not hot.
Add eggs and vanilla. Whisk in the eggs and yolk one at a time, followed by vanilla. Whisk briskly for 30–45 seconds to help build that shiny top.
Mix dry ingredients. In a bowl, whisk cocoa powder, flour, and salt until no lumps remain.
Combine the batter. Fold the dry ingredients into the wet mixture with a spatula.
When a few streaks remain, fold in the chopped dark chocolate. Do not overmix.
Pan and smooth. Scrape the thick batter into the prepared pan and spread evenly. For cleaner edges, tap the pan once on the counter to remove air bubbles.
Bake. Bake 22–26 minutes.
You’re looking for set edges and a center that’s just slightly soft. A toothpick inserted 2 inches from the edge should come out mostly clean, while the center may show a few moist crumbs.
Cool and set. Cool in the pan for at least 30–45 minutes. Lift out using the parchment and let cool another 15 minutes before slicing for neat squares.
Serve. Sprinkle with a pinch of flaky salt if you like.
Enjoy slightly warm or at room temperature for the best flavor.