For the pastry case, preheat the oven to 190C/170C Fan/Gas 5. Either blend the flour, cocoa, icing sugar and butter in a food processor or rub in by hand until the mixture resembles fine breadcrumbs.
Add the egg yolk and a pinch of salt. You might find that the mixture already clumps together – if so, you will not need to add any water. If it still seems a bit dry when you squeeze some between your fingers, add up to a tablespoon of water. Form into a ball, wrap in cling film and chill for at least half an hour.
To make the filling, zest one of the oranges and the grapefruit. Put in a bowl, then add all the juice from the oranges and grapefruit, along with the cornflour. Whisk the cornflour into the juice until you have a very thin paste. Bring the water back to the boil in a saucepan, then whisk in the citrus and cornflour mixture.
Stir over a medium heat until it has the consistency of a thick custard. Remove from the heat and cool slightly. Beat the egg yolks and sugar together, then add this to the citrus mixture. Stir to combine, then cover with clingfilm, making sure the clingfilm touches the custard to stop a skin forming, then chill in the fridge.
Roll out the pastry and use to line a 23-24cm/8½-9½ in tart case. Prick all over with a fork, then line with baking parchment and fill with baking beans. Bake in the preheated oven for 15 minutes, then remove the beans and bake for a further 5 minutes. Reduce the oven temperature to 180C/160C Fan/Gas 4.
When the filling is completely chilled, scrape it into the pastry case. Whisk the egg whites until they are just starting to form stiff peaks, then continue to whisk, adding the sugar a tablespoon at a time. When it is stiff and glossy, add the remaining sugar and the cream of tartar. Finally, fold in the toasted hazelnuts. Pipe or pile the meringue over the filling.
Bake in the oven for around 20 minutes, or until the meringue is a dappled golden-brown. Cool before eating.