When a lid is formed by first making a box and then sawing around its perimeter, some of us like to show off by having a mitre in the corners.
The edge mitres either return a groove or allow the upper edge to be moulded.
Please note that the surfaces marked with an asterisk are at right-angles to the faces of the sides.
Note the little quirk and bead formed on the bottom. This will inevitably shrink over a period of time, so the quirk helps to improve the appearance of the gap that will be formed. Since wood rarely shrinks in length, you only need to put the quirk on the sides and not on the ends.
Cut the grooves first. You can then align the flanks of the half pins with the grooves.