Margin and padding in em are always calculated from the font size of the element by the formula:
margin(em) = margin(px) / font-size(px)
value of the font size. Although the font size can be specified in any units or can be inherited from any parent.
When the chain of parents is specified the font size in em, it is very easy to get confused with all these conversions. Guided by the calculated value, which you can see in the developer tools in the browser (see right column).