/* ============================================================
   zGovern Documentation — Comprehensive Stylesheet
   ============================================================ */

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Brand colors */
  --sidebar-bg: hsl(230, 40%, 12%);
  --sidebar-border: hsl(230, 35%, 18%);
  --sidebar-text: hsl(220, 20%, 70%);
  --sidebar-text-hover: hsl(0, 0%, 100%);
  --sidebar-active-bg: hsl(234, 89%, 60%);
  --sidebar-active-text: #ffffff;
  --sidebar-section-label: hsl(220, 15%, 45%);

  --accent: hsl(234, 89%, 60%);
  --accent-hover: hsl(234, 89%, 52%);
  --accent-light: hsl(234, 89%, 95%);
  --accent-border: hsl(234, 89%, 75%);

  /* Neutral palette */
  --white: #ffffff;
  --gray-50: #f8f9fc;
  --gray-100: #f1f3f8;
  --gray-200: #e4e8f0;
  --gray-300: #cdd3df;
  --gray-400: #9aa3b4;
  --gray-500: #6b7585;
  --gray-600: #4a5264;
  --gray-700: #343b4d;
  --gray-800: #1f2433;
  --gray-900: #0f1219;

  /* Semantic colors */
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --info: #0284c7;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --tip: #7c3aed;
  --tip-bg: #faf5ff;
  --tip-border: #ddd6fe;

  /* Code */
  --code-bg: #1e2330;
  --code-text: #e2e8f0;
  --code-comment: #64748b;
  --code-keyword: #818cf8;
  --code-string: #34d399;
  --code-number: #fb923c;
  --code-inline-bg: hsl(220, 25%, 94%);
  --code-inline-text: hsl(234, 60%, 40%);

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 56px;
  --content-max: 860px;
  --toc-width: 220px;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;

  /* Spacing */
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.07);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray-800);
  background: var(--gray-50);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

img { max-width: 100%; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.6875rem;
  color: var(--sidebar-section-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* Sidebar Search */
.sidebar-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  padding: 7px 12px;
  background: hsl(230, 40%, 17%);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.sidebar-search input::placeholder {
  color: var(--sidebar-section-label);
}

.sidebar-search input:focus {
  border-color: var(--accent);
  background: hsl(230, 40%, 19%);
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 16px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: hsl(230, 35%, 22%); }

.nav-section {
  margin-bottom: 4px;
}

.nav-section-label {
  display: block;
  padding: 8px 20px 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-section-label);
}

.nav-section a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  font-size: 0.875rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 0;
  transition: color 0.12s, background 0.12s;
  position: relative;
}

.nav-section a:hover {
  color: var(--sidebar-text-hover);
  background: hsl(230, 40%, 17%);
  text-decoration: none;
}

.nav-section a.active {
  color: var(--sidebar-active-text);
  background: var(--accent);
  font-weight: 500;
}

.nav-section a.active:hover {
  background: var(--accent-hover);
  color: #fff;
}

.nav-section a .nav-icon {
  font-size: 0.875rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.nav-section a.active .nav-icon {
  opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-footer a {
  display: block;
  font-size: 0.8125rem;
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: var(--radius);
  transition: color 0.12s, background 0.12s;
}

.sidebar-footer a:hover {
  color: var(--sidebar-text-hover);
  background: hsl(230, 40%, 17%);
  text-decoration: none;
}

/* ── Main Layout ──────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb .sep {
  color: var(--gray-300);
}

.breadcrumb .current {
  color: var(--gray-700);
  font-weight: 500;
}

/* ── Content Area ─────────────────────────────────────────── */
.content-wrapper {
  display: flex;
  flex: 1;
  padding: 40px 40px 60px;
  gap: 48px;
  max-width: 1200px;
}

.content {
  flex: 1;
  min-width: 0;
  max-width: var(--content-max);
}

/* ── TOC Sidebar ──────────────────────────────────────────── */
.toc {
  width: var(--toc-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--topbar-height) + 32px);
  align-self: flex-start;
  max-height: calc(100vh - var(--topbar-height) - 64px);
  overflow-y: auto;
}

.toc-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 1px;
}

