
286 S.W.3d 925 (2009)
In re James Allen HALL.
No. 07-0322.
Supreme Court of Texas.
Argued November 12, 2008.
Decided June 12, 2009.
James Allen Hall, Beeville TX, pro se.
Timothy Patton, Timothy Patton, PC, San Antonio TX, for Relator.
Susan Dolan Reed, Criminal District Attorney, Jose Contreras, United States Attorneys Office, James Sumner Wheat, James S. Wheat Attorney at Law, Kevin Patrick Yeary, Assistant Criminal District Attorney, San Antonio TX, for Real Party in Interest.
Justice MEDINA delivered the opinion of the Court.
In this original mandamus proceeding, we must decide whether an indigent person, adjudicated a juvenile delinquent as a minor and sentenced to forty years, has a *926 statutory right under the Juvenile Justice Code to the appointment of an attorney in a habeas corpus proceeding filed after that person becomes an adult. The juvenile offender in this case filed a pro se motion with the juvenile court several years after his transfer to an adult facility. In this motion, he requested a hearing and the appointment of counsel to pursue habeas corpus relief challenging the legality of his imprisonment under Title 3 of the Texas Family Code, also known as the Juvenile Justice Code. See Act of May 24, 1973, 63d Leg., R.S., ch. 544, 1973 Tex. Gen. Laws 1460 (enacting Title 3 of the Family Code to provide procedures relating to delinquent children).[1] The juvenile court denied the request.
The offender subsequently filed a petition for writ of mandamus with the court of appeals, seeking to compel the trial court to appoint counsel for him and conduct a hearing. The court of appeals, in a memorandum opinion, denied mandamus relief, concluding that the offender was not entitled to appointed counsel because he no longer qualified as a child under the Juvenile Justice Code. In re Hall, 2007 WL 460698, 2007 Tex.App. LEXIS 1056 (Tex.App.-San Antonio Feb.14, 2007) (mem.op.). Although we do not believe that the juvenile offender's age is determinative, we agree that the Juvenile Justice Code does not provide the offender the right to appointed counsel under the present circumstances and likewise deny mandamus relief for reasons we explain below.

