
620 F.3d 1 (2010)
Djamel AMEZIANE, Detainee, Guantanamo Bay Naval Station, Guantanamo Bay Cuba, Appellee
v.
Barack OBAMA, President of the United States, et al., Appellants.
No. 09-5236.
United States Court of Appeals, District of Columbia Circuit.
Argued October 8, 2009.
Decided January 8, 2010.
Reissued October 6, 2010.
*2 August E. Flentje, Attorney, U.S. Department of Justice, argued the cause for *3 appellants. With him on the briefs were Douglas N. Letter and Robert M. Loeb, Attorneys.
J. Wells Dixon argued the cause for appellee. With him on the brief were Shayana D. Kadidal and Pardiss Kebriaei.
Before: GINSBURG, BROWN and GRIFFITH, Circuit Judges.
Opinion for the court filed by Circuit Judge BROWN.
BROWN, Circuit Judge:
This case presents another variation on the detainee theme, raising questions about what information [redacted] can be protected from public disclosure when the detainee is anxious to reveal it. These questions arise because the government, [redacted] has sought to designate [redacted] as "protected" information under the governing protective order. [redacted] The district court sided with Ameziane and the government appealed. We reverse.

I
Ameziane, an Algerian citizen, has been held at the U.S. Naval Base at Guantanamo Bay, Cuba since 2002. In 2005, he filed a petition for a writ of habeas corpus under 28 U.S.C. § 2241. This action was subject to a protective order governing common procedural issues in all Guantanamo habeas cases. See In re Guantanamo Bay Detainee Litig., 577 F.Supp.2d 143 (D.D.C.2008) (Protective Order). Under the Protective Order, "protected" information may not be disclosed to anyone other than the petitioner's counsel and the court, unless the government authorizes wider disclosure. Id. at 151 (¶ 35). To designate information as protected, the government must attempt to reach an agreement with the petitioner's counsel, and if that fails, file a motion with the court. Id. (¶ 34).
On January 22, 2009, the President issued an Executive Order directing the closure of the Guantanamo detention facility "as soon as practicable, and no later than 1 year from the date of this order," [redacted] Exec. Order No. 13,492, 74 Fed. Reg. 4897, [redacted] (Jan. 22, 2009). [redacted]
[redacted] On June 15, the government filed a coordinated motion [redacted] seeking to designate [redacted] as "protected" information. In support of the motion, the government submitted a declaration by [redacted]
At a hearing on June 30, the district court denied the government's motion to protect [redacted]. The court concluded the government had failed to make a "particularized showing" because the [redacted] Declaration had "nothing . . . to do with this case in particular," and protested that allowing Ameziane to disclose [redacted] Transcript of Motion Hearing [redacted] Ameziane v. Obama, No. 05-cv-392 (D.D.C. June 30, 2009) (June 30 Tr.). [redacted] The court issued a written order including a one-week stay. Order, Ameziane v. Obama, No. 05-cv-392 (D.D.C. June 30, 2009) (June 30 Order).
On July 7, the government sought to extend the stay for an additional week; the district court rejected the request, see Transcript of Motion Hearing [redacted], Ameziane v. Obama, No. 05-cv-392 (D.D.C. July 7, 2009); and the government filed an interlocutory appeal and moved this court for an emergency stay of the district court's order.
The district court issued a written opinion explaining the refusal to extend its stay. Mem. Op. & Order, Ameziane v. Obama, No. 05-cv-392 (D.D.C. July 8, 2009) (July 8 Op.). The court stated "[t]he government's rationale for protecting [redacted] [was] riddled with contradictions." Id. at 5. It disregarded the [redacted] *4 Declaration because it "provide[d] no specificity [redacted]. The court was not "convinced" by the government's "speculative and conclusory" national security concerns. Id. at 7. "Most importantly," the court determined, "the record demonstrates that protecting [redacted] would serve little purpose" because [redacted]
On July 16, we granted a stay pending appeal.

II
We first consider whether we lack subject-matter jurisdiction because the dispute is moot or, alternatively, because the district court's order was not a final decision from which the government could immediately appeal.

