/* ═══════════════════════════════════════════════════════════════
   LINUXLAB WIKIDOCS & BLOG — PROFESSIONAL THEME
   Inspired by GitBook, Mintlify & Ghost
   ═══════════════════════════════════════════════════════════════ */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-rgb: 99, 102, 241;
  --secondary: #06b6d4;
  --accent: #38bdf8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg-app: #0c0e14;
  --bg-surface: #12151f;
  --bg-card: #181c2b;
  --bg-card-hover: #1f2438;
  --bg-input: #10131c;
  --bg-code: #090a0f;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.45);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-app); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.6); }

/* Reading Progress */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 99999;
  width: 0%;
  transition: width 0.1s ease;
}

/* Top Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(12, 14, 20, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-text span {
  color: var(--accent);
}

.brand-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Search Trigger */
.nav-search-trigger {
  flex: 1;
  max-width: 360px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.nav-search-trigger:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
  background: #141824;
}

.search-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kbd-shortcut {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 5px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}

.nav-item a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-item a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-cyber {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}

.btn-cyber-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-cyber-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-cyber-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-cyber-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
}

/* Main Content Container */
.main-wrapper {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem;
}

/* Hero Section */
.hero-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 780px;
  margin-bottom: 1.75rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.stat-number span {
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Category Grid */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  color: var(--primary);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.category-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}

.category-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.category-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Post Cards */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.post-header-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-wiki { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-post { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.badge-note { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.post-card:hover .post-card-title {
  color: var(--accent);
}

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag-pill {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
}

.tag-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
}

.post-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════
   3-COLUMN WIKIDOCS LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.wiki-layout {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  gap: 2rem;
  align-items: start;
}

/* Left Sidebar */
.wiki-sidebar {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tree-category {
  margin-bottom: 1rem;
}

.tree-cat-header {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tree-cat-header i {
  color: var(--primary);
  font-size: 0.85rem;
}

.tree-sublist {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
  border-left: 1px solid var(--border-subtle);
}

.tree-item a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition);
}

.tree-item a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tree-item.active a {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
}

/* Main Article */
.wiki-main-article {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.25rem 2.5rem;
  min-width: 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs i {
  font-size: 0.6rem;
}

.article-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Markdown Typography */
.markdown-body {
  font-size: 0.975rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, 
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.markdown-body h1 { font-size: 1.75rem; }
.markdown-body h2 { 
  font-size: 1.4rem; 
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
}
.markdown-body h3 { font-size: 1.15rem; }

.heading-anchor {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.anchor-link {
  opacity: 0;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
}

.heading-anchor:hover .anchor-link {
  opacity: 1;
}

.markdown-body p {
  margin-bottom: 1.15rem;
}

.cyber-divider {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: 1.75rem 0;
}

.cyber-link {
  color: var(--accent);
  text-decoration: none;
}

.cyber-link:hover {
  text-decoration: underline;
}

/* Callouts / Alerts */
.callout-box {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: #141824;
  border: 1px solid var(--border-subtle);
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.callout-content {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.callout-note { border-left: 3px solid #6366f1; }
.callout-note .callout-header { color: #818cf8; }

.callout-tip { border-left: 3px solid #10b981; }
.callout-tip .callout-header { color: #34d399; }

.callout-important { border-left: 3px solid #8b5cf6; }
.callout-important .callout-header { color: #a78bfa; }

.callout-warning { border-left: 3px solid #f59e0b; }
.callout-warning .callout-header { color: #fbbf24; }

.callout-caution { border-left: 3px solid #ef4444; }
.callout-caution .callout-header { color: #f87171; }

/* Code Blocks */
.code-block-wrapper {
  margin: 1.25rem 0;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.code-lang {
  color: var(--accent);
}

.copy-code-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  padding: 2px 7px;
  font-size: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

code.inline-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
}

/* Tables */
.table-responsive {
  margin: 1.25rem 0;
  overflow-x: auto;
}

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}

.cyber-table th, .cyber-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.cyber-table th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  color: #fff;
}

/* Sticky TOC */
.wiki-toc-sidebar {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
}

.toc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.toc-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.toc-list { list-style: none; }
.toc-item a {
  display: block;
  padding: 0.25rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
}

.toc-item.level-3 a { padding-left: 1rem; font-size: 0.75rem; }
.toc-item.active a { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

/* Global Search Modal */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem;
}

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

.search-modal-box {
  background: #111420;
  border: 1px solid var(--border-focus);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 640px;
  overflow: hidden;
}

.search-input-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
}

.search-main-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: #fff;
  font-family: var(--font-sans);
}

.search-results-pane {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.search-result-item:hover {
  background: rgba(99, 102, 241, 0.12);
}

.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Footer */
footer {
  margin-top: auto;
  background: #090a0f;
  border-top: 1px solid var(--border-subtle);
  padding: 1.75rem 1.5rem;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 1100px) {
  .wiki-layout { grid-template-columns: 240px 1fr; }
  .wiki-toc-sidebar { display: none; }
}

@media (max-width: 800px) {
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-sidebar { display: none; }
  .wiki-sidebar.mobile-open {
    display: block;
    position: fixed;
    top: 4rem;
    left: 1rem;
    right: 1rem;
    z-index: 2000;
  }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
}
