/* ==========================================================================
   Design Tokens & Variables (Light Theme Only)
   ========================================================================== */
:root {
  --bg-app: #f4f6f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-alt: #f8fafc;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --primary-glow: rgba(79, 70, 229, 0.15);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --difficulty-beginner-bg: #dcfce7;
  --difficulty-beginner-text: #15803d;
  --difficulty-intermediate-bg: #fef3c7;
  --difficulty-intermediate-text: #b45309;
}

/* ==========================================================================
   Global Reset & Defaults
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* ==========================================================================
   Sidebar component
   ========================================================================== */
.sidebar {
  width: 320px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.015);
  transition: transform var(--transition-normal);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-text h1 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Search Box styling */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.search-icon svg {
  width: 100%;
  height: 100%;
}

.search-box input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  background-color: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box button {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.search-box button:hover {
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

/* Sidebar Navigation Items */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
}

.nav-category {
  margin-bottom: 16px;
}

.nav-category-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-category-title:hover {
  color: var(--primary);
  background-color: var(--border-light);
}

.nav-category-title::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--text-light);
  border-bottom: 2px solid var(--text-light);
  transform: rotate(45deg);
  transition: transform var(--transition-normal);
  margin-right: 4px;
}

.nav-category.collapsed .nav-category-title::after {
  transform: rotate(-135deg);
}

.nav-category .nav-subcategory-list {
  list-style: none;
  max-height: 500px;
  opacity: 1;
  overflow: hidden;
  transition: max-height var(--transition-normal), opacity var(--transition-normal), padding var(--transition-normal);
  padding: 4px 0 0 0;
}

.nav-category.collapsed .nav-subcategory-list {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

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

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  background-color: var(--border-light);
  color: var(--text-primary);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left: 4px solid var(--primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: 8px;
}

.nav-category.active .nav-category-title {
  color: var(--primary);
  font-weight: 700;
  background-color: rgba(79, 70, 229, 0.04);
}

.nav-link-dot {
  width: 6px;
  height: 6px;
  background-color: transparent;
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.nav-link.active .nav-link-dot {
  background-color: var(--primary);
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ==========================================================================
   Main Content component
   ========================================================================== */
.main-content {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-app);
}

/* Header bar */
.content-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 10;
}

.header-welcome h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.header-welcome p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-badges {
  display: flex;
  gap: 8px;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 50px;
}

.badge-info {
  background-color: #e0f2fe;
  color: #0369a1;
}

.badge-success {
  background-color: var(--difficulty-beginner-bg);
  color: var(--difficulty-beginner-text);
}

.badge-warning {
  background-color: var(--difficulty-intermediate-bg);
  color: var(--difficulty-intermediate-text);
}

/* Viewport wrapping the scrollable sections */
.manual-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  scroll-behavior: smooth;
}

/* ==========================================================================
   Content Content Sections (Cards, Steps, etc.)
   ========================================================================== */
.manual-section {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 36px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 20px;
}

.section-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 24px;
  margin-bottom: 30px;
}

.section-category {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: inline-block;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-description {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 800px;
}

/* Keywords styles */
.section-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.keyword-tag {
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--bg-app);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

/* Workflows container */
.workflow-block {
  margin-top: 30px;
}

.workflow-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.workflow-title {
  font-size: 1.25rem;
  font-weight: 600;
  position: relative;
  padding-left: 14px;
}

.workflow-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), #818cf8);
  border-radius: 2px;
}

.meta-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-time {
  background-color: #f1f5f9;
  color: #475569;
}

.meta-difficulty {
  font-weight: 600;
}

.meta-difficulty.beginner {
  background-color: var(--difficulty-beginner-bg);
  color: var(--difficulty-beginner-text);
}

.meta-difficulty.intermediate {
  background-color: var(--difficulty-intermediate-bg);
  color: var(--difficulty-intermediate-text);
}

/* Step list components */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step-card {
  border: 1px solid var(--border-light);
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-fast);
}

.step-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  padding-right: 32px;
}

.step-header::after {
  content: '';
  position: absolute;
  right: 0;
  top: 24px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-light);
  border-bottom: 2px solid var(--text-light);
  transform: translateY(-50%) rotate(45deg);
  transition: transform var(--transition-fast);
}

.step-card.step-collapsed .step-header::after {
  transform: translateY(-50%) rotate(-135deg);
}

.step-card.step-collapsed .step-description,
.step-card.step-collapsed .screenshot-container,
.step-card.step-collapsed .notes-block {
  display: none !important;
}

.step-card.step-collapsed {
  padding-bottom: 16px;
}

