/* ══════════════════════════════════════════════════════════════════
   PAN Implementation Guides — Evolved Stylesheet
   Palo Alto Networks VM-Series documentation styling

   Usage: <link rel="stylesheet" href="../../shared/css/pan-guides.css">
   Also requires Google Fonts in <head>:
   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Code+Pro:wght@400;500&display=swap" rel="stylesheet">
   ══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ───────────────────────────────────────────────── */
:root {
  /* Brand — aligned with the FDE Engineering Hub palette.
     pan-gold is the bright accent (used on dark rail/header surfaces);
     pan-navy is the dark brand surface/text color. */
  --pan-gold: #00B89C;
  --pan-gold-dark: #009880;
  --pan-navy: #1A2E22;
  --brand-dark: #1A2E22;
  --pan-teal: #00B89C;

  /* Links */
  --pan-link: #008E78;
  --pan-link-hover: #006B5C;
  --pan-link-light: #E0F7F4;

  /* Surfaces */
  --bg: #ffffff;
  --fg: #333333;
  --fg-light: #666666;
  --border: #dee2e6;
  --border-light: #eef0f2;
  --sidebar-bg: #f7f8fa;

  /* Code */
  --code-bg: #f8f9fa;
  --code-fg: #1a1a2e;
  --code-border: #e1e4e8;

  /* Callouts */
  --note-bg: #e7f3ff;
  --note-border: #3b82f6;
  --note-icon: #2563eb;
  --warn-bg: #fffbeb;
  --warn-border: #f59e0b;
  --warn-icon: #d97706;
  --danger-bg: #fef2f2;
  --danger-border: #ef4444;
  --danger-icon: #dc2626;
  --success-bg: #f0fdf4;
  --success-border: #22c55e;

  /* Layout
     --global-nav-width is 0: the old persistent left rail was replaced by a
     Hub-style top mega-nav (see .mega-nav below). Every margin/left-offset
     in this file that references it collapses automatically, so the rail's
     markup can stay in the DOM (reused for the mobile drawer) without
     reserving any desktop width. */
  --global-nav-width: 0px;
  --sidebar-width: 280px;
  --header-height: 56px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Source Code Pro', 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
}

/* ── Reset ───────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

/* ── Header Bar ──────────────────────────────────────────────────── */
/* Matches the FDE Engineering Hub's fixed, blurred mega-nav bar
   (hub/shared/styles.css .site-nav): translucent dark surface,
   backdrop blur, and a hairline teal-tinted bottom border/glow. */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(8, 18, 13, 0.97);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,184,156,0.12);
  box-shadow: 0 1px 0 rgba(0,184,156,0.05), 0 4px 24px rgba(0,0,0,0.3);
}
.site-header .logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.site-header .logo .accent {
  color: var(--pan-teal);
}
.nav-logo { height: 24px; width: auto; flex-shrink: 0; }
.header-section-title {
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 0.5rem;
  opacity: 0.75;
  color: rgba(255,255,255,0.75);
}
.site-header .header-nav {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.site-header .header-nav a {
  position: relative;
  color: rgba(255,255,255,0.58);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 4px 0;
  transition: color 0.18s;
}
.site-header .header-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--pan-teal);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.2s;
  border-radius: 2px 2px 0 0;
}
.site-header .header-nav a:hover { color: rgba(255,255,255,0.9); }
.site-header .header-nav a.active {
  color: var(--pan-teal);
  font-weight: 700;
}
.site-header .header-nav a.active::after { transform: scaleX(1); }
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ── Mega Nav (top dropdown bar) ──────────────────────────────────── *
 * Adapted from the FDE Engineering Hub's .site-nav mega-menu
 * (hub/shared/styles.css / hub/shared/nav.js): built by
 * initGlobalNav() in shared/js/pan-guides.js from GLOBAL_NAV_GROUPS,
 * one dropdown per section band, and injected into .site-header
 * ahead of the Home/Search links. Replaces the old persistent left
 * rail above 900px (see .global-nav above). */