A
Ameziane argues this appeal is moot because [redacted] "`Federal courts lack jurisdiction to decide moot cases because their constitutional authority extends only to actual cases or controversies.'" Larsen v. U.S. Navy, 525 F.3d 1, 4 (D.C.Cir.2008) (quoting Iron Arrow Honor Soc'y v. Heckler, 464 U.S. 67, 70, 104 S.Ct. 373, 78 L.Ed.2d 58 (1983)). "[A] case is moot when the issues presented are no longer `live' or the parties lack a legally cognizable interest in the outcome." Powell v. McCormack, 395 U.S. 486, 496, 89 S.Ct. 1944, 23 L.Ed.2d 491 (1969). However, a case is not moot unless it is "`impossible for the court to grant any effectual relief whatever.'" Cody v. Cox, 509 F.3d 606, 608 (D.C.Cir.2007) (quoting Church of Scientology of Cal. v. United States, 506 U.S. 9, 12, 113 S.Ct. 447, 121 L.Ed.2d 313 (1992) (internal quotation marks omitted)).
[redacted]
Thus, this appeal is not moot [redacted]. The district court ordered, first, "that petitioner's motion to unseal" [redacted] and all related or derivative documents" would be granted; second, "that the government's motion to designate [redacted]. . . as `protected' information" would be denied; and third, that "petitioner and his counsel may publicly disclose [redacted] June 30 Order [redacted].
As an initial matter, in this court, Ameziane has decided not to defend much of the district court's order: "[Ameziane] does not seek to disclose the District Court pleadings or transcripts regarding this issue, or the parties' appellate briefs, or any information regarding [redacted]. . . . [A]ll that is at issue in this appeal, is whether Ameziane `may publicly disclose [redacted]" Appellee's Br. [redacted] (quoting June 30 Order [redacted]). Accordingly, since both parties agree "the District Court pleadings [and] transcripts regarding this issue," "the parties' appellate briefs," and "any information regarding [redacted]" should be protected, id., the district court's order is reversed to the extent it unsealed and declined to protect such material.
There remains one key document that, if unsealed, [redacted]: the district court order itself. However, there is some ambiguity whether Ameziane seeks to unseal this order. He quotes from the order in arguing his entitlement to "`publicly disclose [redacted],'" Appellee's Br. [redacted] (quoting June 30 Order [redacted]), thus suggesting Ameziane's counsel intends to point to the order itself [redacted].
Yet, at oral argument, Ameziane's counsel stated he was "not seeking the unsealing of records." Transcript of Oral Argument at 15:13-16. It is not clear whether this reference to "records" included the district court order, or whether it referred only to the documents listed in Ameziane's brief and discussed above. But even assuming the district court order will remain sealed, this appeal is not moot. Counsel *5 stated unambiguously that he sought "to be able to say [redacted]

B
Nor do we lack jurisdiction because the district court's order was not "final." Courts of appeals have jurisdiction of appeals from "all final decisions" of district courts. 28 U.S.C. § 1291. Pursuant to the collateral order doctrine, an interlocutory order qualifies as "final" under § 1291 if it (1) conclusively determines the disputed question, (2) resolves an important issue completely separate from the merits of the action, and (3) is effectively unreviewable on appeal from a final judgment. See Will v. Hallock, 546 U.S. 345, 349, 126 S.Ct. 952, 163 L.Ed.2d 836 (2006).
These conditions, though "stringent," see id., are satisfied in this case. As Ameziane concedes, the first requirement is satisfied because the district court's order conclusively determined that [redacted] would not be protected under the Protective Order. Second, this issue is entirely separate from the merits of Ameziane's habeas action. The public disclosure of [redacted] has no relevance to the underlying question on the merits, i.e., whether he has been lawfully detained. And given the foreign relations and national security concerns raised in the [redacted] Declaration, we have no difficulty finding this issue sufficiently "important" to warrant immediate appellate review. See Al Odah v. United States, 559 F.3d 539, 543-44 (D.C.Cir.2009) (holding that order mandating disclosure of classified information to habeas petitioners' counsel was "an important issue entirely separate from the merits of this case"). Finally, the district court's order would be effectively unreviewable on appeal from a final judgment because once [redacted] is revealed publicly, the disclosure cannot be undone. See id. at 544. Thus, we have subject-matter jurisdiction.

III
While we review a district court's decision to seal or unseal documents, or to issue or refuse to issue a protective order, for abuse of discretion, we review de novo any errors of law upon which the court relied in exercising its discretion. See, e.g., United States v. Mejia, 448 F.3d 436, 456-57 (D.C.Cir.2006) (reviewing issuance of protective order de novo rather than for abuse of discretion because court applied incorrect legal standard); United States v. El-Sayegh, 131 F.3d 158, 160 (D.C.Cir.1997) (reviewing decision to unseal guilty plea de novo rather than for abuse of discretion because court's decision was premised on legal error); see also Koon v. United States, 518 U.S. 81, 100, 116 S.Ct. 2035, 135 L.Ed.2d 392 (1996) ("A district court by definition abuses its discretion when it makes an error of law."). Here, the district court's explanations indicate de novo review is appropriate.

A
It is "our customary policy" to accord "deference to the President in matters of foreign affairs." Jama v. Immigration and Customs Enforcement, 543 U.S. 335, 348, 125 S.Ct. 694, 160 L.Ed.2d 708 (2005). And "consistent with our rule of deference, it is within the role of the executive to acquire and exercise the expertise of protecting national security. It is not within the role of the courts to second-guess executive judgments made in furtherance of that branch's proper role." Bismullah v. Gates, 501 F.3d 178, 187-88 (D.C.Cir.2007) (internal quotation marks omitted), vacated on other grounds, Gates v. Bismullah, ___ U.S. ___, 128 S.Ct. 2960, 171 L.Ed.2d 881 (2008).
But detainee cases are unique. Because of the independent role carved out for the judiciary, and our concomitant obligation *6 to balance the needs of the government against the rights of the detainee, and also to preserve to the extent feasible the traditional right of public access to judicial records grounded in the First Amendment, we exercise greater caution in deciding to defer. See, e.g., Boumediene v. Bush, 553 U.S. 723, 128 S.Ct. 2229, 2276-77, 171 L.Ed.2d 41 (2008). In the context of requests by the government to protect sensitive information, we have explained the showing the government must make to trigger judicial deference.
In Bismullah v. Gates, we rejected the government's assertion of unilateral authority to designate information as "protected" and held "the Government must give the court a basis for withholding . . . from public view" nonclassified information it seeks to protect. 501 F.3d at 188. In Parhat v. Gates, we explained that a valid "basis for withholding" would include, at a minimum, a "specific," "tailored" rationale for protecting a general category of information, and a precise designation of each particular item of information that purportedly "falls within the categor[y] . . . described." 532 F.3d 834, 853 (D.C.Cir. 2008). In other words, the government first must demonstrate what kind of information requires protection and why, and then must show exactly what information in the case at hand it seeks to protect.
In Parhat, the government failed to satisfy this twofold showing. The government began by describing two broad categories"(1) any names and/or identifying information of United States Government personnel, and (2) any sensitive law enforcement information"and provided a "rationale for protection [that was] brief" and "relie[d] solely on spare, generic assertions of the need to protect information in the two categories." Id. at 852-53 (internal quotation marks omitted). For instance, the government merely asserted in conclusory fashion that disclosing information in the first category would "heighten[]" the risks to the safety of U.S. government personnel, and that disclosing information in the second category would "harm the Government's ongoing law enforcement activities related to the global war against al Qaeda and its supporters." Id. at 852. These "generic claims" failed to satisfy the government's burden of providing "an explanation tailored to the specific information at issue." Id. at 853.
Second, the government consigned all government personnel mentioned in the record to the first category, and simply marked documents "Law Enforcement Sensitive" or "LES" to designate the second category. Id. at 852-53. We found both sets of designations imprecise and overinclusive. For instance, "some `U.S. Government personnel' . . . [were] so publicly associated with Guantanamo that protected status would plainly be unwarranted." Id. at 853. And we noted that the term "Law Enforcement Sensitive" was so vague that "at least seven different federal agencies define[d] it differently." Id. Thus, even if the government had provided sufficient rationales for protecting information in the two categories, it nonetheless failed to make its designations with sufficient precision to allow the court to "determine whether the information it ha[d] designated properly f[ell] within the categories it ha[d] described." Id.
Here, the district court failed properly to apply Parhat's two-part standard. Rather than evaluating the government's proposed category and proffered rationale, and then determining whether [redacted] fell into that category, the court faulted [redacted] for "provid[ing] no specificity as to why [redacted] must be protected or why his counsel should be prohibited from using the information [redacted] July 8 Op. [redacted] (emphasis *7 added). Similarly, in its oral ruling, the court found the government had failed to make a "particularized showing" because the [redacted] Declaration had "nothing. . . to do with this case in particular." June 30 Tr. [redacted]. However, Parhat did not require the government to provide a rationale for protection that was so specific as to preclude any generalized categorization. Rather, Parhat left room for categorized requests in appropriate circumstances. Of course, the narrower the category for which the government seeks protection, the more likely the government's rationale will be sufficiently tailored. But the district court erred by construing Parhat to require a specific and distinct rationale addressed to each detainee's situation.
There is a sharp contrast between the government's showing in this case and its showing in Parhat. Unlike the two broad categories outlined in Parhat, here the government requested protection for a single, limited category: [redacted] and all related or derivative documents. See July 8 Op. [redacted]. And unlike the "spare, generic assertions" with which the government justified its request in Parhat, 532 F.3d at 853, here the government provided a detailed rationale tailored specifically to the information in the narrow category.
The [redacted] Declaration logically explained why failing to protect [redacted] was likely to harm the government's foreign relations and national security interests. [redacted]. Because this detailed rationale was tailored specifically to the narrow category of information for which the government requested protection, the government satisfied the first showing required by Parhat.
The government also satisfied the second part of the Parhat standard because we face no difficulty "determin[ing] whether the information [the government] has designated properly falls within the categor[y] it has described." Parhat, 532 F.3d at 853. The government designated for protection a precise item of information [redacted]that indisputably falls into the narrow category of [redacted]. Indeed, this case fits squarely within the government's rationale for protection. Although the government has determined [redacted]. As the [redacted] Declaration explains, [redacted]. Thus, the government met its burden for protection under Parhat.

B
Because the government satisfied Parhat, the district court was required to defer to the government's assessment of the harm to foreign relations and national security that would result from officially disclosing [redacted]. As we explained in Fitzgibbon, the failure to give deference when it is due is error. 911 F.2d 755 (D.C.Cir.1990). There, pursuant to a Freedom of Information Act request, the district court ordered the CIA to disclose information about a former CIA station location, over the CIA's objection that such disclosure would cause harm to national security. Id. at 758-59. We faulted the district court for "essentially perform[ing] its own calculus as to whether or not harm to the national security . . . would result from disclosure" of the information, and held it should have "accord[ed] substantial weight and deference" to the Executive Branch's "determination of possible harm." Id. at 766. Thus, "declin[ing] to adopt the abuse-of-discretion review that [the plaintiff] urge[d] upon us," we reversed. Id.
Here, the district court simply declared: I don't understand how [declining to protect [redacted]] will interfere in anything.. . . [redacted]
June 30 Tr. [redacted]; see also July 8 Op. [redacted] (rejecting as "speculative and conclusory" government's "arguments that the release [redacted] would cause significant *8 harm to the interests of the government"). It is not entirely clear why the district court found the [redacted] Declaration so baffling. As discussed above, it provided a detailed and logical explanation of the impact of [redacted] on the government's foreign relations and national security interests. Parhat did not free courts to substitute their own policy judgments for those of the executive. The district court was not entitled to toss the [redacted] Declaration aside merely because it disagreed with its premise. Deference required acknowledging [redacted], not the judiciary, is tasked with undertaking [redacted], and that the Executive Branch officials bearing this responsibility possess far greater resources and aptitude than the judiciary for determining what will aid, and what will undermine, their mission. The district court's inability to "understand" how permitting [redacted] "will interfere in anything," June 30 Tr. [redacted], did not license the court to "perform[] its own calculus as to whether or not harm to the national security . . . would result from [the] disclosure," Fitzgibbon, 911 F.2d at 766.
In particular, the district court erred by elevating Ameziane's interest [redacted] over the government's interest in [redacted]. Such prioritizing was an executive prerogative, and it was "not within the role of the [district] court[] to second-guess executive judgments made in furtherance of that branch's proper role." Bismullah, 501 F.3d at 187-88 (internal quotation marks omitted). Crucially, this does not mean Ameziane never will have the opportunity to [redacted]. Rather, it means only that those [redacted]. The failure to accord "substantial weight and deference," Fitzgibbon, 911 F.2d at 766, to the government's assessment of its foreign relations and national security interests was error.

C
Finally, the district court erred by basing its ruling on an inappropriate factor. The court held that the "[m]ost important[]" factor weighing against the government's request for protection was that "protecting [redacted] would serve little purpose" because [redacted] July 8 Op. [redacted]. The first problem with the district court's approach is [redacted]
[redacted]

IV
For the foregoing reasons, the government's motion to designate [redacted] as "protected" information under the Protective Order should have been granted. Thus, the order of the district court is
Reversed.
