Preheat your oven to 400°F / 200°C and line three baking pans with foil.
In a large bowl, wash the basmati rice in several changes of cold water until the water runs clear, then leave it to soak.
Prep the vegetables. Wash the sweet potatoes and beets well (no need to peel) and cut them into wedges about 2½ x ¾ inches.
Place them on separate baking pans.
Cut the tomatoes into eighths and place them on the third pan along with the drained chickpeas and paneer cubes.
In a small bowl, whisk together 6 tablespoons (90 ml / 3 fl oz) of oil, 1⅓ teaspoons of salt, the ground red chile, cumin, garam masala, and lemon juice.
Drizzle this spice mixture over the three pans of vegetables, ensuring the tomato and paneer pan gets a little extra.
Toss everything to coat evenly.
Roast the vegetables for 40 minutes, placing the paneer pan on the top shelf.
Stir everything halfway through cooking to ensure even roasting.
While the vegetables roast, caramelize the onions.
Heat the remaining 3 tablespoons (45 ml / 1.5 fl oz) of oil in a medium casserole or biryani dish (approx. 9 inches) over medium heat.
Add the sliced onions and cook for 15-20 minutes, stirring regularly, until deeply browned, soft, and sweet.
Remove the onions to a separate bowl, reserving the dish for layering.
Make the sauce.
Combine all for the coconut and cilantro sauce in a high-speed blender and blend until smooth.
Pour the sauce into a frying pan and cook over medium heat for 10 minutes, stirring occasionally.
Taste for seasoning and set aside.
Cook the rice.
Drain the soaked rice and place it in a deep saucepan.
Cover with plenty of fresh cold water, bring to a boil, then reduce to a fast simmer.
Cook for 10 minutes, or until the rice is just tender but still has a slight bite (al dente).
Drain thoroughly, cover with a clean tea towel, and set aside.
Prepare the egg wash.
In a small cup, whisk the egg with a generous pinch of salt.
It's time to layer! Start with half of the paneer, tomato, and chickpea mixture in the bottom of your reserved casserole dish. Follow with a quarter of the rice and a quarter of the caramelized onions.
Add half of the coconut-cilantro sauce, then half of the roasted beets and sweet potatoes.
Add another quarter of the rice and onions.
Repeat the layers, finishing with the final layer of rice and onions on top.
Seal the dish.
Cut your puff pastry to fit over the top of the pot with a slight overhang.
Working quickly to keep the pastry cold, press it down firmly around the edges to create a tight seal.
Brush the top generously with the beaten egg and sprinkle with sesame and nigella seeds.
Bake for 25 minutes, or until the pastry is deeply golden and puffed. Carefully remove the pot from the oven and bring it straight to the table for a dramatic presentation.
Cut away the pastry lid to reveal the steamy, fragrant biryani below.
Serve in generous scoops, ensuring everyone gets a taste of each colorful layer.
Don't overcook the rice during the initial boil. It should be about 70-80% cooked (al dente), as it will continue to steam to perfection inside the sealed pot.