.mega-nav {
  display: flex;
  list-style: none;
  align-items: center;
  height: 100%;
  margin-left: 1.5rem;
  gap: 0;
}
.mnav-item { position: relative; height: 100%; display: flex; align-items: center; }
.mnav-link {
  display: flex; align-items: center; gap: 4px;
  height: 100%; padding: 0 0.85rem;
  color: rgba(255,255,255,0.58);
  text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  white-space: nowrap;
  border: none; background: none; cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: -0.1px;
  position: relative;
  transition: color 0.18s;
}
.mnav-link::after {
  content: '';
  position: absolute; bottom: 0; left: 0.85rem; right: 0.85rem; height: 2px;
  background: var(--pan-teal);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.2s;
  border-radius: 2px 2px 0 0;
}
.mnav-item:hover .mnav-link,
.mnav-item.mnav-open .mnav-link,
.mnav-link.active { color: rgba(255,255,255,0.92); }
.mnav-link.active::after { transform: scaleX(1); }
.mnav-chevron {
  opacity: 0.45; transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.mnav-item:hover .mnav-chevron,
.mnav-item.mnav-open .mnav-chevron { transform: rotate(180deg); opacity: 0.8; }

.mnav-panel {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 300px; max-width: 420px;
  max-height: calc(100vh - var(--header-height) - 24px);
  overflow-y: auto;
  background: rgba(10, 20, 15, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(0,184,156,0.15);
  border-radius: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 10px 8px;
  z-index: 1100;
}
.mnav-item:hover .mnav-panel,
.mnav-item.mnav-open .mnav-panel {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mnav-panel-group { padding: 4px 0 8px; }
.mnav-panel-group:not(:last-child) { border-bottom: 1px solid rgba(0,184,156,0.08); margin-bottom: 4px; }
.mnav-panel-label {
  display: block;
  padding: 6px 10px 4px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--pan-teal);
}
.mnav-panel a {
  display: block;
  padding: 7px 10px; border-radius: 8px;
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  line-height: 1.3;
  transition: background 0.15s, color 0.15s;
}
.mnav-panel a:hover { background: rgba(0,184,156,0.1); color: #fff; }
.mnav-panel a.mnav-sub { padding-left: 1.25rem; font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.mnav-panel a.active { color: var(--pan-teal); font-weight: 600; background: rgba(0,184,156,0.08); }

@media (max-width: 900px) {
  .mega-nav { display: none; }
}

/* ── Layout ──────────────────────────────────────────────────────── */
.layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ── Landing Container (no sidebar pages) ────────────────────────── */
.landing-container {
  max-width: 960px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 2rem) 2rem 4rem;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: var(--global-nav-width); bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.25rem 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-section {
  padding: 0 1rem;
  margin-bottom: 0.75rem;
}
.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-light);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.15rem;
}
.sidebar a {
  display: block;
  padding: 0.35rem 0.75rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1.4;
}
.sidebar a:hover {
  background: rgba(0,0,0,0.04);
  color: var(--pan-link);
}
.sidebar a.active {
  background: var(--pan-link);
  color: #fff;
  font-weight: 600;
}
.sidebar a.sub-item {
  padding-left: 1.5rem;
  font-size: 0.8rem;
  color: var(--fg-light);
}
.sidebar a.sub-item.active { color: #fff; }

/* ── Sidebar Backdrop (mobile) ───────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}
.sidebar-backdrop.visible { display: block; }

/* ── Main Content ────────────────────────────────────────────────── */
.main-content {
  margin-left: calc(var(--global-nav-width) + var(--sidebar-width));
  flex: 1;
  min-width: 0;
}

/* Pages with no in-page sidebar still need to clear the global nav */
.main-content.no-sidebar {
  margin-left: var(--global-nav-width);
  max-width: 100%;
}

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb {
  padding: 0.75rem 2.5rem;
  font-size: 0.825rem;
  color: var(--fg-light);
  border-bottom: 1px solid var(--border-light);
  background: #fdfdfe;
}
.breadcrumb a {
  color: var(--pan-link);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep {
  margin: 0 0.4rem;
  color: var(--border);
}

/* ── Article ─────────────────────────────────────────────────────── */
.article {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 2.5rem 4rem;
}
.article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: zoom-in;
  transition: box-shadow 0.15s ease;
}
.article img:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* ── Image lightbox ──────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 20, 38, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
  animation: lightboxFade 0.15s ease;
}
.lightbox-overlay img {
  max-width: 95vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
@keyframes lightboxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
body.lightbox-open {
  overflow: hidden;
}
.article h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--pan-navy);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.article .subtitle {
  color: var(--fg-light);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--pan-gold);
}
.article h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pan-navy);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.article h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.article p { margin-bottom: 1rem; }
.article ul, .article ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.article li { margin-bottom: 0.35rem; }
.article a {
  color: var(--pan-link);
  text-decoration: none;
}
.article a:hover { text-decoration: underline; }
.article strong { font-weight: 600; }
.article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Cloud Links ─────────────────────────────────────────────────── */
.cloud-links {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.cloud-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
}
.cloud-links a:hover {
  border-color: var(--pan-link);
  color: var(--pan-link);
}
.cloud-links a.active {
  background: var(--pan-gold);
  border-color: var(--pan-gold);
  color: #fff;
  font-weight: 700;
}
.cloud-links a.active:hover {
  background: var(--pan-gold-dark);
  border-color: var(--pan-gold-dark);
  color: #fff;
}

/* ── Code Blocks ─────────────────────────────────────────────────── */
.code-block {
  position: relative;
  margin-bottom: 1rem;
}
.code-block pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.55;
  color: var(--code-fg);
  margin: 0;
}
.code-block .copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-family: var(--font-sans);
  color: var(--fg-light);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.code-block:hover .copy-btn { opacity: 1; }
