/* ============================================
   StealAMob Documentation
   Apple-Inspired Black & White Design
   ============================================ */

:root {
  --white: #ffffff;
  --black: #000000;
  --gray-50: #f5f5f7;
  --gray-100: #e8e8ed;
  --gray-200: #d2d2d7;
  --gray-300: #aeaeb2;
  --gray-400: #8e8e93;
  --gray-500: #636366;
  --gray-600: #48484a;
  --gray-700: #363639;
  --gray-800: #2c2c2e;
  --gray-900: #1c1c1e;
  --gray-950: #141415;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-subtle: rgba(0, 113, 227, 0.08);
  --accent-glow: rgba(0, 113, 227, 0.25);

  --green: #30d158;
  --red: #ff453a;
  --yellow: #ffd60a;
  --orange: #ff9f0a;
  --blue: #0a84ff;
  --purple: #bf5af2;

  --bg: var(--white);
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --bg-elevated: var(--white);
  --text: var(--black);
  --text-secondary: var(--gray-500);
  --text-tertiary: var(--gray-400);
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --header-bg: rgba(255, 255, 255, 0.85);
  --glass-btn-bg: rgba(255,255,255,0.18);
  --glass-btn-bg-hover: rgba(255,255,255,0.22);
  --glass-btn-border: rgba(0,0,0,0.06);
  --glass-btn-border-hover: rgba(0,0,0,0.12);
  --glass-btn-shine: rgba(255,255,255,0.12);

  /* Liquid Glass UI Tokens (Light Mode) */
  --glass-frost: 0.08;
  --glass-saturation: 1.2;
  --filter-id: url(#liquid-glass-filter);
  --liquid-glass-bg: rgba(255, 255, 255, 0.72);
  --liquid-glass-border: rgba(255, 255, 255, 0.6);
  --liquid-glass-highlight: rgba(255, 255, 255, 0.85);
  --liquid-glass-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 0 2px 1px rgba(255, 255, 255, 0.8),
    inset 0 0 12px 4px rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] {
  --bg: var(--black);
  --bg-secondary: var(--gray-950);
  --bg-tertiary: var(--gray-900);
  --bg-elevated: var(--gray-900);
  --text: var(--white);
  --text-secondary: var(--gray-300);
  --text-tertiary: var(--gray-400);
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.03);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --header-bg: rgba(0, 0, 0, 0.85);
  --glass-btn-bg: rgba(255,255,255,0.08);
  --glass-btn-bg-hover: rgba(255,255,255,0.12);
  --glass-btn-border: rgba(255,255,255,0.06);
  --glass-btn-border-hover: rgba(255,255,255,0.15);
  --glass-btn-shine: rgba(255,255,255,0.06);

  /* Liquid Glass UI Tokens (Dark Mode) */
  --glass-frost: 0.12;
  --glass-saturation: 1.25;
  --filter-id: url(#liquid-glass-filter);
  --liquid-glass-bg: rgba(255, 255, 255, 0.04);
  --liquid-glass-border: rgba(255, 255, 255, 0.12);
  --liquid-glass-highlight: rgba(255, 255, 255, 0.28);
  --liquid-glass-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 0 2px 1px rgba(255, 255, 255, 0.25),
    inset 0 0 14px 4px rgba(255, 255, 255, 0.05);

  --accent: #2997ff;
  --accent-hover: #40a9ff;
  --accent-subtle: rgba(41, 151, 255, 0.1);
  --accent-glow: rgba(41, 151, 255, 0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  opacity: 0;
  animation: bodyFadeIn 0.4s ease forwards;
}

@keyframes bodyFadeIn {
  to { opacity: 1; }
}

/* --- Page Transitions --- */
.page {
  animation: pageEnter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Smooth Scroll --- */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; opacity: 1; }
  .page { animation: none; }
  html { scroll-behavior: auto; }
}

::selection { background: var(--accent); color: white; }

/* --- Subtle Noise Texture --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 { font-size: 2.8rem; margin-bottom: 1.2rem; letter-spacing: -0.03em; }
h2 { font-size: 1.8rem; margin-top: 2.8rem; margin-bottom: 0.8rem; letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1.1rem; color: var(--text-secondary); font-size: 0.98rem; line-height: 1.68; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
strong { font-weight: 600; color: var(--text); }
code { font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.85em; }

/* --- Glass & Liquid Glass UI Specification --- */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
}

