Prep the pan. Heat the oven to 350°F (175°C). Line an 8-inch (20 cm) square pan with parchment, leaving overhang for easy lifting.
Lightly grease the sides.
Melt butter and chocolate. In a medium saucepan over low heat, melt the butter. Turn off the heat, add chopped chocolate, and stir until smooth and glossy. Let it cool for 2–3 minutes.
Whisk in sugars. Add granulated and brown sugar to the warm chocolate mixture.
Whisk until combined and slightly thick.
Add eggs and vanilla. Whisk in eggs one at a time until the batter looks shiny and cohesive. Stir in vanilla (and lemon zest if using). Avoid over-whisking.
Fold in dry ingredients. Sift in cocoa, flour, and salt.
Use a spatula to fold gently just until no dry streaks remain. The batter will be thick.
Stir in raspberries. Gently fold in raspberries and chocolate chips (if using). Try not to crush the berries; a few burst spots are fine.
Bake. Spread batter evenly in the pan.
Bake 25–30 minutes until the edges are set and the center looks slightly underdone. A toothpick should come out with moist crumbs, not wet batter.
Cool completely. Set the pan on a rack and cool at least 1 hour. Lift out using parchment and slice with a sharp knife, wiping between cuts for clean edges.