.step-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-count {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Breadcrumbs (Flow of operation) */
.breadcrumb-flow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  background-color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.breadcrumb-node {
  color: var(--text-secondary);
}

.breadcrumb-separator {
  color: var(--text-light);
  font-weight: 400;
}

.step-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Screenshot styling */
.screenshot-container {
  margin-top: 16px;
  margin-bottom: 16px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.image-frame {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background-color: #ffffff;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  max-width: 100%;
}

.image-frame img {
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.image-frame:hover img {
  transform: scale(1.03);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(79, 70, 229, 0.08);
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-frame:hover class .image-overlay,
.image-frame:hover .image-overlay {
  opacity: 1;
}

.zoom-indicator {
  background-color: #ffffff;
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.zoom-indicator svg {
  width: 18px;
  height: 18px;
}

/* Additional Notes Block */
.notes-block {
  background-color: #ffffff;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin-top: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.notes-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 8px;
}

.notes-block-title svg {
  width: 16px;
  height: 16px;
}

.notes-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.notes-content p {
  margin-bottom: 10px;
}

.notes-content p:last-child {
  margin-bottom: 0;
}

.notes-content ul, .notes-content ol {
  padding-left: 20px;
}

.notes-content li {
  margin-bottom: 6px;
}

.notes-content li:last-child {
  margin-bottom: 0;
}

/* Highlights for search matching */
.search-highlight {
  background-color: #fef08a;
  color: #854d0e;
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 600;
}

/* Empty search state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.empty-state-icon svg {
  width: 100%;
  height: 100%;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  font-size: 0.9rem;
}

/* ==========================================================================
   Lightbox / Modal component
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  user-select: none;
}

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

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.lightbox-image-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background-color: #000000;
  max-width: 100%;
  max-height: 70vh;
}

.lightbox-image-container img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.lightbox-caption {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-top: 16px;
  text-align: center;
  max-width: 700px;
  line-height: 1.5;
}

.lightbox-counter {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

/* Lightbox Nav Buttons */
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-close svg {
  width: 22px;
  height: 22px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-nav svg {
  width: 24px;
  height: 24px;
}

.lightbox-prev {
  left: 36px;
}

.lightbox-next {
  right: 36px;
}

.lightbox-nav.disabled {
  opacity: 0.15;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Nav Drawer
   ========================================================================== */
.mobile-menu-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
  cursor: pointer;
  z-index: 999;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  z-index: 90;
  backdrop-filter: blur(4px);
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .content-header {
    padding: 16px 24px;
  }
  
  .manual-viewport {
    padding: 24px;
  }
  
  .manual-section {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .header-badges {
    align-self: flex-end;
  }
  
  .image-grid {
    grid-template-columns: 1fr;
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }
  
  .lightbox-prev {
    left: 12px;
  }
  
  .lightbox-next {
    right: 12px;
  }
  
  .lightbox-close {
    top: 16px;
    right: 16px;
  }
}

/* ==========================================================================
   Three Column Layout & Right-Hand TOC (Table of Contents)
   ========================================================================== */
.main-layout-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: 100%;
}

.toc-column {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  padding: 40px 24px;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  user-select: none;
}

.toc-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-item {
  font-size: 0.82rem;
  line-height: 1.5;
}

.toc-item.toc-workflow {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 14px;
  margin-bottom: 4px;
}

.toc-item.toc-step {
  padding-left: 12px;
  position: relative;
}

.toc-item.toc-step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--text-light);
}

.toc-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-block;
  cursor: pointer;
}

.toc-link:hover {
  color: var(--primary);
  transform: translateX(2px);
}

.toc-link.active {
  color: var(--primary);
  font-weight: 600;
}

.toc-item.toc-step .toc-link.active::after {
  content: ' ➜';
  font-size: 0.75rem;
  opacity: 0.7;
}

@media (max-width: 1200px) {
  .toc-column {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-header-bar {
    padding: 0 12px;
  }
  
  .top-nav-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 4px;
  }
  
  .top-nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .version-badge {
    display: none;
  }
  
  .overview-container {
    padding: 20px 16px;
    gap: 24px;
  }
  
  .overview-header-card {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding: 24px;
    gap: 24px;
  }
  
  .overview-header-icon-box {
    width: 100px;
    height: 100px;
  }
  
  .overview-header-icon-box svg {
    width: 50px;
    height: 50px;
  }
  
  .overview-title-main {
    font-size: 1.6rem;
  }
  
  .who-should-use-box {
    text-align: left;
    padding: 16px;
  }
  
  .advantages-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 16px;
  }
  
  .capabilities-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 16px;
  }
}

/* ==========================================================================
   Consolidated User Manual Styles (Overview and Sidebar Customization)
   ========================================================================== */

/* Separator header for User Guide in sidebar */
.sidebar-separator {
  padding: 18px 24px 6px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border-light);
  margin-top: 10px;
}

/* Overview section custom styling */
.nav-overview-section {
  padding: 4px 16px 12px 16px;
}

.nav-overview-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.nav-overview-link:hover {
  background-color: var(--border-light);
  color: var(--text-primary);
  border-color: var(--border);
}

.nav-overview-link.active {
  background: linear-gradient(135deg, var(--primary-light), rgba(79, 70, 229, 0.08));
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.nav-overview-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
  flex-shrink: 0;
}

