; or (B) the date on which the unaccompanied child is placed in the custody of the Secretary of Health and Human Services. (3) Length of representation An unaccompanied child shall be represented by counsel under paragraph (1) at every stage of the proceedings, beginning with the unaccompanied child’s initial appearance before an official with adjudicatory authority in removal proceedings or in related matters before the Department of Homeland Security or a State court, through the termination of immigration proceedings and resolution of any related matter before the Department of Homeland Security or a State court, even if the child attains 18 years of age or is reunified with a parent or legal guardian while the proceedings are pending. (4) Continuity in representation If counsel retained by an unaccompanied child at his or her own expense ceases representing the child for any reason, the Secretary of Health and Human Services shall ensure continued representation of the child by appointing or providing new counsel as expeditiously as possible. (5) Notice Not later than 72 hours after an unaccompanied child is taken into Federal custody, the child shall be notified that he or she will be provided with legal counsel in accordance with this subsection. (6) Within detention facilities The Secretary of Homeland Security shall ensure that unaccompanied children have access to counsel inside all detention, holding, and border facilities. (c) Pro bono representation (1) In general To the maximum extent practicable, the Secretary of Health and Human Services shall make every effort to use the services of competent counsel who agree to provide representation to such children under subsection (b) without charge to the child. (2) Development of necessary infrastructures and systems The Secretary of Health and Human Services shall establish the necessary infrastructure and systems for the appropriate identification, recruitment, training, and oversight of counsel available to provide assistance and representation to