.toc-list a {
  display: block;
  font-size: 0.8125rem;
  color: var(--gray-500);
  text-decoration: none;
  padding: 3px 0;
  border-left: 2px solid var(--gray-200);
  padding-left: 10px;
  transition: color 0.12s, border-color 0.12s;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.toc-list a.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 500;
}

.toc-list .toc-l2 a {
  padding-left: 20px;
  font-size: 0.75rem;
}

/* ── Typography ───────────────────────────────────────────── */
.content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  margin-top: 48px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.35;
  margin-top: 32px;
  margin-bottom: 10px;
}

.content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-top: 24px;
  margin-bottom: 8px;
}

.content p {
  margin-bottom: 16px;
  color: var(--gray-700);
}

.content ul,
.content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.content li {
  margin-bottom: 6px;
  color: var(--gray-700);
}

.content li > ul,
.content li > ol {
  margin-top: 6px;
  margin-bottom: 4px;
}

.page-lead {
  font-size: 1.0625rem;
  color: var(--gray-500);
  margin-bottom: 32px;
  line-height: 1.65;
}

/* ── Inline Code ──────────────────────────────────────────── */
code {
  font-family: var(--font-mono);
  font-size: 0.825em;
  background: var(--code-inline-bg);
  color: var(--code-inline-text);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
}

/* ── Code Blocks ──────────────────────────────────────────── */
pre {
  background: var(--code-bg);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
  border: 1px solid hsl(220, 25%, 20%);
}

pre code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: transparent;
  color: var(--code-text);
  padding: 0;
  border: none;
  border-radius: 0;
  line-height: 1.65;
  tab-size: 2;
}

.code-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: hsl(220, 30%, 16%);
  border: 1px solid hsl(220, 25%, 20%);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--gray-400);
}

.code-label + pre {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-top: 0;
}

