This element should have a black outline because the initial value of outline-color is invert, which inverts the pixels on the screen. This element should have a top outline of this color because the initial value of outline-color is invert, which inverts the pixels on the screen. Outlines are drawn just above the border edge, which is in the margin.
Margins are transparent to the descendant.
The left and right outlines will be black. The bottom outline will be half this color and half black. This is because the outline is 2 pixels, which is drawn just below the border edge. The containing DIV has a 1px bottom padding, which is red, and 1px below that is white, so therefore that bit will be black. This element should have a black top outline.