Prep the pan. Line an 8-inch square pan with parchment, leaving overhang on two sides.
This creates a sling so you can lift the set chocolate out easily.
Melt the base. Add chopped dark chocolate, butter, and sweetened condensed milk to a heatproof bowl. Melt gently over a saucepan of barely simmering water, stirring often until smooth and glossy. Alternatively, microwave in 20–30 second bursts, stirring between each, until fully melted.
Flavor it. Remove from heat.
Stir in vanilla and a pinch of salt. If using espresso powder, add it now. Mix until the chocolate looks thick and uniform.
Fold in extras. If adding nuts, crushed cookies, or fruit, gently fold them in with a spatula.
Keep the add-ins to about 1 to 1 1/2 cups total so the mixture still sets firmly.
Pour and level. Scrape the mixture into the lined pan. Smooth the top with the spatula. Tap the pan lightly on the counter to release any air bubbles.
Finish the top. Sprinkle with flaky sea salt or add a light drizzle of melted white chocolate if you like contrast and a bit of crunch.
Chill to set. Refrigerate for 2–3 hours, or until firm enough to slice cleanly.
For quicker setting, you can chill in the freezer for about 45–60 minutes, but keep an eye on it.
Slice and serve. Lift the slab out using the parchment sling. Warm a sharp knife under hot water, dry it, and cut into squares or bars. Wipe the knife between cuts for neat edges.