/* Syntax colors */
.kw  { color: #818cf8; }   /* keywords */
.str { color: #34d399; }   /* strings */
.num { color: #fb923c; }   /* numbers */
.cmt { color: #475569; font-style: italic; } /* comments */
.prp { color: #94a3b8; }   /* properties */
.fn  { color: #60a5fa; }   /* functions */
.url { color: #38bdf8; }   /* URLs */
.typ { color: #f0abfc; }   /* types */

/* HTTP method badges */
.http-method {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  letter-spacing: 0.05em;
}
.http-get    { background: #dcfce7; color: #15803d; }
.http-post   { background: #dbeafe; color: #1d4ed8; }
.http-patch  { background: #fef3c7; color: #b45309; }
.http-delete { background: #fee2e2; color: #b91c1c; }

/* ── Tables ───────────────────────────────────────────────── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 20px 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.docs-table thead th {
  background: var(--gray-50);
  padding: 11px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

.docs-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
}

.docs-table tbody tr:last-child {
  border-bottom: none;
}

.docs-table tbody tr:hover {
  background: var(--gray-50);
}

.docs-table tbody tr:nth-child(even) {
  background: hsl(220, 30%, 98%);
}

.docs-table tbody tr:nth-child(even):hover {
  background: var(--gray-50);
}

.docs-table td {
  padding: 11px 16px;
  color: var(--gray-700);
  vertical-align: top;
  line-height: 1.55;
}

.docs-table td strong {
  color: var(--gray-800);
  font-weight: 600;
}

/* ── Badges / Pills ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-success   { background: var(--success-bg);  color: var(--success);  border: 1px solid var(--success-border); }
.badge-warning   { background: var(--warning-bg);  color: var(--warning);  border: 1px solid var(--warning-border); }
.badge-danger    { background: var(--danger-bg);   color: var(--danger);   border: 1px solid var(--danger-border); }
.badge-info      { background: var(--info-bg);     color: var(--info);     border: 1px solid var(--info-border); }
.badge-muted     { background: var(--gray-100);    color: var(--gray-600); border: 1px solid var(--gray-200); }
.badge-accent    { background: var(--accent-light); color: var(--accent);  border: 1px solid var(--accent-border); }

/* ── Alert Boxes ──────────────────────────────────────────── */
.alert {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin: 20px 0;
  border-left: 4px solid;
  font-size: 0.875rem;
  line-height: 1.6;
}

.alert-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-body strong {
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 0.875rem;
}

.alert-tip {
  background: var(--tip-bg);
  border-color: var(--tip);
  color: hsl(262, 52%, 28%);
}
.alert-tip .alert-icon { color: var(--tip); }

.alert-info {
  background: var(--info-bg);
  border-color: var(--info);
  color: hsl(200, 85%, 22%);
}
.alert-info .alert-icon { color: var(--info); }

.alert-warning {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: hsl(35, 90%, 25%);
}
.alert-warning .alert-icon { color: var(--warning); }

.alert-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: hsl(0, 75%, 30%);
}
.alert-danger .alert-icon { color: var(--danger); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-grid {
  display: grid;
  gap: 20px;
  margin: 24px 0;
}

.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 8px;
}

.card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.55;
}

.card-link {
  display: block;
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}

.card-link:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
  transform: translateY(-1px);
  text-decoration: none;
}

.card-link .card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 12px;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, hsl(230, 40%, 12%) 0%, hsl(234, 60%, 20%) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 48px 44px;
  margin-bottom: 48px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, hsl(234, 89%, 60%, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 40%;
  width: 400px;
  height: 300px;
  background: radial-gradient(circle, hsl(234, 89%, 60%, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(234, 89%, 80%);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
}

.hero p {
  font-size: 1.0625rem;
  color: hsl(220, 30%, 75%);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Steps ────────────────────────────────────────────────── */
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
  margin: 20px 0;
}

.steps > li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}

.steps > li::before {
  content: counter(step-counter);
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.steps > li .step-content {
  flex: 1;
}

.steps > li .step-content strong {
  display: block;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
  font-size: 0.9375rem;
}

/* ── API Endpoint Blocks ──────────────────────────────────── */
.endpoint {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
  gap: 8px;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--gray-700);
  font-weight: 500;
}

.endpoint-desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-left: auto;
}

.endpoint-body {
  padding: 16px 20px;
}

.endpoint-body pre {
  margin: 8px 0 0;
  border-radius: var(--radius);
}

.endpoint-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin: 14px 0 6px;
}

/* ── Risk Matrix ──────────────────────────────────────────── */
.risk-matrix {
  border-collapse: collapse;
  font-size: 0.75rem;
  text-align: center;
  margin: 20px 0;
}

.risk-matrix th,
.risk-matrix td {
  width: 80px;
  height: 52px;
  border: 1px solid var(--gray-200);
  font-weight: 600;
}

.risk-matrix thead th {
  background: var(--gray-50);
  padding: 8px;
  color: var(--gray-600);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.risk-matrix .axis-label {
  background: var(--gray-50);
  color: var(--gray-600);
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rm-low      { background: #dcfce7; color: #15803d; }
.rm-medium   { background: #fef3c7; color: #a16207; }
.rm-high     { background: #fed7aa; color: #c2410c; }
.rm-critical { background: #fee2e2; color: #b91c1c; }

/* ── Dividers ─────────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 48px 0;
}

/* ── Feature List ─────────────────────────────────────────── */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
  color: var(--gray-700);
}

.feature-list li:last-child { border-bottom: none; }

.feature-list .check {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: 1px;
  flex-shrink: 0;
}

/* ── Status Lifecycle ─────────────────────────────────────── */
.lifecycle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 16px 20px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.lifecycle .arrow {
  color: var(--gray-400);
  font-size: 0.875rem;
}

/* ── Page Header Metadata ─────────────────────────────────── */
.page-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .toc { display: none; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
    transition: transform 0.25s ease;
  }

  .sidebar.open { transform: translateX(0); }

  .main { margin-left: 0; }

  .content-wrapper { padding: 24px 20px 48px; }

  .topbar { padding: 0 20px; }

  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }

  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 1.875rem; }
}

@media (max-width: 640px) {
  .card-grid-4 { grid-template-columns: 1fr; }
  .docs-table { font-size: 0.8125rem; }
  .docs-table td, .docs-table thead th { padding: 8px 12px; }
}

/* ── Utility Classes ──────────────────────────────────────── */
.mt-0  { margin-top: 0; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.text-muted  { color: var(--gray-500); }
.text-small  { font-size: 0.8125rem; }
.text-mono   { font-family: var(--font-mono); font-size: 0.875rem; }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }

.no-margin-top-h2 h2:first-child { margin-top: 0; }

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .toc { display: none; }
  .main { margin-left: 0; }
  .content-wrapper { padding: 0; }
}
