I am reading some contradiction: Chapter 2 - Eligibility | USCIS
At first it aligns with what you said.
A petitioner who is a stepparent who adopted the petitioner’s stepchild also has to meet the 2-year legal custody and 2-year joint residence requirements and obtain a final adoption before the child’s 16th birthday (or 18th birthday if the sibling exception applies) before the petitioner can be considered an adoptive parent under immigration law.[23]
But there is a footnote number #23:
[^ 23] See INA 101(b)(1)(E). Note that 2 years of legal custody and joint residence is not required to establish a qualifying step-relationship under INA 101(b)(1)(B). For information on (non-adoptions based) family-based petitions, see Volume 6, Immigrants, Part B, Family-Based Immigrants [6 USCIS-PM B].
Drilling in further: eCFR :: 8 CFR 204.2 -- Petitions for relatives, widows and widowers, and abused spouses and children.
There is a section for "Petition for a child or son or daughter —"
(vii) Primary evidence for an adopted child or son or daughter. This also aligns to what you described.
But check this out:
Primary evidence for a stepchild. If a petition is submitted by a stepparent on behalf of a stepchild or stepson or stepdaughter, the petition must be supported by the stepchild's or stepson's or stepdaughter's birth certificate, issued by civil authorities and showing the name of the beneficiary's parent to whom the petitioner is married, a marriage certificate issued by civil authorities which shows that the petitioner and the child's natural parent were married before the stepchild or stepson or stepdaughter reached the age of eighteen; and evidence of the termination of any prior marriages of the petitioner and the natural parent of the stepchild or stepson or stepdaughter.
The 2 areas of text above in GREEN, Are they implying that the 2 years of legal custody don't matter if the petitioner is the Step-father?
What am I missing?