.code-block .copy-btn:hover {
  background: var(--code-bg);
  color: var(--pan-link);
}
.code-block .copy-btn.copied { color: var(--success-border); }
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--code-fg);
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ── Tables ──────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
th, td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
}
th {
  background: var(--pan-navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tr:nth-child(even) { background: #f9fafb; }
tr:hover { background: #f0f4f8; }

/* ── Callout Boxes ───────────────────────────────────────────────── */
.callout {
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border-left: 4px solid;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.6;
}
.callout::before {
  position: absolute;
  left: 0.75rem;
  top: 0.85rem;
  font-size: 1rem;
  line-height: 1;
}
.callout p { margin-bottom: 0.5rem; }
.callout p:last-child { margin-bottom: 0; }
.callout ul, .callout ol { margin-bottom: 0.5rem; }

.callout-note {
  background: var(--note-bg);
  border-color: var(--note-border);
}
.callout-note::before { content: "\2139\FE0F"; }
.callout-note .callout-title { color: var(--note-icon); }

.callout-warning {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}
.callout-warning::before { content: "\26A0\FE0F"; }
.callout-warning .callout-title { color: var(--warn-icon); }

.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}
.callout-danger::before { content: "\1F6D1"; }
.callout-danger .callout-title { color: var(--danger-icon); }

.callout-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}
.callout-success::before { content: "\2705"; }

.callout-title {
  font-weight: 700;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

/* ── Method Banners ──────────────────────────────────────────────── */
.method-banner {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  border-left: 5px solid;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.method-banner .method-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.method-preferred {
  background: var(--success-bg);
  border-color: var(--success-border);
}
.method-preferred .method-badge { background: var(--success-border); }
.method-standard {
  background: var(--note-bg);
  border-color: var(--note-border);
}
.method-standard .method-badge { background: var(--note-border); }
.method-storage {
  background: #fff8e1;
  border-color: var(--pan-gold);
}
.method-storage .method-badge { background: var(--pan-gold-dark); }
.method-full {
  background: #fef2f2;
  border-color: #ef4444;
}
.method-full .method-badge { background: #ef4444; }

/* ── Checklist ───────────────────────────────────────────────────── */
.checklist {
  list-style: none;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.checklist li {
  padding: 0.4rem 0;
  padding-left: 1.75rem;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6rem;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-radius: 3px;
  background: #fff;
}
.checklist li a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}
.checklist li a:hover { color: var(--pan-link); }

/* ── Collapsible Sections ────────────────────────────────────────── */
.collapsible {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.collapsible-header {
  padding: 0.65rem 1rem;
  background: var(--sidebar-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  user-select: none;
  transition: background 0.15s;
}
.collapsible-header:hover { background: #eef0f3; }
.collapsible-header .chevron {
  transition: transform 0.2s;
  font-size: 0.75rem;
  color: var(--fg-light);
}
.collapsible-header.open .chevron { transform: rotate(90deg); }
.collapsible-body {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--border-light);
}
.collapsible-body.open { display: block; }

/* ── Quick Reference Box ─────────────────────────────────────────── */
.quick-ref {
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.quick-ref h3 {
  margin-top: 0;
  color: var(--pan-navy);
}

/* ── Version Badge ───────────────────────────────────────────────── */
.version-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  color: var(--fg-light);
  vertical-align: middle;
}
.version-badge.v11-1 { border-color: var(--pan-link); color: var(--pan-link); }
.version-badge.v11-2 { border-color: var(--success-border); color: #16a34a; }

.version-note {
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  background: #f5f3ff;
  border-left: 4px solid #8b5cf6;
  font-size: 0.88rem;
}
.version-note .version-badge { margin-right: 0.35rem; }

/* ── Management Plane Tabs ───────────────────────────────────────── */
.mgmt-tabs {
  margin-bottom: 1.5rem;
}
.mgmt-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
}
.mgmt-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-light);
  transition: all 0.15s;
}
.mgmt-tab:hover {
  color: var(--pan-link);
}
.mgmt-tab.active {
  color: var(--pan-link);
  border-bottom-color: var(--pan-link);
  font-weight: 600;
}
.mgmt-panel {
  display: none;
  padding: 1rem 0;
}
.mgmt-panel.active { display: block; }

/* ── Fork Banner ─────────────────────────────────────────────────── */
.fork-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--pan-navy);
  border-radius: 6px 6px 0 0;
  padding: 11px 18px;
  margin-bottom: 0;
  margin-top: 1.25rem;
}
.fork-banner .fork-icon {
  background: var(--pan-gold);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fork-banner .fork-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--pan-navy);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fork-banner .fork-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fork-banner .fork-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pan-gold);
}
.fork-banner .fork-desc {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}
.fork-banner .fork-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
/* When a fork-banner immediately precedes a mgmt-tabs, flush the top radius */
.fork-banner + .mgmt-tabs {
  margin-top: 0;
}
.fork-banner + .mgmt-tabs .mgmt-tab-bar {
  border-top: 1px solid var(--border);
}

/* ── Progress Bar ────────────────────────────────────────────────── */
.progress-phases {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.progress-phase {
  flex: 1;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-light);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s;
}
.progress-phase:last-child { border-right: none; }
.progress-phase:hover {
  background: #eef0f3;
  color: var(--fg);
}
.progress-phase.active {
  background: var(--pan-link);
  color: #fff;
}
.progress-phase.completed {
  background: var(--success-bg);
  color: #16a34a;
}
.progress-phase-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 0.15rem;
}