/* Overview page presentation styling */
.overview-container {
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
  overflow-y: auto;
  height: 100%;
}

.overview-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.overview-title-main {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overview-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-weight: 500;
}

.overview-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 30px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 6px;
}

.overview-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.overview-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.overview-content li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.overview-content li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.overview-content li strong {
  color: var(--text-primary);
  font-weight: 600;
  margin-right: 4px;
}

/* Visibility toggling utilities */
.hidden {
  display: none !important;
}

/* Adjust layout-body and viewport for full width when TOC is not present */
.overview-viewport {
  flex: 1;
  overflow-y: auto;
  height: calc(100vh - 120px);
}

/* ==========================================================================
   Header and Tab Bar Styling (Top Nav Layout)
   ========================================================================== */
.top-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  z-index: 110;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.top-header-bar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-header-bar .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.top-header-bar .brand-icon svg {
  width: 16px;
  height: 16px;
}

.top-header-bar .brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.top-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-tab-btn {
  background: none;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.top-tab-btn:hover {
  background-color: var(--border-light);
  color: var(--text-primary);
}

.top-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-light), rgba(79, 70, 229, 0.08));
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.05);
}

.version-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  background-color: var(--border-light);
  padding: 4px 10px;
  border-radius: 12px;
}

/* Workspace Layout container below Top Header Bar */
.workspace-layout {
  display: flex;
  width: 100vw;
  height: calc(100vh - 64px);
  margin-top: 64px;
  position: relative;
  overflow: hidden;
}

.sidebar-header-box {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-nav {
  padding: 12px 10px;
}

/* ==========================================================================
   Overview Presentation Elements
   ========================================================================== */
.overview-viewport {
  flex: 1;
  overflow-y: auto;
  height: 100%;
  background-color: var(--bg-app);
}

.overview-container {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Header Card (Purple rocket card) */
.overview-header-card {
  background: linear-gradient(135deg, #e0e7ff 0%, #eef2ff 100%);
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-shadow: var(--shadow-md);
}

.overview-header-text {
  flex: 1;
}

.overview-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 12px;
}

.overview-title-main {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.overview-intro-desc {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.who-should-use-box {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(79, 70, 229, 0.06);
  box-shadow: var(--shadow-sm);
  max-width: 650px;
}

.who-should-use-box h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.who-should-use-box p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.overview-header-icon-box {
  width: 140px;
  height: 140px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
  flex-shrink: 0;
}

.overview-header-icon-box svg {
  width: 70px;
  height: 70px;
}

/* Sections Header */
.overview-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.overview-section-header {
  margin-bottom: 4px;
}

.overview-section-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  display: inline-block;
  margin-bottom: 4px;
}

.overview-section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Advantages Grid (5 cards) */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.advantage-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.advantage-icon {
  width: 44px;
  height: 44px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.advantage-icon svg {
  width: 22px;
  height: 22px;
}

.advantage-card h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.advantage-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Capabilities Grid (6 modules) */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.module-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.module-status {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.module-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.module-card-icon svg {
  width: 22px;
  height: 22px;
}

.select-indigo {
  background-color: var(--primary-light);
  color: var(--primary);
}

.module-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.module-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
  flex: 1;
}

.btn-indigo {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
  width: fit-content;
}

.btn-indigo:hover {
  opacity: 0.95;
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

.badge-locked {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid var(--border);
}

.btn-locked {
  background: #f8fafc !important;
  color: #94a3b8 !important;
  border: 1px solid var(--border-light) !important;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: not-allowed;
  text-align: center;
  width: fit-content;
  box-shadow: none !important;
  pointer-events: none;
}

/* ==========================================================================
   Collapsible Sidebar Indents (Nesting Levels)
   ========================================================================== */
.nav-category.depth-0 {
  margin-bottom: 8px;
}

.nav-category.depth-1 {
  margin-left: 8px;
  margin-top: 4px;
  margin-bottom: 4px;
  border-left: 1px solid var(--border-light);
}

.nav-category.depth-1 > .nav-category-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  color: var(--text-secondary);
  letter-spacing: normal;
  padding: 6px 12px;
}

.nav-category.depth-1 > .nav-category-title::after {
  width: 5px;
  height: 5px;
}

.nav-item.depth-1 {
  margin-left: 8px;
}

.nav-item.depth-2 {
  margin-left: 12px;
  border-left: 1px dashed var(--border-light);
}

.nav-item.depth-3 {
  margin-left: 20px;
  border-left: 1px dotted var(--border-light);
}

.nav-item .nav-link {
  padding: 6px 12px;
  font-size: 0.84rem;
}

.nav-item.depth-2 .nav-link {
  font-size: 0.8rem;
}

.nav-item.depth-3 .nav-link {
  font-size: 0.78rem;
}

/* Header adjust for Top header bar inclusion */
.main-content {
  height: 100%;
}

.content-header {
  border-bottom: 1px solid var(--border-light);
}

.main-layout-body {
  height: calc(100% - 100px);
}
