Prep the pan and oven: Heat the oven to 350°F (175°C). Line an 8-inch square baking pan with parchment, leaving overhang for easy lifting.
Mix the crust: In a bowl, combine 1 1/2 cups almond flour, 1/2 cup unsweetened shredded coconut, 1/4 cup granulated keto sweetener, and a pinch of salt. Stir in 6 tablespoons melted butter until the mixture looks like damp sand.
Par-bake the crust: Press the mixture firmly into the pan.
Bake for 10–12 minutes until lightly golden at the edges. Set aside to cool slightly.
Crush the raspberries: In a small bowl, gently mash 1 1/2 cups raspberries with 1–2 teaspoons keto sweetener and 1 teaspoon lemon juice. You want a chunky spoonable texture, not a puree.
Make the coconut filling: Whisk together 2 large eggs, 3/4 cup full-fat coconut milk (or 1/2 cup coconut cream plus 2 tablespoons water), 1/3–1/2 cup keto sweetener (to taste), 1 teaspoon vanilla, 1 teaspoon lemon zest, and a pinch of salt.
For extra silkiness, whisk in 1 tablespoon melted coconut oil.
Layer it up: Pour half the coconut filling over the warm crust. Spoon half the raspberry mixture over the filling in small pockets. Add the remaining filling, then dot with the remaining raspberries.
Use a knife to lightly swirl for a marbled look.
Add an optional coconut top: Sprinkle 2–3 tablespoons unsweetened coconut flakes on top for extra texture.
Bake: Return the pan to the oven and bake 22–28 minutes, until the center is just set and no longer jiggly. The top should be lightly golden at the edges.
Cool completely: Let the pan cool on a rack, then chill for at least 1–2 hours. Chilling helps the squares firm up for clean slicing.
Slice and serve: Lift out using the parchment and cut into 12 squares.
Taste and add a light dusting of powdered keto sweetener if you prefer a sweeter finish.