/* ── Back to Top ─────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 40px; height: 40px;
  background: var(--pan-gold);
  color: #333;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 500;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--pan-gold-dark); }

/* ── Cloud Cards (landing pages) ─────────────────────────────────── */
.cloud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.cloud-card {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cloud-card:hover {
  border-color: var(--pan-link);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.cloud-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.cloud-card p {
  font-size: 0.95rem;
  color: var(--fg-light);
  margin-bottom: 1rem;
}
.cloud-card .guide-links {
  display: flex;
  gap: 0.75rem;
}
.cloud-card .guide-links a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--pan-link);
  border-radius: 4px;
  color: var(--pan-link);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.cloud-card .guide-links a:hover {
  background: var(--pan-link);
  color: #fff;
}
.card-aws { border-top: 4px solid #ff9900; }
.card-azure { border-top: 4px solid #0078d4; }
.card-gcp { border-top: 4px solid #4285f4; }
.card-oci { border-top: 4px solid #C74634; }

/* ── Download Buttons ────────────────────────────────────────────── */
a.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--pan-link);
  border-radius: 5px;
  color: var(--pan-link);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
a.dl-btn:hover {
  background: var(--pan-link);
  color: #fff;
  text-decoration: none;
}

/* ── Prerequisite List ───────────────────────────────────────────── */
.prereq-list { list-style: none; padding: 0; }
.prereq-list li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
}
.prereq-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.65rem;
  width: 12px; height: 12px;
  border: 2px solid var(--border);
  border-radius: 2px;
}
.prereq-list .cloud-specific::before { border-color: var(--pan-link); }
.prereq-list .cloud-specific {
  color: var(--pan-link);
  font-style: italic;
}

/* ── Guide Catalog (top-level landing) ──────────────────────────── */
.guide-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  /* Each card sizes to its own content. Stretching is the grid default, and
   * with it a two-link card beside a nine-link one grew to match and left a
   * hole under its last link. That is why cards used to be ordered by
   * descending link count; they are alphabetical now, so the order cannot be
   * relied on to keep neighbours a similar height. */
  align-items: start;
}

/* The one page that introduces a whole section, between the band blurb and
 * the cards. Reads as a link rather than a card so it does not compete with
 * the product families below it. */
.catalog-overview {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.5rem;
  font-weight: 600;
  color: var(--pan-link);
  text-decoration: none;
}
.catalog-overview::before {
  content: "\2192";           /* → */
  font-weight: 400;
}
.catalog-overview:hover,
.catalog-overview:focus-visible {
  color: var(--pan-link-hover);
  text-decoration: underline;
}
.catalog-overview-note {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--fg-light);
}
.catalog-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,0.05), 0 4px 16px rgba(15,23,42,0.04);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), border-color 0.2s, box-shadow 0.2s;
}
.catalog-card:hover {
  border-color: rgba(0,184,156,0.3);
  box-shadow: 0 20px 48px rgba(0,184,156,0.12), 0 4px 16px rgba(15,23,42,0.06);
  transform: translateY(-4px);
}
.catalog-card.coming-soon {
  opacity: 0.6;
}
.catalog-card.coming-soon:hover {
  border-color: var(--border);
  box-shadow: none;
  opacity: 0.7;
}
.catalog-card-header {
  padding: 0.9rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  /* Neutral default, so a card with no accent class still gets a bar and
   * lines up with its neighbours instead of sitting 4px taller. */
  border-top: 4px solid var(--border);
}
/* Card accents.
 *
 * These were hand-written `style="background:linear-gradient(...)"` attributes
 * on 22 cards across four pages, which is how the same gold acquired two
 * different tints, how five AI Gateway cards ended up four different colours,
 * and how `card-scm` came to be used twice while never being defined at all,
 * leaving those two cards with no accent bar.
 *
 * There are two kinds of accent and no third:
 *
 *   1. A cloud card takes that cloud's brand colour. Readers recognise these.
 *   2. Everything else takes the colour of its section band in the global nav,
 *      so a card on the landing page and its group in the left rail agree.
 *
 * An accent names a section, not a rank, and it goes on the header, never on
 * `.catalog-card` itself. Do not pick one for variety: every card in a section
 * takes the same accent. Adding a colour here means adding a section to the
 * nav, not giving one guide a look of its own.
 */