.liquidglass,
.glass.liquidglass,
.glass-liquid {
  position: relative;
  background: var(--liquid-glass-bg);
  border: 1px solid var(--liquid-glass-border);
  border-radius: 16px;
  box-shadow: var(--liquid-glass-shadow);
  overflow: hidden;

  /* Layer 1: High-fidelity fallback blur & saturation across all modern browsers */
  -webkit-backdrop-filter: blur(20px) saturate(var(--glass-saturation, 1.2));
  backdrop-filter: blur(20px) saturate(var(--glass-saturation, 1.2));

  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              background 0.2s ease;
}

/* Layer 2: Progressive Enhancement with SVG Displacement & Chromatic Aberration */
@supports (backdrop-filter: url(#test)) {
  .liquidglass,
  .glass.liquidglass,
  .glass-liquid {
    -webkit-backdrop-filter: var(--filter-id, url(#liquid-glass-filter)) blur(12px) saturate(var(--glass-saturation, 1.2));
    backdrop-filter: var(--filter-id, url(#liquid-glass-filter)) saturate(var(--glass-saturation, 1.2));
  }
}

/* Layer 3: Soft top-edge specular refraction highlight (Bevel Edge) */
.liquidglass::before,
.glass.liquidglass::before,
.glass-liquid::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    var(--liquid-glass-highlight) 0%,
    rgba(255, 255, 255, 0.04) 30%,
    transparent 60%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* Ensure interactive child elements remain above specular highlight */
.liquidglass > *:not(.glass-surface__filter),
.glass.liquidglass > *:not(.glass-surface__filter),
.glass-liquid > *:not(.glass-surface__filter) {
  position: relative;
  z-index: 2;
}

/* Decorative SVG filter element inside .liquidglass */
.glass-surface__filter {
  pointer-events: none;
  opacity: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

/* Liquid Glass Pill Badge modifier */
.liquidglass-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  border-radius: 9999px;
  max-width: 100%;
  font-size: 0.85rem;
}

/* Complete fallback when backdrop-filter is completely unsupported */
.no-backdrop-filter .liquidglass,
.no-backdrop-filter .glass.liquidglass,
.no-backdrop-filter .glass-liquid,
.no-backdrop-filter .glass {
  background: var(--bg-elevated) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.header-logo svg {
  width: 22px;
  height: 22px;
}

.header-search {
  flex: 1;
  max-width: 360px;
  margin: 0 auto;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 6px 54px 6px 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 0.8rem;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.header-search input::placeholder { color: var(--text-tertiary); }
.header-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.header-search .search-shortcut-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-toggle, .sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover, .sidebar-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.sidebar-toggle { display: none; }

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 52px;
  left: 0;
  bottom: 0;
  width: 250px;
  z-index: 50;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 12px 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar { width: 3px; }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

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

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  cursor: pointer;
  user-select: none;
}

.sidebar-section-title .chevron {
  transition: transform 0.2s;
  font-size: 0.5rem;
}

.sidebar-section-title.collapsed .chevron {
  transform: rotate(-90deg);
}

.sidebar-section-title.collapsed ~ .sidebar-link,
.sidebar-section-title.collapsed ~ .sidebar-subsection,
.sidebar-section-title.collapsed ~ .sidebar-subsection-title {
  display: none;
}

/* --- Sidebar Subsections --- */
.sidebar-subsection {
  margin: 2px 0;
}

.sidebar-subsection-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 6px 26px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.sidebar-subsection-title:hover {
  color: var(--text);
  background: var(--bg-tertiary);
}

.sidebar-subsection-title .chevron {
  font-size: 0.45rem;
  transition: transform 0.2s;
  color: var(--text-tertiary);
}

.sidebar-subsection.collapsed .sidebar-subsection-title .chevron,
.sidebar-subsection-title.collapsed .chevron {
  transform: rotate(-90deg);
}

.sidebar-subsection.collapsed .sidebar-link,
.sidebar-subsection-title.collapsed ~ .sidebar-link {
  display: none;
}

.sidebar-subsection .sidebar-link {
  padding-left: 36px;
  font-size: 0.8rem;
}

.sidebar-link {
  display: block;
  padding: 5px 20px 5px 24px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.15s;
  border-left: 1.5px solid transparent;
  text-decoration: none;
  font-weight: 400;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--bg-tertiary);
}

.sidebar-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 500;
}

/* --- Main Content (Always Centered in Reading Viewport) --- */
.main {
  margin-top: 52px;
  margin-left: 250px;
  width: calc(100% - 250px);
  min-height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 36px 120px;
  box-sizing: border-box;
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.main.sidebar-collapsed {
  margin-left: 0;
  width: 100%;
}

.page {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 100px 0 72px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -5%;
  right: -5%;
  height: 120%;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-subtle) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.6;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 auto 2rem;
  max-width: 600px;
  letter-spacing: -0.01em;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* --- Glass UI Buttons (Apple Spec) --- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layer 2 - Frosted glass tint */
  background: var(--glass-btn-bg);

  /* Layer 1 - Background blur */
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);

  /* Layer 4 - Outer border */
  border: 1px solid var(--glass-btn-border);

  /* Layer 6 - Soft shadow (multi-layered) */
  box-shadow:
    0 0 0 0 rgba(255,255,255,0),
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 8px rgba(0,0,0,0.04),
    0 12px 32px rgba(0,0,0,0.03);

  /* Layer 3 - Inner highlight (via pseudo) */
  overflow: hidden;
  will-change: transform;
}

/* Layer 3 - Inner highlight (top edge light) */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 19px;
  padding: 1px;
  background: linear-gradient(
    180deg,
    var(--glass-btn-shine) 0%,
    transparent 40%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Layer 5 - Specular reflection */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 19px;
  background: radial-gradient(
    circle at var(--reflect-x, 50%) var(--reflect-y, 0%),
    rgba(255,255,255,0.15) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.btn:hover::after {
  opacity: 1;
}

/* Layer 7 - Depth on hover */
.btn:hover {
  transform: scale(1.02);
  border-color: var(--glass-btn-border-hover);
  box-shadow:
    0 0 20px var(--accent-glow),
    0 2px 4px rgba(0,0,0,0.06),
    0 8px 16px rgba(0,0,0,0.06),
    0 20px 48px rgba(0,0,0,0.04);
}

.btn:hover::before {
  opacity: 1;
}

/* Active / Press state */
.btn:active {
  transform: scale(0.98) translateY(1px);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 2px 4px rgba(0,0,0,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent), var(--shadow-md);
}

/* --- Button Variants --- */
.btn-primary {
  --glass-btn-bg: var(--accent);
  --glass-btn-border: transparent;
  --glass-btn-border-hover: transparent;
  --glass-btn-shine: rgba(255,255,255,0.25);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  --glass-btn-bg: var(--glass-bg);
  --glass-btn-border: var(--border);
  --glass-btn-border-hover: var(--text-tertiary);
  --glass-btn-shine: rgba(255,255,255,0.08);
  color: var(--text);
}

.btn-secondary:hover {
  --glass-btn-bg: var(--glass-bg-hover);
  border-color: var(--text-tertiary);
}

.btn-ghost {
  --glass-btn-bg: transparent;
  --glass-btn-border: var(--border);
  --glass-btn-border-hover: var(--text-tertiary);
  --glass-btn-shine: rgba(255,255,255,0.04);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn::after {
    display: none;
  }
}

/* --- Feature Cards Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.feature-card {
  padding: 24px 20px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.feature-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-card-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature-card-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 0.95rem;
  margin: 0 0 4px;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  margin: 22px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  line-height: 1.55;
}

thead { background: var(--bg-secondary); }

th {
  text-align: left;
  padding: 11px 16px;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-secondary); }

td:first-child {
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}

td code {
  font-size: 0.8rem;
  background: var(--bg-secondary);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

/* --- Code Blocks --- */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 20px 0;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.code-block-header .lang {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
}

.code-block-header .copy-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  font-family: inherit;
}

.code-block-header .copy-btn:hover {
  color: var(--text);
  background: var(--border);
}

.code-block-header .copy-btn.copied {
  color: var(--green);
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.25);
  font-weight: 600;
}

.code-block pre {
  padding: 16px;
  overflow-x: auto;
  margin: 0;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text);
  tab-size: 2;
}

.code-block code { color: inherit; }

.inline-code {
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--border-light);
  color: var(--text);
}

/* --- Alert / Callout Boxes --- */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin: 20px 0;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid;
}

