Prep the chard. Rinse the bunch well.
Strip leaves from stems. Finely chop the stems and roughly chop the leaves. This helps them cook evenly and avoids stringy bits in the filling.
Sauté the aromatics. Heat olive oil in a large skillet over medium heat.
Add the onion and chard stems with a pinch of salt. Cook, stirring, until softened, about 5–7 minutes. Add garlic and red pepper flakes; cook 30–60 seconds until fragrant.
Wilt the greens. Add chard leaves and a splash of water.
Cook, stirring, until leaves are wilted and tender and most moisture evaporates, 3–5 minutes. Season with salt and pepper. Transfer to a bowl to cool slightly.
Drain any excess moisture. If the mixture looks wet, press it gently in a sieve or squeeze with a clean towel. Dry filling keeps your triangles crisp.
Mix the filling. Stir in ricotta, Parmesan, lemon zest, and half the beaten egg (reserve the rest for egg wash).
Taste and adjust with salt, pepper, and lemon juice if you like a brighter flavor.
Preheat the oven. Set to 375°F (190°C). Line a baking sheet with parchment.
Prepare the phyllo. Keep the stack covered with a slightly damp towel to prevent drying. Lay out one sheet, brush lightly with melted butter.
Top with a second sheet and brush again. Slice into 3 even strips lengthwise.
Fill and fold. Place about 1 heaping tablespoon of filling at the bottom of each strip. Fold the corner up over the filling to make a triangle, then continue folding like a flag to keep the triangular shape sealed.
Repeat with remaining strips and phyllo.
Brush and top. Arrange triangles on the baking sheet. Brush tops with the remaining beaten egg. Sprinkle with sesame or nigella seeds if using.
Bake. Bake 18–24 minutes, until deeply golden and crisp. Don’t pull them early; good color equals flavor and crunch.
Rest briefly. Let sit 5 minutes before serving.
The filling sets and the layers stay flaky.