.catalog-card-header.card-aws      { background: linear-gradient(135deg, #fff7e6 0%, #fff 100%); border-top-color: #ff9900; }
.catalog-card-header.card-azure    { background: linear-gradient(135deg, #e8f4ff 0%, #fff 100%); border-top-color: #0078d4; }
.catalog-card-header.card-gcp      { background: linear-gradient(135deg, #e8f0fe 0%, #fff 100%); border-top-color: #4285f4; }
.catalog-card-header.card-oci      { background: linear-gradient(135deg, #fbeceb 0%, #fff 100%); border-top-color: #C74634; }
.catalog-card-header.card-netsec   { background: linear-gradient(135deg, #eef5f2 0%, #fff 100%); border-top-color: #1A2E22; }
.catalog-card-header.card-ai       { background: linear-gradient(135deg, #e0f7f4 0%, #fff 100%); border-top-color: #00B89C; }
.catalog-card-header.card-platform { background: linear-gradient(135deg, #e0f2fe 0%, #fff 100%); border-top-color: #0ea5e9; }
.catalog-card-header.card-ref      { background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%); border-top-color: #8b5cf6; }
.catalog-card-header.card-lab      { background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%); border-top-color: #0d9488; }
/* Labs are not deployment guides, so their badge is filled rather than grey.
 * This is the one place a card badge carries its accent colour. */
.catalog-card-header.card-lab .catalog-badge { background: #0d9488; color: #fff; }
.catalog-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-light);
  background: rgba(0,0,0,0.06);
  margin-bottom: 0.5rem;
}
.catalog-card-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pan-navy);
  margin: 0;
}
.catalog-card-body {
  padding: 1rem 1.25rem 1.1rem;
}
.catalog-card-body p {
  font-size: 0.9rem;
  color: var(--fg-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.catalog-tags .tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--pan-link);
  background: var(--pan-link-light);
}
.catalog-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.catalog-link-primary {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--pan-link);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}
.catalog-link-primary:hover { background: var(--pan-link-hover); }
.catalog-link-secondary {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--fg) !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
}
.catalog-link-secondary:hover {
  border-color: var(--pan-link);
  color: var(--pan-link) !important;
}

/* ── Catalog cards that list their guides ────────────────────────────
 *
 * The button pair above works for a card that fronts one guide. It does not
 * work for a card fronting nine: nine buttons is not a list, it is a wall.
 * The landing page uses this variant instead, so a card can name every guide
 * under it and still be scanned in a second.
 */
.catalog-guide-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  border-top: 1px solid var(--border-light);
}
.catalog-guide-list li {
  margin: 0;
  border-bottom: 1px solid var(--border-light);
}
.catalog-guide-list a {
  display: block;
  padding: 0.4rem 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pan-navy);
  text-decoration: none;
  border-radius: 3px;
}
.catalog-guide-list a:visited { color: var(--pan-navy); }
.catalog-guide-list a:hover,
.catalog-guide-list a:focus-visible {
  background: var(--pan-link-light);
  text-decoration: none;
}
/* The note sits under its link rather than beside it. Beside it, the longest
 * note in a card sets a column width that wastes the whole card's right edge
 * on the shortest one. */
.catalog-guide-note {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--fg-light);
}
/* Equal-height cards with their links pinned to the bottom edge. These rules
 * lived in a local <style> block in docs/index.html, so the landing page had
 * aligned cards and all seven hub pages had ragged ones. */
.catalog-card {
  display: flex;
  flex-direction: column;
}
.catalog-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* On a button-style card the blurb takes the slack. On a list card the hub
 * link does, via its auto top margin, so the blurb must not compete for it. */
.catalog-card-body:not(.catalog-card-body-list) > p { flex: 1; }
.catalog-links { margin-top: auto; }
.catalog-hub-link {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pan-link);
  text-decoration: none;
}
.catalog-hub-link:visited { color: var(--pan-link); }
.catalog-hub-link:hover { text-decoration: underline; }
.catalog-soon {
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--fg-light);
}

/* Long lists collapse to their first few entries.
 *
 * One card fronts eleven guides, and eleven rows of link plus note made that
 * card 1,072px tall. Grid rows take the height of their tallest member, so
 * that one card set the height of every card beside it.
 *
 * The markup still carries every link: the collapse is applied by script on
 * load, so the committed file stays complete for search indexing, for reading
 * with JavaScript off, and for print, where the rules below restore the full
 * list. `hidden` is not used, because a stylesheet that fails to load would
 * then hide the links for good.
 */
.catalog-guide-list li.catalog-guide-hidden { display: none; }
.catalog-more {
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pan-link);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.catalog-more:hover { text-decoration: underline; }
@media print {
  .catalog-guide-list li.catalog-guide-hidden { display: list-item; }
  .catalog-more { display: none; }

  /* Both navs are fixed panels, so printing a guide put them over the top of
   * the first page and left the text indented past them on every page after.
   * Now that they share a wrapper, one selector drops both. */
  .mobile-nav, .sidebar-backdrop, .hamburger { display: none !important; }
  .main-content, .main-content.no-sidebar,
  body.has-global-nav .landing-container, .landing-wide { margin-left: 0 !important; }

  /* Navigation back into the site means nothing on paper. */
  .page-footer-links { display: none !important; }
}

/* ── Page Footer Links ──────────────────────────────────────
 * The print companions (prerequisites, questionnaire, teardown procedure)
 * carry a .pdf-header instead of the site header, so they have no global
 * nav and no sidebar by design: they are written to be exported and handed
 * to a customer. They are also catalogued site pages reachable from the
 * landing page and the left rail, and until this existed a reader who
 * arrived that way had no link back out. Hidden in print, per above.
 */
.page-footer-links {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--fg-light);
}

.page-footer-links p { margin: 0; }

/* ── Download as Markdown Button ─────────────────────────────────── */
.download-md-btn {
  position: fixed;
  bottom: 2rem;
  right: 5rem;
  height: 40px;
  padding: 0 1rem;
  background: var(--pan-navy);
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 500;
}
.download-md-btn.visible {
  opacity: 1;
  transform: translateY(0);
}
.download-md-btn:hover { background: var(--pan-link); }
.download-md-btn.downloaded {
  background: var(--success-border);
}

/* ── Dark Mode ───────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    /* Surfaces */
    --bg: #1a1b26;
    --fg: #c9d1d9;
    --fg-light: #8b949e;
    --border: #30363d;
    --border-light: #21262d;
    --sidebar-bg: #161b22;

    /* Code */
    --code-bg: #0d1117;
    --code-fg: #e6edf3;
    --code-border: #30363d;

    /* Brand — lighten navy for readability on dark backgrounds */
    --pan-navy: #4DD4BA;

    /* Links */
    --pan-link: #33CAAF;
    --pan-link-hover: #4DD4BA;
    --pan-link-light: #10342e;

    /* CLI-specific */
    --header-bg: #3B5A7D;
    --header-fg: #E0E3E8;
    --error-bg: #3A2F1A;
    --error-border: #E0A516;
    --error-fg: #E0A516;
    --typeahead-bg: #161b22;
    --typeahead-shadow: rgba(0,0,0,0.4);

    /* Callouts */
    --note-bg: #0c2d4d;
    --note-border: #1f6feb;
    --note-icon: #58a6ff;
    --warn-bg: #2d2000;
    --warn-border: #d29922;
    --warn-icon: #e3b341;
    --danger-bg: #3d1111;
    --danger-border: #f85149;
    --danger-icon: #f85149;
    --success-bg: #0d2818;
    --success-border: #3fb950;
  }

  /* Breadcrumb */
  .breadcrumb { background: var(--sidebar-bg); }

  /* Tables */
  th { background: #21262d; }
  tr:nth-child(even) { background: #161b22; }
  tr:hover { background: #1c2332; }

  /* Collapsibles */
  .collapsible-header:hover { background: #21262d; }

  /* Checklist */
  .checklist li::before { background: var(--bg); }

  /* Method banners */
  .method-preferred { background: var(--success-bg); }
  .method-standard { background: var(--note-bg); }
  .method-storage { background: #2d2000; }
  .method-full { background: var(--danger-bg); }

  /* Cloud cards */
  .cloud-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

  /* Catalog cards */
  .catalog-card { background: #20242e; border-color: var(--border); }
  .catalog-card:hover { box-shadow: 0 20px 48px rgba(0,184,156,0.18), 0 4px 16px rgba(0,0,0,0.3); }
  .catalog-card-header { border-bottom-color: var(--border); }
  .catalog-card-header.card-aws { background: linear-gradient(135deg, #2d2000 0%, #20242e 100%); }
  .catalog-card-header.card-azure { background: linear-gradient(135deg, #0c2d4d 0%, #20242e 100%); }
  .catalog-card-header.card-gcp { background: linear-gradient(135deg, #0c2d4d 0%, #20242e 100%); }
  .catalog-card-header.card-oci { background: linear-gradient(135deg, #3a1512 0%, #20242e 100%); }
  .catalog-card-header.card-ref { background: linear-gradient(135deg, #1c1535 0%, #20242e 100%); }
  .catalog-card-header.card-netsec { background: linear-gradient(135deg, #10241a 0%, #20242e 100%); }
  .catalog-card-header.card-ai { background: linear-gradient(135deg, #073530 0%, #20242e 100%); }
  .catalog-card-header.card-platform { background: linear-gradient(135deg, #0c2d4d 0%, #20242e 100%); }
  .catalog-card-header.card-lab { background: linear-gradient(135deg, #0a2e29 0%, #20242e 100%); }
  .catalog-card-header h3 { color: #fff; }
  .catalog-badge { background: rgba(255,255,255,0.1); color: var(--fg-light); }
  .catalog-guide-list { border-top-color: var(--border); }
  .catalog-guide-list li { border-bottom-color: var(--border); }
  .catalog-guide-list a { color: #e6edf3; }
  .catalog-guide-list a:visited { color: #e6edf3; }
  .catalog-guide-list a:hover, .catalog-guide-list a:focus-visible { background: rgba(0,184,156,0.12); }

  /* Provenance badges (CLI pages) */
  .provenance-ssh { background: #1A3A47; color: #8CC4E0; }
  .provenance-docs { background: #2A2D35; color: #9DA3AE; }
  .provenance-live-capture { background: #1A3A22; color: #81C784; }
  .provenance-synthesized { background: #3A2F1A; color: #E0A516; }

  /* Back-to-top and download buttons */
  .back-to-top { color: #1a1b26; }
  .download-md-btn { box-shadow: 0 2px 8px rgba(0,0,0,0.4); }

  /* Version badges */
  .version-note { background: #1c1535; border-color: #8b5cf6; }

  /* Images — soften borders */
  .article img { border-color: var(--border); }

  /* Copy button */
  .code-block .copy-btn { background: var(--bg); }
  .code-block .copy-btn:hover { background: var(--code-bg); }
}

/* ── Responsive: Tablet ─────────────────────────────────────────── */
@media (max-width: 900px) {
  /* The sidebar no longer slides on its own: it is one of two lists inside
   * .mobile-nav, and the drawer does the sliding. See "Global Navigation". */
  .main-content { margin-left: 0; }
  .article { padding: 1.5rem 1.25rem 3rem; }
  .breadcrumb { padding: 0.75rem 1.25rem; }
  .hamburger {
    display: block;
    margin-right: 0.75rem;
  }
  .guide-catalog { grid-template-columns: 1fr; }
  .download-md-btn { right: 1rem; bottom: 5rem; }
  .landing-container { padding: calc(var(--header-height) + 1.5rem) 1.25rem 3rem; }
  .progress-phase { padding: 0.5rem 0.5rem; font-size: 0.7rem; }
  .progress-phase-label { font-size: 0.6rem; }
  .header-nav { gap: 0.75rem; }
  .header-nav a { font-size: 0.8rem; }
}

/* ── Search Modal ──────────────────────────────────────────────── */
.search-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
}
.search-modal-overlay.visible { display: flex; }

.search-modal {
  width: 580px;
  max-width: 92vw;
  max-height: 70vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.search-icon { color: var(--fg-light); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--fg);
  background: transparent;
}
.search-input::placeholder { color: #aaa; }
.search-kbd {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.7rem;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg-light);
  background: var(--sidebar-bg);
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}
.search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--fg-light);
  font-size: 0.9rem;
}

.search-result {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
  transition: background 0.1s;
}
.search-result:hover,
.search-result.active {
  background: var(--pan-link-light, #e8f2fc);
}
.search-result-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--pan-navy);
}
.search-result-breadcrumb {
  font-size: 0.75rem;
  color: var(--fg-light);
  margin-top: 1px;
}
.search-result-snippet {
  font-size: 0.8rem;
  color: var(--fg-light);
  margin-top: 3px;
  line-height: 1.4;
}
.search-result-snippet mark {
  background: #fff3cd;
  color: var(--fg);
  border-radius: 2px;
  padding: 0 1px;
}

.search-footer {
  display: flex;
  gap: 1.25rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--fg-light);
}
.search-footer kbd {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.65rem;
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--sidebar-bg);
  margin-right: 2px;
}

.header-search-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.2s, background 0.2s;
}
.header-search-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
}
.header-search-btn kbd {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.65rem;
  padding: 1px 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .search-modal { max-height: 85vh; }
  .search-footer { display: none; }
  .header-search-btn kbd { display: none; }
}

/* ── Responsive: Phone ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .guide-catalog { grid-template-columns: 1fr; }
  .cloud-grid { grid-template-columns: 1fr; }
  .table-wrap { margin: 0 -1.25rem 1.5rem; padding: 0 1.25rem; }
  .mgmt-tab-bar { overflow-x: auto; }
  .mgmt-tab { font-size: 0.75rem; padding: 0.5rem 0.65rem; white-space: nowrap; }
  .cloud-links { flex-wrap: wrap; }
  .progress-phases { flex-direction: column; }
  .progress-phase { border-right: none; border-bottom: 1px solid var(--border); }
  .progress-phase:last-child { border-bottom: none; }

  /* The whole nav used to be hidden here, which took search with it and left
   * a phone with no way to find anything. Home is in the drawer, so only the
   * text links go; search stays, as its icon. */
  .site-header .header-nav a { display: none; }
  .header-search-btn {
    font-size: 0;
    gap: 0;
    padding: 0.3rem 0.45rem;
  }
  .header-section-title { display: none; }
}

/* ── Update Banner ──────────────────────────────────────────────── */
.update-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #78350f;
}
.update-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: update-pulse 1.8s ease-in-out infinite;
}
@keyframes update-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.7); }
}
.update-banner-text {
  flex: 1;
}
.update-banner-text strong {
  font-weight: 700;
}
.update-banner-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: #92400e;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
  opacity: 0.6;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.update-banner-dismiss:hover { opacity: 1; }

/* ── Global Navigation ────────────────────────────────────────── */
.global-nav {
  position: fixed;
  top: var(--header-height);
  left: 0; bottom: 0;
  width: var(--global-nav-width);
  background: #0d1f33;
  overflow-y: auto;
  z-index: 90;
  padding: 0.75rem 0 2rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.gnav-home {
  padding: 0.5rem 0.75rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.4rem;
}
.gnav-home a {
  display: block;
  color: var(--pan-gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.25rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.gnav-home a:hover { background: rgba(255,255,255,0.07); }
/* Band heading over a run of groups. Not clickable, not a group itself. */
.gnav-section {
  display: block;
  padding: 0.8rem 0.75rem 0.28rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pan-gold);
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 0.35rem;
}
.gnav-section:first-of-type { border-top: none; margin-top: 0.1rem; }
.gnav-group { margin-bottom: 0.1rem; }
.gnav-group-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin: 0;
  padding: 0.32rem 0.75rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: left;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.gnav-group-header:hover { color: rgba(255,255,255,0.75); }
.gnav-group-header:focus-visible {
  outline: 2px solid var(--pan-gold);
  outline-offset: -2px;
  color: rgba(255,255,255,0.9);
}
/* How many pages are inside, so a collapsed group still says something. */
.gnav-count {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0;
  color: rgba(255,255,255,0.3);
}
.gnav-group-header:hover .gnav-count { color: rgba(255,255,255,0.5); }
.gnav-chevron {
  display: inline-block;
  font-size: 0.55rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  opacity: 0.6;
}
.gnav-group.open .gnav-chevron { transform: rotate(90deg); }
.gnav-group-body { display: none; padding-bottom: 0.25rem; }
.gnav-group.open .gnav-group-body { display: block; }
.gnav-group-body a {
  display: block;
  padding: 0.26rem 0.75rem 0.26rem 1.1rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.4;
  border-left: 2px solid transparent;
  transition: background 0.1s, color 0.1s;
}
.gnav-group-body a:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
}
.gnav-group-body a.active {
  background: rgba(0,184,156,0.14);
  color: var(--pan-gold);
  border-left-color: var(--pan-gold);
  font-weight: 600;
}
.gnav-group-body a.gnav-sub {
  padding-left: 1.6rem;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.5);
}
.gnav-group-body a.gnav-sub:hover { color: rgba(255,255,255,0.8); }
.gnav-group-body a.gnav-sub.active { color: var(--pan-gold); }
.gnav-label {
  display: block;
  padding: 0.45rem 0.75rem 0.1rem 1.1rem;
  font-size: 0.61rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.28);
  margin-top: 0.3rem;
}

/* Adjust landing-container when global nav present */
body.has-global-nav .landing-container {
  margin-left: var(--global-nav-width);
}

/* The rail itself only ever renders inside the mobile drawer now (see
 * .mobile-nav .global-nav overrides below) — above 900px navigation lives
 * in the top .mega-nav instead. */
@media (min-width: 901px) {
  .global-nav { display: none; }
}

@media (prefers-color-scheme: dark) {
  .global-nav { background: #0a1520; border-right-color: rgba(255,255,255,0.05); }
}

/* Wrapper the script puts around both navs. It generates no box here, so the
 * desktop layout is exactly what it was when the two were separate. */
.mobile-nav { display: contents; }
.mobile-nav-label { display: none; }

@media (max-width: 900px) {
  .main-content { margin-left: 0; }
  .main-content.no-sidebar { margin-left: 0; }
  body.has-global-nav .landing-container { margin-left: 0; }

  /* One drawer, holding the page contents and the site rail in that order. */
  .mobile-nav {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0; bottom: 0;
    width: min(320px, 86vw);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 120;
    transform: translateX(-100%);
    /* Hidden, not merely shifted. A closed panel that is still `visible`
     * keeps its links in the tab order and in the accessibility tree, so a
     * keyboard or screen-reader user walks the whole site nav before reaching
     * the page. Transitioned alongside transform so it stays visible for the
     * length of the slide. */
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
  }
  .mobile-nav.open { transform: translateX(0); visibility: visible; }

  /* Both navs are fixed panels on desktop. In the drawer they are just two
   * stacked lists, so everything that positioned them has to come off. */
  .mobile-nav .sidebar,
  .mobile-nav .global-nav {
    position: static;
    width: auto;
    height: auto;
    top: auto; left: auto; bottom: auto;
    transform: none;
    overflow: visible;
    border-right: none;
    box-shadow: none;
    padding: 0.5rem 0 1rem;
  }
  /* The rail is white-on-navy. Inside a light drawer it has to invert. */
  .mobile-nav .global-nav { background: transparent; }
  .mobile-nav .gnav-home a { color: var(--pan-link); }
  .mobile-nav .gnav-home { border-bottom-color: var(--border); }
  .mobile-nav .gnav-section { color: var(--fg-light); border-top-color: var(--border); }
  .mobile-nav .gnav-group-header { color: var(--fg); }
  .mobile-nav .gnav-group-header:hover { color: var(--pan-link); }
  .mobile-nav .gnav-count { color: var(--fg-light); }
  .mobile-nav .gnav-group-body a { color: var(--fg); }
  .mobile-nav .gnav-group-body a:hover { background: rgba(0,0,0,0.04); color: var(--pan-link); }
  .mobile-nav .gnav-group-body a.active {
    background: var(--pan-link);
    color: #fff;
    border-left-color: var(--pan-navy);
  }
  .mobile-nav .gnav-group-body a.gnav-sub { color: var(--fg-light); }
  .mobile-nav .gnav-group-body a.gnav-sub.active { color: #fff; }
  .mobile-nav .gnav-label { color: var(--fg-light); }

  /* Says which list is which, now that they sit on top of each other. */
  .mobile-nav-label {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.55rem 1rem 0.5rem;
    background: var(--pan-navy);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  /* Tables are authored bare, with no scrolling wrapper anywhere in the repo,
   * so a wide one drags the whole page sideways. Scroll it in place instead. */
  .article table,
  .landing-container table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.drawer-open { overflow: hidden; }
}

/* ── Playbook download bar ────────────────────────────────────────────────────
 * The download element each guide carries for its delivery playbook. Rendered
 * by docs/shared/js/playbook-download.js into a single empty div, so a guide
 * needs one line of markup rather than a block that can drift between pages.
 */
.playbook-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.1rem;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--pan-gold);
  border-radius: 8px;
  background: var(--sidebar-bg);
}
.playbook-bar-main { flex: 1 1 22rem; min-width: 0; }
.playbook-bar-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pan-navy);
  margin-bottom: 0.2rem;
}
.playbook-bar-text {
  display: block;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--fg-light);
}
.playbook-bar-stats {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--fg-light);
}
.playbook-bar-stats strong { color: var(--fg); font-weight: 600; }
.playbook-bar-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.playbook-variant {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: var(--fg-light);
}
.playbook-variant select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--fg);
}
.playbook-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--pan-navy);
  background: var(--pan-navy);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.playbook-btn:hover { background: #003a6b; }
.playbook-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: #059669;
}

@media print {
  .playbook-bar { display: none; }
}