I
In January 1996, fourteen-year-old James Allen Hall was adjudicated and sentenced in juvenile court under the Juvenile Justice Code. See generally TEX. FAM.CODE § 54.03. A jury found that Hall had engaged in delinquent conduct by committing capital murder and the court assessed punishment at a sentence of forty years. TEX. FAM.CODE § 54.04(d)(3)(A). Hall served his sentence at a Texas Youth Commission facility until age eighteen, at which time the juvenile court conducted a hearing to determine whether he should be transferred to the Texas Department of Criminal Justice. See TEX. FAM.CODE § 54.11(a) (requiring juvenile courts to conduct a hearing assessing an offender's transfer status). The juvenile court concluded that Hall should be transferred to an adult prison to serve the remainder of his sentence, and the court of appeals affirmed the transfer order. In re J.A.H., 2000 WL 1283734, 2000 Tex.App. LEXIS 6194 (Tex. App.-San Antonio Sept.13, 2000)(not designated for publication).
Seven years later, Hall filed the motion at issue with the juvenile court, requesting that the court appoint counsel to assist him in pursuing post-adjudication habeas corpus relief. Unaided by an attorney, Hall argued that he was entitled to appointed counsel under the Juvenile Justice Code. The juvenile court disagreed, however, and denied his request. Hall thereafter sought mandamus relief from the court of appeals to compel the appointment, but the court denied relief. The court of appeals reasoned that Hall was not entitled to have counsel appointed for him under the Juvenile Justice Code because he no longer met the Code's definition of a child. In re Hall, 2007 WL 460698, 2007 Tex.App. LEXIS 1056 (Tex.App.-San Antonio Feb.14, 2007) (mem.op).
Hall next sought mandamus relief in this Court. Hall also made a written request *927 for assistance to the Pro Bono Committee of the Appellate Section of the State Bar of Texas, which approved his request and provided an attorney to assist him in this proceeding.

II
The Legislature enacted the Juvenile Justice Code as a separate system for the prosecution, adjudication, sentencing, and detention of juvenile offenders to protect the public and provide for the wholesome moral, mental, and physical development of delinquent children. TEX. FAM. CODE § 51.01(1), (2), (3). This separate system often provides enhanced procedural protections to juvenile offenders, who, because of youth, ordinarily lack the mental and emotional maturity needed to navigate the Juvenile Justice Code and maintain an adequate defense. In re J.G., 905 S.W.2d 676, 680 (Tex.App.-Texarkana 1995, writ denied); In re S.C., 790 S.W.2d 766, 770-71 (Tex.App.-Austin 1990, writ denied); In re E.Q., 839 S.W.2d 144, 146 (Tex.App.-Austin 1992, no writ). Although quasi-criminal in nature, proceedings in juvenile court are considered civil cases; thus, this Court, rather than the Court of Criminal Appeals, is the Texas court of last resort for such matters. See, e.g., In re M.A.F, 966 S.W.2d 448, 450 (Tex.1998); Ex parte Valle, 104 S.W.3d 888, 889-90 (Tex.Crim.App.2003).
The Code covers the proceedings in all cases involving a child's delinquent conduct. TEX. FAM.CODE § 51.04(a). "Child" is defined to include persons less than eighteen years old. Id. § 51.02(2). "Delinquent conduct" is defined to include, among other things, conduct that violates state or federal penal law punishable by imprisonment. Id. § 51.03(a)(1). Thus Hall, by taking part in a murder at age thirteen, engaged in delinquent conduct as a child under the Code.
The juvenile court generally has exclusive original jurisdiction over proceedings involving a child's delinquent conduct. Id. § 51.04(a). A person's status as a child is determined by the person's age at the time of the alleged offense. Id. If the child is adjudicated delinquent, the juvenile court retains jurisdiction over the person even after that person reaches majority. See, e.g., id. §§ 51.041, 51.0411, 51.06.
Because juvenile proceedings are civil matters, the Court of Criminal Appeals has concluded that it lacks jurisdiction to issue extraordinary writs in such cases, even those initiated by a juvenile offender who has been transferred to the Texas Department of Criminal Justice because he is now an adult. Ex parte Valle, 104 S.W.3d at 889; see also Vasquez v. State, 739 S.W.2d 37, 42 (Tex.Crim.App.1987) (plurality op.) (recognizing that delinquency proceedings are civil in nature). The Court of Criminal Appeals has further concluded that it is the applicant's age at the time he commits the delinquent acts that determines jurisdiction, rather than his age when applying for habeas corpus. See Ex parte Valle, 104 S.W.3d at 889 (recognizing that the effect of adjudication of delinquency differs from that of conviction). Because this is a civil matter, we can reach the issue the Court of Criminal Appeals could not: whether the Juvenile Justice Code provides a mandatory right to assistance of counsel to an adult pursuing a post-adjudication habeas corpus claim involving his commitment as a juvenile offender. See id. at 889-90 (dismissing case falling under Juvenile Justice Code for want of jurisdiction).

III
An indigent person convicted as an adult offender does not have the right to appointed counsel in collateral, post-conviction proceedings such as the underlying *928 habeas corpus petition in this case. See Pennsylvania v. Finley, 481 U.S. 551, 555, 107 S.Ct. 1990, 95 L.Ed.2d 539 (1987); Ex parte Graves, 70 S.W.3d 103, 110-11 (Tex.Crim.App.2002). Hall submits, however, that a juvenile offender has the right to appointed counsel under these circumstances pursuant to the Juvenile Justice Code. He contends that the Code expressly extends the right to counsel during every stage of the proceedings, including habeas corpus.
The argument is premised on section 51.10(a) of the Code, which provides:
§ 51.10. Right to Assistance of Attorney; Compensation
(a) A child may be represented by an attorney at every stage of proceedings under this title, including:

(1) the detention hearing required by Section 54.01 of this code;
(2) the hearing to consider transfer to criminal court required by Section 54.02 of this code;
(3) the adjudication hearing required by Section 54.03 of this code;
(4) the disposition hearing required by Section 54.04 of this code;
(5) the hearing to modify disposition required by Section 54.05 of this code;
(6) hearings required by Chapter 55 [pertaining to issues of mental health and mental retardation] of this code;
(7) habeas corpus proceedings challenging the legality of detention resulting from action under this title; and
(8) proceedings in a court of civil appeals or the Texas Supreme Court reviewing proceedings under this title.
TEX. FAM.CODE § 51.10(a)(1)-(8) (emphasis added). Hall also relies on section 51.10(f), which provides that the juvenile court "shall" appoint an attorney to represent the interest of the child "entitled to representation by an attorney" if the child is not represented by an attorney, the child's family is financially unable to hire an attorney, and the child has not waived his right to counsel or the Code prohibits waiver. Id. § 51.10(f). If the child's family is financially able, the juvenile court is directed to order the parent or other financially responsible person to employ an attorney for the child. See id. § 51.10(d). Taken together, Hall submits that the accused or adjudicated juvenile offender is ensured representation by an attorney at each of the eight stages itemized in subsection (a), including (7), habeas corpus proceedings. Id. § 51.10(a)(1)-(8).
The State concedes that juvenile offenders have a right to counsel in specific instances under the Juvenile Justice Code, but argues that a post-adjudication habeas corpus claim is not one of those instances. The State submits that this is clear from the text of section 51.10(a)(7) which refers only to "habeas corpus proceedings challenging the legality of [the child's] detention." The State argues that "detention" here refers to the pre-adjudication confinement of the child, not the post-adjudication commitment at issue here.[2] We agree.
The Juvenile Justice Code does not define the term "detention." Undefined terms in a statute are typically given their ordinary meaning. Fitzgerald v. Advanced Spine Fixation Sys., Inc., 996 S.W.2d 864, 865 (Tex.1999). But we will not give an undefined statutory term a *929 meaning that is out of harmony or inconsistent with other provisions in the statute. McIntyre v. Ramirez, 109 S.W.3d 741, 745 (Tex.2003). Thus, if a different, more limited, or precise definition is apparent from the term's use in the context of the statute, we apply that meaning. See Tex. Dep't of Transp. v. Needham, 82 S.W.3d 314, 318 (Tex.2002) (courts should not give an undefined statutory term a meaning out of harmony or inconsistent with other provisions).
"Detention" is commonly defined as either (1) "the act or fact of detaining or holding back; esp: a holding in custody" or (2) "the state of being detained; esp: a period of temporary custody prior to disposition by a court." WEBSTER'S NEW COLLEGIATE DICTIONARY 307 (1981). The latter definition is closer to the intended meaning here. In context and consistent with the Juvenile Justice Code's scheme, detention refers to the period of temporary custody preceding the adjudication of the charges against the child.
The Code requires that a juvenile court promptly conduct a detention hearing to determine whether the child should be immediately released from custody. TEX. FAM.CODE §§ 54.01(a), (h), (i). Following this hearing, the court must release the child unless it finds that the child (1) is likely to leave its jurisdiction, (2) lacks suitable supervision or care, (3) lacks a parent or other responsible adult, (4) is dangerous to himself or others, or (5) has previously been found delinquent and is likely to commit an offense if released. Id. § 54.01(e)(1)-(5). The juvenile court is not required to appoint an attorney for the child prior to the detention hearing, but, if it determines that an unrepresented child should not be released, the child is entitled to an attorney. Id. § 51.10(c). An attorney appointed under these circumstances is entitled to request a de novo detention hearing for the child. Id. § 54.01(n).
The Juvenile Justice Code provision on which Hall asserts his right to appointed counsel references this detention period: "A child may be represented by an attorney at ... (7) habeas corpus proceedings challenging the legality of detention resulting from action under this title." Id. § 51.10(a)(7). Assuming for the sake of argument that this provision grants the child a right to appointed counsel, it would not apply here because Hall is not challenging the legality of his detention. The time for doing that has long since passed. Hall's habeas corpus proceeding in the juvenile court must instead challenge the legality of his commitment following the adjudication of the charges against him. Section 51.10(a)(7) simply does not provide a juvenile offender, who has been transferred to adult prison, with a general right to appointed counsel in post-adjudication habeas corpus proceedings.
The Code does, however, provide for the appointment of counsel for a number of different proceedings. For example, the child is entitled to counsel at the adjudication hearing at which the issue of the child's delinquent conduct is tried. Id. §§ 51.10(b)(2), 54.03. If, at the conclusion of that hearing the child is found to have engaged in delinquent conduct, the court must set a disposition hearing at which the child is again entitled to counsel. Id. §§ 51.10(b)(3), 54.03(h), 54.04. When the delinquent conduct involves the commission of a felony, as in this case, the disposition may involve sentencing "the child to commitment in the Texas Youth Commission with a possible transfer to the Texas Department of Criminal Justice" for completion of the sentence. Id. § 54.04(d)(3). The Code accordingly provides for a release or transfer hearing at which the child is also entitled to counsel. Id. § 54.11(a), (e). The Code further provides for the appointment of counsel if there is a hearing *930 to transfer the child to criminal court in lieu of adjudication under the Juvenile Justice Code. Id. §§ 51.10(b)(1), 54.02(e). And as already mentioned, the child is entitled to an attorney if the court determines that the child should not be released as a preliminary matter but rather detained through the adjudication and disposition hearings. Id. § 51.10(c). Thus, the Code provides a right to appointed counsel in a number of different circumstances, but a post-adjudication habeas corpus proceeding is not one of them.

* * *
We have not found any provision in the Juvenile Justice Code requiring the appointment of counsel for the juvenile offender under the circumstances presented here. The juvenile court therefore did not abuse its discretion in denying Hall's motion for appointment of counsel in the underlying post-adjudication habeas corpus, and we accordingly deny his petition for writ of mandamus.
NOTES
[1]  The offender engaged in the underlying delinquent conduct in 1995, when he was thirteen years old. The Code has been amended since 1994 but none of the substantive changes are at issue here.
[2]  The State also argues that even if the statute provides juveniles with a right to an attorney during a habeas proceeding, it is a limited right that terminates when the juvenile offender reaches the age of majority. Hall contends that taking away his statutory right to habeas counsel because of his age is arbitrary and a denial of due process. Because we conclude that Hall does not have a statutory right to counsel under the circumstances here, we do not reach his constitutional argument.