.alert strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert-info {
  background: var(--accent-subtle);
  border-color: rgba(0, 113, 227, 0.15);
  color: var(--text-secondary);
}
.alert-info strong { color: var(--accent); }

.alert-warning {
  background: rgba(255, 159, 10, 0.08);
  border-color: rgba(255, 159, 10, 0.15);
  color: var(--text-secondary);
}
.alert-warning strong { color: var(--orange); }

.alert-danger {
  background: rgba(255, 69, 58, 0.08);
  border-color: rgba(255, 69, 58, 0.15);
  color: var(--text-secondary);
}
.alert-danger strong { color: var(--red); }

.alert-success {
  background: rgba(48, 209, 88, 0.08);
  border-color: rgba(48, 209, 88, 0.15);
  color: var(--text-secondary);
}
.alert-success strong { color: var(--green); }

/* --- Tabs --- */
.tabs { margin: 20px 0; }

.tab-nav {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 10px;
  overflow-x: auto;
}

.tab-btn {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tab-content { display: none; padding: 20px 0; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Accordion --- */
.accordion { margin: 20px 0; }

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 6px;
  overflow: hidden;
}

.accordion-header {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.15s;
  user-select: none;
  gap: 12px;
}

.accordion-header:hover { background: var(--bg-secondary); }

.accordion-header .chevron {
  transition: transform 0.2s;
  color: var(--text-tertiary);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.accordion-item.open .accordion-header .chevron {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.open .accordion-body {
  padding: 0 16px 14px;
  max-height: 2000px;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 32px;
  padding: 0;
  list-style: none;
}

.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before {
  content: '/';
  color: var(--text-tertiary);
  font-size: 0.65rem;
}
.breadcrumbs a { color: var(--text-tertiary); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .current { color: var(--text-secondary); }

/* --- Steps / Process List --- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 24px 0;
}

.steps li {
  counter-increment: step;
  padding: 14px 14px 14px 48px;
  position: relative;
  margin-bottom: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.steps li strong { display: block; color: var(--text); margin-bottom: 2px; font-size: 0.92rem; }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-op { background: rgba(255, 69, 58, 0.1); color: var(--red); }
.badge-true { background: rgba(48, 209, 88, 0.1); color: var(--green); }
.badge-false { background: var(--bg-tertiary); color: var(--text-tertiary); }
.badge-version {
  background: rgba(0, 113, 227, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 113, 227, 0.25);
  font-weight: 700;
}
.badge-addon {
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 700;
}
[data-theme="dark"] .badge-addon {
  color: #38bdf8;
}
.badge-new {
  background: rgba(48, 209, 88, 0.15);
  color: #16a34a;
  border: 1px solid rgba(48, 209, 88, 0.3);
  font-weight: 700;
}
[data-theme="dark"] .badge-new {
  color: #30d158;
}
.badge-hot {
  background: rgba(255, 214, 10, 0.18);
  color: #b45309;
  border: 1px solid rgba(255, 214, 10, 0.35);
  font-weight: 700;
}
[data-theme="dark"] .badge-hot {
  color: #ffd60a;
}
.badge-category {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

/* --- Executive Briefing Card --- */
.exec-briefing {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 18px 0 28px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.exec-briefing-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.exec-briefing-badge,
.briefing-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 3px 8px;
  border-radius: 4px;
}

.exec-briefing-lead,
.briefing-lead {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 500;
}

.exec-briefing-grid,
.briefing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.briefing-pill,
.briefing-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.briefing-pill:hover,
.briefing-item:hover {
  border-color: var(--border);
  background: var(--bg-tertiary);
}

.briefing-pill .pill-label,
.briefing-pill .briefing-label,
.briefing-item .briefing-label {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.briefing-pill .pill-val,
.briefing-pill .briefing-val,
.briefing-item .briefing-value,
.briefing-item .briefing-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.briefing-pill code,
.briefing-item code {
  font-size: 0.78rem;
  background: var(--bg-tertiary);
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  font-family: 'SF Mono', monospace;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* --- Search Modal --- */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-modal.open { display: flex; }

.search-modal-content {
  width: 600px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: searchIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes searchIn {
  from { opacity: 0; transform: scale(0.96) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.search-modal-input {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.search-modal-input input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  font-family: inherit;
}

.search-modal-input input::placeholder { color: var(--text-tertiary); }

.search-modal-results {
  overflow-y: auto;
  max-height: 360px;
  padding: 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--bg-secondary);
}

.search-result-item.selected {
  outline: 1.5px solid var(--accent);
}

.search-result-item .result-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}

.search-result-item .result-text { flex: 1; min-width: 0; }
.search-result-item .result-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.search-result-item .result-title { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.search-result-item .result-category {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  white-space: nowrap;
}
.search-result-item .result-desc { font-size: 0.78rem; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

.search-no-results {
  padding: 32px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* --- Gear/Troll/Booster Grids --- */
.gear-grid, .booster-grid, .troll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.gear-item, .booster-card, .troll-card {
  padding: 16px;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.gear-item:hover, .booster-card:hover, .troll-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.gear-item h4 { font-size: 0.9rem; margin: 0 0 4px; }
.gear-item p { font-size: 0.78rem; margin: 0; color: var(--text-tertiary); }
.gear-item .gear-stat { font-size: 0.72rem; color: var(--text-secondary); margin-top: 8px; }

/* --- Footer --- */
.footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 12px;
}

.footer a { color: var(--text-tertiary); }
.footer a:hover { color: var(--accent); }

/* --- Rarity Colors --- */
.rarity-common { color: var(--text); }
.rarity-rare { color: #5ac8fa; }
.rarity-epic { color: #bf5af2; }
.rarity-legendary { color: #ff9f0a; }
.rarity-mythic { color: #bf5af2; }
.rarity-divine { color: #ffd60a; }
.rarity-secret { color: #ff453a; }

/* --- Table of Contents --- */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0 24px;
  font-size: 0.85rem;
}
.toc-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.toc ol { margin: 0; padding-left: 18px; color: var(--text-secondary); }
.toc li { margin: 3px 0; }

/* --- Syntax Highlighting --- */
.hl-c { color: var(--text-tertiary); font-style: italic; }
.hl-s { color: #22c55e; }
.hl-k { color: #818cf8; font-weight: 500; }
.hl-n { color: #f59e0b; }
.hl-y { color: #60a5fa; font-weight: 500; }
.hl-b { color: #818cf8; }

/* --- kbd --- */
kbd {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* --- Responsive & Ultra-Wide Monitor Centering --- */
@media (min-width: 1600px) {
  .page {
    max-width: 1160px;
  }
  .main {
    padding: 56px 48px 140px;
  }
  .hero h1 {
    font-size: 4.4rem;
  }
  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 16px;
  }
  .gear-grid, .booster-grid, .troll-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1200px) and (max-width: 1599px) {
  .page {
    max-width: 1040px;
  }
  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 230px;
  }
  .main {
    margin-left: 230px;
    width: calc(100% - 230px);
    padding: 32px 24px 80px;
  }
  .page {
    max-width: 100%;
  }
  .hero h1 { font-size: 3rem; }
  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.45);
  }
  .sidebar-toggle { display: flex; }
  .main {
    margin-left: 0;
    width: 100%;
    padding: 24px 18px 80px;
  }
  .header-search {
    max-width: 180px;
  }
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 2.3rem; }
  .hero h2 { font-size: 1.15rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .gear-grid, .booster-grid, .troll-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .table-wrapper {
    margin: 16px 0;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .header { padding: 0 12px; }
  .header-search { display: none; }
  .main { padding: 18px 12px 64px; }
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 1.85rem; }
  .hero h2 { font-size: 1rem; }
  .hero p { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .btn { width: 100%; justify-content: center; }
  h3 { font-size: 1.1rem; }
  .steps li { padding: 12px 12px 12px 44px; }
  .accordion-header { font-size: 0.85rem; }
  td { padding: 8px 10px; font-size: 0.8rem; }
  th { padding: 8px 10px; }
  .glass, .liquidglass { padding: 16px !important; }
}

/* --- Touch Device Improvements --- */
@media (hover: none) and (pointer: coarse) {
  .sidebar-link { padding: 8px 20px 8px 24px; }
  .tab-btn { padding: 9px 18px; }
  .accordion-header { padding: 14px 16px; }
  .feature-card:hover { transform: none; }
  .btn:hover { transform: none; }
  .btn:active { transform: scale(0.97); }
}

/* --- Print Media --- */
@media print {
  .sidebar, .header, .sidebar-backdrop, .search-modal { display: none !important; }
  .main { margin-left: 0 !important; width: 100% !important; padding: 0 !important; }
  .page { max-width: 100% !important; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .code-block { border: 1px solid #ccc; }
}

/* --- Smooth scrollbar Firefox --- */
* { scrollbar-width: thin; scrollbar-color: var(--gray-300) transparent; }

/* --- Focus improvements for accessibility --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Loading state for page transitions --- */
.page-loading {
  opacity: 0;
  pointer-events: none;
}

/* --- Improved code block horizontal scroll on mobile --- */
@media (max-width: 768px) {
  .code-block pre {
    font-size: 0.72rem;
    padding: 12px;
  }
  .code-block-header {
    padding: 5px 10px;
  }
  pre { white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --- Table mobile stacking for small screens --- */
@media (max-width: 520px) {
  .table-wrapper {
    font-size: 0.78rem;
  }
  td:first-child {
    white-space: normal;
  }
}

/* --- Sidebar link transition for mobile open/close --- */
.sidebar {
  will-change: transform;
}

/* --- Better textarea/input on mobile --- */
input, textarea, select {
  -webkit-appearance: none;
  border-radius: 8px;
}

/* --- Prevent text size adjustment on iOS --- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ============================================================
   1.3.3-DELUXE Enhanced UI Components & Documentation Layout
   ============================================================ */

/* Header Version Pill */
.header-version-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  margin-left: 8px;
  text-transform: uppercase;
}

/* Previous / Next Page Bottom Navigation */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.page-nav-link {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex: 1;
  max-width: 48%;
  cursor: pointer;
}

.page-nav-link:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.page-nav-link.next {
  text-align: right;
  margin-left: auto;
}

.page-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.page-nav-link.next .page-nav-label {
  justify-content: flex-end;
}

.page-nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* On-Page Table of Contents */
.page-toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0 32px 0;
}

.page-toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.page-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 16px;
}

.page-toc-item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-toc-item a:hover {
  color: var(--accent);
}

/* Copyable Inline Command Chips */
.copyable-cmd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: all;
}

.copyable-cmd:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.copyable-cmd::after {
  content: '⎘';
  font-size: 11px;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.copyable-cmd:hover::after {
  opacity: 1;
  color: var(--accent);
}

.copyable-cmd.copied::after {
  content: '✔';
  color: var(--green);
  opacity: 1;
}

/* Rich 404 View */
.not-found-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  max-width: 640px;
  margin: 0 auto;
}

.not-found-badge {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}

.not-found-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.not-found-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.not-found-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 28px 0;
}

.not-found-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.not-found-chip:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
  color: var(--accent);
}

@media (max-width: 640px) {
  .page-nav {
    flex-direction: column;
  }
  .page-nav-link {
    max-width: 100%;
  }
  .page-nav-link.next {
    text-align: left;
  }
  .page-nav-link.next .page-nav-label {
    justify-content: flex-start;
  }
  .page-toc-list {
    grid-template-columns: 1fr;
  }
}


