Preheat your oven to 350°F (175°C). Line a 9×13-inch baking pan with parchment paper, leaving some overhang on the long sides to form a sling. Lightly spray the parchment with nonstick spray.
In a large mixing bowl or stand mixer fitted with the paddle attachment, beat 1 cup softened unsalted butter, 1 cup granulated sugar, and 1/2 cup packed light brown sugar together until light and fluffy, about 2–3 minutes. Add the 2 eggs and 2 teaspoons vanilla extract and mix until smooth. In a separate bowl, whisk together 3 cups all-purpose flour, 1 teaspoon baking powder, and 1/2 teaspoon fine sea salt. Add the dry ingredients to the wet mixture and mix on low speed just until a soft, thick dough forms.
1 cup unsalted butter, 1 cup granulated sugar, 1/2 cup light brown sugar, 2 large eggs, 2 teaspoons pure vanilla extract, 3 cups all-purpose flour, 1 teaspoon baking powder, 1/2 teaspoon fine sea salt
Scoop about two-thirds of the dough into the prepared pan. Press it evenly into the bottom of the pan using clean hands or the bottom of a measuring cup. Bake for 12–15 minutes, or until the edges are very lightly golden. The crust should not be fully baked yet.
While the crust bakes, make the caramel filling. In a medium saucepan over medium heat, add 1 cup unsalted butter and 1 cup packed light brown sugar. Cook, stirring constantly, until the butter is melted, the mixture is smooth, and it starts to bubble gently. Stir in the sweetened condensed milk and 1/4 cup heavy cream. Continue cooking over medium-low heat, stirring often, for 5–7 minutes, until the mixture thickens slightly, looks glossy, and bubbles gently without scorching. Remove from the heat and stir in 1 teaspoon vanilla extract and 1 1/2 teaspoons flaky sea salt. Taste carefully and add up to 1/2 teaspoon more salt if you prefer a stronger sweet-salty flavor.
1 cup unsalted butter, 1 cup light brown sugar, 14 oz sweetened condensed milk, 1/4 cup heavy cream, 1 1/2 to 2 teaspoons flaky sea salt, 1 teaspoon pure vanilla extract
Pour the warm caramel filling evenly over the warm, partially baked crust. Use an offset spatula or the back of a spoon to spread it into an even layer. Crumble the remaining dough over the top of the caramel in small pieces, leaving some caramel peeking through. If using chocolate chips or nuts, scatter them evenly over the top and gently press them into the dough.
1/2 cup mini chocolate chips or chopped dark chocolate, 1/4 cup finely chopped pecans or toasted walnuts
Return the pan to the oven and bake for 25–30 minutes, or until the top is lightly golden and the edges are bubbling. The center should look mostly set, not liquid. Remove from the oven and immediately sprinkle with additional flaky sea salt, if desired.
flaky sea salt
Allow the bars to cool completely at room temperature. For the cleanest slices, chill the pan in the refrigerator for at least 1–2 hours. Use the parchment overhang to lift the slab out of the pan and onto a cutting board. Slice into 24–32 bars, depending on your preferred size.
Store bars in an airtight container at cool room temperature for up to 2 days, or in the refrigerator for 5–6 days. For longer storage, freeze in layers separated by parchment for up to 2 months. Let refrigerated or frozen bars sit at room temperature for 10–15 minutes before serving, or warm a single bar in the microwave for 8–10 seconds for a softer, gooier caramel center.