/* ============================================================
   ctx-sync — Documentation Stylesheet (Redesigned)
   "Aurora Sync" design: accent-coded sections, dramatic code blocks,
   interactive callouts, premium developer-focused documentation.
   ============================================================ */

/* ============================================================
   0. DOCS PAGE — Base
   ============================================================ */
.docs-page {
  background: var(--bg-primary);
}

/* ============================================================
   1. DOCS HEADER — Fixed top bar
   ============================================================ */
.docs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  transition: background var(--duration-normal, 200ms) ease,
              border-color var(--duration-normal, 200ms) ease;
}

[data-theme='light'] .docs-header {
  background: rgba(250, 250, 250, 0.7);
}

.docs-header.scrolled {
  background: rgba(13, 13, 13, 0.92);
  border-bottom-color: var(--border-color);
}

[data-theme='light'] .docs-header.scrolled {
  background: rgba(250, 250, 250, 0.92);
}

.docs-header-inner {
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
}

.docs-header .header-nav {
  display: flex;
  gap: var(--space-2);
}

.docs-header .theme-toggle {
  margin-left: auto;
}

.docs-header .header-nav a {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--transition, 180ms ease), background var(--transition, 180ms ease);
}

.docs-header .header-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  opacity: 1;
}

[data-theme='light'] .docs-header .header-nav a:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ============================================================
   1b. SCROLL PROGRESS BAR — colored fill at top
   ============================================================ */
.docs-progress-bar {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 101;
  background: transparent;
  pointer-events: none;
}

.docs-progress-bar .progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
  border-radius: 0 2px 2px 0;
  transition: width 50ms linear;
}

/* ============================================================
   2. SIDEBAR TOGGLE (mobile)
   ============================================================ */
.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s var(--ease-out, ease);
}

/* ============================================================
   3. LAYOUT SHELL — Left nav + Content + Right TOC
   ============================================================ */
.docs-layout {
  display: flex;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

/* ============================================================
   3b. RIGHT TOC SIDEBAR — "On this page"
   ============================================================ */
.docs-toc-sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: var(--space-10) var(--space-4) var(--space-6) var(--space-4);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

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

.docs-toc-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.docs-toc-sidebar .docs-toc {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border-left: 1px solid var(--border-subtle);
  padding-left: var(--space-4);
}

.docs-toc-sidebar .docs-toc::before {
  display: none;
}

/* ============================================================
   4. SIDEBAR — Accent-coded navigation
   ============================================================ */
.docs-sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: var(--space-6) var(--space-5);
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  transition: background 0.3s ease;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

/* Sidebar header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-title:hover {
  color: var(--accent-blue);
  opacity: 1;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: var(--space-1);
  transition: color var(--transition, 180ms ease);
}

.sidebar-close:hover {
  color: var(--text-primary);
}

/* ============================================================
   4a. SIDEBAR SEARCH — Elevated with accent glow
   ============================================================ */
.sidebar-search {
  margin-bottom: var(--space-5);
  position: relative;
}

.sidebar-search input {
  width: 100%;
  padding: 10px var(--space-3) 10px 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sidebar-search input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15), 0 4px 16px rgba(14, 165, 233, 0.08);
  background: var(--bg-secondary);
}

.sidebar-search input::placeholder {
  color: var(--text-disabled);
}

/* Search icon (pseudo-element on wrapper) */
.sidebar-search::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-disabled);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.sidebar-search::after {
  content: '';
  position: absolute;
  left: 24px;
  top: calc(50% + 5px);
  width: 1.5px;
  height: 5px;
  background: var(--text-disabled);
  transform: rotate(-45deg);
  pointer-events: none;
  z-index: 1;
}

/* CMD+K shortcut hint */
.search-shortcut {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-disabled);
  pointer-events: none;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}

/* Search results dropdown */
.search-results {
  margin-top: var(--space-2);
}

.search-results:not(:empty) {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-lg, 0 8px 32px rgba(0, 0, 0, 0.4));
}

.search-result-item {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.search-result-item:hover,
.search-result-item.keyboard-active {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  opacity: 1;
}

.search-result-item .result-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.search-result-item .result-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.search-result-item .result-badge[data-type="guide"] {
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-blue);
}

.search-result-item .result-badge[data-type="reference"] {
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-green);
}

.search-result-item .result-badge[data-type="security"] {
  background: rgba(251, 146, 60, 0.12);
  color: var(--accent-orange);
}

.search-result-item .result-snippet {
  font-size: 11.5px;
  color: var(--text-disabled);
  margin-top: 2px;
  line-height: 1.4;
}

.search-highlight {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-blue);
  border-radius: 2px;
  padding: 0 2px;
}

.search-no-results {
  padding: var(--space-3);
  color: var(--text-disabled);
  font-size: 13px;
  text-align: center;
}

/* ============================================================
   4b. SIDEBAR NAV — Accent-coded sections
   ============================================================ */
.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Section category label */
.sidebar-section-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-1);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-disabled);
  cursor: default;
  user-select: none;
}

.sidebar-section-label:first-child {
  padding-top: 0;
}

.sidebar-section-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Accent colors for section dots */
.sidebar-section-dot[data-accent="blue"] { background: var(--accent-blue); box-shadow: 0 0 6px rgba(14, 165, 233, 0.4); }
.sidebar-section-dot[data-accent="green"] { background: var(--accent-green); box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
.sidebar-section-dot[data-accent="orange"] { background: var(--accent-orange); box-shadow: 0 0 6px rgba(251, 146, 60, 0.4); }
.sidebar-section-dot[data-accent="purple"] { background: var(--accent-purple); box-shadow: 0 0 6px rgba(168, 85, 247, 0.4); }
.sidebar-section-dot[data-accent="pink"] { background: var(--accent-pink); box-shadow: 0 0 6px rgba(236, 72, 153, 0.4); }

/* Nav link items */
.sidebar-nav-list li a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px var(--space-3);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: all 0.18s ease;
  border-left: 2px solid transparent;
  text-decoration: none;
  position: relative;
}

.sidebar-nav-list li a .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  opacity: 0.6;
  transition: opacity 0.18s ease;
}

.sidebar-nav-list li a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  opacity: 1;
}

.sidebar-nav-list li a:hover .nav-icon {
  opacity: 1;
}

/* Active page — dramatic accent glow */
.sidebar-nav-list li.active a {
  background: rgba(14, 165, 233, 0.08);
  color: var(--accent-blue);
  font-weight: 600;
  border-left-color: var(--accent-blue);
  box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.04);
}

/* Accent-specific active states */
.sidebar-nav-list li.active[data-accent="blue"] a {
  background: rgba(14, 165, 233, 0.08);
  color: var(--accent-blue);
  border-left-color: var(--accent-blue);
  box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.04);
}

.sidebar-nav-list li.active[data-accent="green"] a {
  background: rgba(34, 197, 94, 0.08);
  color: var(--accent-green);
  border-left-color: var(--accent-green);
  box-shadow: inset 0 0 20px rgba(34, 197, 94, 0.04);
}

.sidebar-nav-list li.active[data-accent="orange"] a {
  background: rgba(251, 146, 60, 0.08);
  color: var(--accent-orange);
  border-left-color: var(--accent-orange);
  box-shadow: inset 0 0 20px rgba(251, 146, 60, 0.04);
}

.sidebar-nav-list li.active[data-accent="purple"] a {
  background: rgba(168, 85, 247, 0.08);
  color: var(--accent-purple);
  border-left-color: var(--accent-purple);
  box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.04);
}

.sidebar-nav-list li.active[data-accent="pink"] a {
  background: rgba(236, 72, 153, 0.08);
  color: var(--accent-pink);
  border-left-color: var(--accent-pink);
  box-shadow: inset 0 0 20px rgba(236, 72, 153, 0.04);
}

/* ============================================================
   5. BREADCRUMBS — Decorative accent separators
   ============================================================ */
.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: 13px;
  color: var(--text-disabled);
}

.docs-breadcrumbs a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.18s ease;
}

.docs-breadcrumbs a:hover {
  color: var(--accent-blue);
}

.breadcrumb-sep {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  color: var(--text-disabled);
  opacity: 0.5;
}

.breadcrumb-sep svg {
  width: 12px;
  height: 12px;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================================
   6. PAGE METADATA — Reading time, last updated
   ============================================================ */
.docs-page-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.docs-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-disabled);
  transition: color 0.18s ease;
}

.docs-meta-item:hover {
  color: var(--text-tertiary);
}

.docs-meta-item svg,
.docs-meta-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.docs-meta-item a {
  color: var(--text-disabled);
  text-decoration: none;
}

.docs-meta-item a:hover {
  color: var(--accent-blue);
}

/* ============================================================
   7. DOCS CONTENT AREA
   ============================================================ */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: var(--space-10) var(--space-8);
}

.docs-article {
  max-width: 860px;
}

/* ============================================================
   8. TYPOGRAPHY — Dramatic hierarchy
   ============================================================ */
.docs-article h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.docs-article h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

/* h2 is clean — no decorative accent underline */

.docs-article h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.docs-article h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.docs-article p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 15px;
}

.docs-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

.docs-article ul,
.docs-article ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
  color: var(--text-secondary);
}

.docs-article li {
  margin-bottom: var(--space-2);
  line-height: 1.65;
}

.docs-article li::marker {
  color: var(--text-disabled);
}

.docs-article > ol > li {
  padding-left: var(--space-2);
}

/* Links with accent underline */
.docs-article a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(14, 165, 233, 0.3);
  transition: text-decoration-color 0.18s ease, color 0.18s ease;
}

.docs-article a:hover {
  text-decoration-color: var(--accent-blue);
  filter: brightness(1.15);
}

.docs-article hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-10) 0;
}

/* ============================================================
   9. INLINE CODE — Colored pill
   ============================================================ */
.docs-article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-tertiary);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  color: var(--accent-blue);
  border: 1px solid var(--border-subtle);
}

/* ============================================================
   10. CODE BLOCKS — Dramatic elevation, colored borders, copy
   ============================================================ */
.docs-article pre {
  position: relative;
  background: #1e1e1e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  margin-bottom: var(--space-5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

[data-theme='light'] .docs-article pre {
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.docs-article pre:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  border-color: var(--border-hover);
}

[data-theme='light'] .docs-article pre:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Code blocks — no decorative top border */

/* Code block header with language label */
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--space-4);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-disabled);
  letter-spacing: 0.02em;
}

[data-theme='light'] .code-block-header {
  background: rgba(0, 0, 0, 0.03);
}

.code-lang-badge {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
}

[data-theme='light'] .code-lang-badge {
  background: rgba(0, 0, 0, 0.06);
}

/* Copy button inside code blocks */
.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  cursor: pointer;
  color: var(--text-disabled);
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.18s ease;
}

.code-copy-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(14, 165, 233, 0.06);
}

.code-copy-btn.copied {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.06);
}

.code-copy-btn .copy-icon {
  width: 12px;
  height: 12px;
}

/* Code content area */
.docs-article pre code {
  display: block;
  background: none;
  padding: var(--space-4) var(--space-5);
  border: none;
  font-size: 13.5px;
  color: var(--accent-green);
  line-height: 1.7;
  overflow-x: auto;
}

[data-theme='light'] .docs-article pre code {
  color: #1a1a1a;
}

/* Command prompt styling */
.docs-article pre code .prompt {
  color: var(--accent-blue);
  user-select: none;
}

/* ============================================================
   11. CALLOUT / ADMONITION BOXES
   ============================================================ */
.docs-callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  border: 1px solid var(--border-subtle);
}

/* Callout — clean, no decorative side bar */

.docs-callout-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 2px;
}

.docs-callout-content {
  flex: 1;
  min-width: 0;
}

.docs-callout-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-callout-content p {
  margin-bottom: 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.docs-callout-content p + p {
  margin-top: var(--space-2);
}

.docs-callout-content code {
  font-size: 0.85em;
}

/* Info callout — Blue */
.docs-callout.callout-info {
  background: rgba(14, 165, 233, 0.04);
  border-color: rgba(14, 165, 233, 0.15);
}
.docs-callout.callout-info .docs-callout-icon { background: rgba(14, 165, 233, 0.1); color: var(--accent-blue); }
.docs-callout.callout-info .docs-callout-title { color: var(--accent-blue); }

/* Warning callout — Orange */
.docs-callout.callout-warning {
  background: rgba(251, 146, 60, 0.04);
  border-color: rgba(251, 146, 60, 0.15);
}
.docs-callout.callout-warning .docs-callout-icon { background: rgba(251, 146, 60, 0.1); color: var(--accent-orange); }
.docs-callout.callout-warning .docs-callout-title { color: var(--accent-orange); }

/* Tip / Pro Tip callout — Purple */
.docs-callout.callout-tip {
  background: rgba(168, 85, 247, 0.04);
  border-color: rgba(168, 85, 247, 0.15);
}
.docs-callout.callout-tip .docs-callout-icon { background: rgba(168, 85, 247, 0.1); color: var(--accent-purple); }
.docs-callout.callout-tip .docs-callout-title { color: var(--accent-purple); }

/* Success callout — Green */
.docs-callout.callout-success {
  background: rgba(34, 197, 94, 0.04);
  border-color: rgba(34, 197, 94, 0.15);
}
.docs-callout.callout-success .docs-callout-icon { background: rgba(34, 197, 94, 0.1); color: var(--accent-green); }
.docs-callout.callout-success .docs-callout-title { color: var(--accent-green); }

/* Danger / Security callout — Red */
.docs-callout.callout-danger {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.15);
}
.docs-callout.callout-danger .docs-callout-icon { background: rgba(239, 68, 68, 0.1); color: var(--accent-red); }
.docs-callout.callout-danger .docs-callout-title { color: var(--accent-red); }

/* Security callout — Orange/Red gradient */
.docs-callout.callout-security {
  background: rgba(251, 146, 60, 0.04);
  border-color: rgba(251, 146, 60, 0.15);
}
.docs-callout.callout-security .docs-callout-icon { background: rgba(239, 68, 68, 0.1); color: var(--accent-red); }
.docs-callout.callout-security .docs-callout-title { color: var(--accent-red); }

/* ============================================================
   12. TABLES — Enhanced with zebra striping and hover
   ============================================================ */
.docs-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-5);
  font-size: 13.5px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.docs-article thead {
  background: rgba(255, 255, 255, 0.03);
}

[data-theme='light'] .docs-article thead {
  background: rgba(0, 0, 0, 0.03);
}

.docs-article th,
.docs-article td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.docs-article th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.docs-article td {
  color: var(--text-secondary);
}

/* Zebra striping */
.docs-article tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

[data-theme='light'] .docs-article tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}

.docs-article tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.docs-article tbody tr:hover {
  background: rgba(14, 165, 233, 0.04);
}

[data-theme='light'] .docs-article tbody tr:hover {
  background: rgba(14, 165, 233, 0.04);
}

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

/* ============================================================
   13. BLOCKQUOTES — Enhanced
   ============================================================ */
.docs-article blockquote {
  border-left: 2px solid var(--border-color);
  background: transparent;
  padding: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
}

.docs-article blockquote p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* ============================================================
   14. TABLE OF CONTENTS (In-page)
   ============================================================ */
.docs-toc {
  padding: 0;
  margin: 0;
  position: relative;
}

.docs-toc-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.docs-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-toc li {
  margin-bottom: 0;
}

.docs-toc a {
  display: block;
  padding: 5px 0 5px var(--space-3);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-tertiary);
  text-decoration: none;
  border-left: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.docs-toc a:hover {
  color: var(--accent-blue);
  border-left-color: var(--accent-blue);
}

.docs-toc a.active {
  color: var(--accent-blue);
  border-left-color: var(--accent-blue);
}

.docs-toc li.toc-h3 a {
  padding-left: calc(var(--space-3) + var(--space-3));
  font-size: 12px;
}

/* ============================================================
   15. DOCS INDEX / LANDING PAGE — Redesigned
   ============================================================ */

/* Hide default h1 margin when in index page context */
.docs-index-page .docs-index-hero {
  margin-bottom: var(--space-8);
}

.docs-index-page > .docs-index-hero h1,
.docs-index-page > .docs-index-hero p {
  opacity: 1;
  transform: none;
  animation: none;
}

/* Hero Section */
.docs-index-hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.docs-index-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: var(--space-5);
  letter-spacing: 0.02em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
  animation: heroBadgePulse 2s ease-in-out infinite;
}

@keyframes heroBadgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.docs-index-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.docs-index-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: var(--space-6);
}

/* CTA Buttons */
.docs-index-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Override .docs-article a defaults for CTA buttons */
.docs-article .docs-index-cta,
.docs-index-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
  background: var(--accent-blue);
  color: #fff !important;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
  -webkit-text-fill-color: #fff;
}

.docs-article .docs-index-cta:hover,
.docs-index-cta:hover {
  background: #0c8fcc;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
  transform: translateY(-1px);
  opacity: 1;
  color: #fff !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #fff;
  filter: none;
}

.docs-article .docs-index-cta-secondary,
.docs-index-cta-secondary {
  background: transparent;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color);
  box-shadow: none;
  -webkit-text-fill-color: var(--text-secondary);
}

.docs-article .docs-index-cta-secondary:hover,
.docs-index-cta-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary) !important;
  border-color: var(--border-hover);
  box-shadow: none;
  transform: translateY(-1px);
  -webkit-text-fill-color: var(--text-primary);
  filter: none;
}

/* Install Banner */
.docs-index-install {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-10);
  background: rgba(14, 165, 233, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-lg);
}

.docs-index-install-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  padding: 2px 8px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.docs-index-install-cmd {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.docs-index-install-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-disabled);
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.docs-index-install-copy:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(14, 165, 233, 0.06);
}

.docs-index-install-copy .check-icon {
  display: none;
}

.docs-index-install-copy.copied .copy-icon {
  display: none;
}

.docs-index-install-copy.copied .check-icon {
  display: block;
}

.docs-index-install-copy.copied {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.06);
}

/* Sections */
.docs-index-section {
  margin-bottom: var(--space-8);
}

.docs-index-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.docs-index-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.docs-index-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin: 0;
  padding: 0;
  border: none;
}

/* Card Grid */
.docs-index-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-3);
}

/* Individual Card — override .docs-article a styles */
.docs-article .docs-index-card,
.docs-index-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none !important;
  transition: all 0.2s ease;
  position: relative;
  color: inherit;
  -webkit-text-fill-color: initial;
}

.docs-article .docs-index-card:hover,
.docs-index-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 1;
  filter: none;
  text-decoration: none !important;
}

[data-theme='light'] .docs-index-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Accent border on hover */
.docs-index-card[data-accent="blue"]:hover { border-color: rgba(14, 165, 233, 0.35); }
.docs-index-card[data-accent="green"]:hover { border-color: rgba(34, 197, 94, 0.35); }
.docs-index-card[data-accent="orange"]:hover { border-color: rgba(251, 146, 60, 0.35); }
.docs-index-card[data-accent="purple"]:hover { border-color: rgba(168, 85, 247, 0.35); }
.docs-index-card[data-accent="pink"]:hover { border-color: rgba(236, 72, 153, 0.35); }

/* Card Icon */
.docs-index-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.docs-index-card:hover .docs-index-card-icon {
  transform: scale(1.08);
}

/* Card Body */
.docs-index-card-body {
  flex: 1;
  min-width: 0;
}

.docs-index-card-body h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-1) 0;
  line-height: 1.3;
}

.docs-index-card-body p {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin: 0;
}

/* Card Arrow */
.docs-index-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-disabled);
  margin-top: 2px;
  transition: all 0.2s ease;
}

.docs-index-card:hover .docs-index-card-arrow {
  color: var(--text-secondary);
  transform: translateX(3px);
}

/* Footer Info */
.docs-index-footer-info {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.docs-index-footer-info p {
  font-size: 13.5px;
  color: var(--text-tertiary);
}

.docs-index-footer-info a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(14, 165, 233, 0.3);
}

.docs-index-footer-info a:hover {
  text-decoration-color: var(--accent-blue);
}

/* Legacy fallbacks for build-docs generated cards */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.docs-index-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.docs-card {
  display: block;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  position: relative;
}

.docs-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
  transform: translateY(-2px);
}

.docs-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  margin-top: 0;
}

.docs-card p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 0;
  line-height: 1.55;
}

.docs-card-arrow {
  position: absolute;
  right: var(--space-5);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-disabled);
  font-size: 16px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.docs-card:hover .docs-card-arrow {
  color: var(--text-secondary);
  transform: translateY(-50%) translateX(2px);
}

/* ============================================================
   16. CMD+K COMMAND PALETTE
   ============================================================ */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
}

.cmd-palette-overlay.open {
  display: flex;
}

.cmd-palette {
  width: 560px;
  max-width: 90vw;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 80px rgba(14, 165, 233, 0.08);
  overflow: hidden;
  animation: paletteIn 0.2s ease-out;
}

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

.cmd-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-palette-search-icon {
  color: var(--text-disabled);
  flex-shrink: 0;
}

.cmd-palette-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-body);
  outline: none;
}

.cmd-palette-input::placeholder {
  color: var(--text-disabled);
}

.cmd-palette-results {
  max-height: 340px;
  overflow-y: auto;
  padding: var(--space-2);
}

.cmd-palette-results:empty::after {
  content: 'No results found';
  display: block;
  padding: var(--space-6);
  text-align: center;
  color: var(--text-disabled);
  font-size: 14px;
}

.cmd-palette-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-secondary);
  transition: background 0.1s ease;
}

.cmd-palette-result:hover,
.cmd-palette-result.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.cmd-palette-result-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  flex-shrink: 0;
}

.cmd-palette-result-text {
  flex: 1;
  min-width: 0;
}

.cmd-palette-result-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.cmd-palette-result-desc {
  font-size: 12px;
  color: var(--text-disabled);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-palette-footer {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-disabled);
}

.cmd-palette-footer kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
}

/* ============================================================
   17. STEP-BY-STEP GUIDES
   ============================================================ */
.docs-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-6);
  position: relative;
}

/* Connecting line */
.docs-steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

.docs-step {
  counter-increment: step-counter;
  position: relative;
  padding-left: 52px;
  padding-bottom: var(--space-6);
}

.docs-step:last-child {
  padding-bottom: 0;
}

.docs-step::before {
  content: counter(step-counter);
  position: absolute;
  left: 6px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-blue);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.3);
  z-index: 1;
}

.docs-step:nth-child(2)::before { background: var(--accent-purple); box-shadow: 0 0 12px rgba(168, 85, 247, 0.3); }
.docs-step:nth-child(3)::before { background: var(--accent-pink); box-shadow: 0 0 12px rgba(236, 72, 153, 0.3); }
.docs-step:nth-child(4)::before { background: var(--accent-green); box-shadow: 0 0 12px rgba(34, 197, 94, 0.3); }
.docs-step:nth-child(5)::before { background: var(--accent-orange); box-shadow: 0 0 12px rgba(251, 146, 60, 0.3); }

.docs-step h4 {
  margin-top: 0;
  font-size: 16px;
}

/* ============================================================
   18. BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0, 0, 0, 0.3));
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.2);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   19. ANIMATIONS — Stagger-reveal for docs content
   ============================================================ */
.docs-article > * {
  opacity: 0;
  transform: translateY(12px);
  animation: docsContentReveal 0.4s ease forwards;
}

.docs-article > *:nth-child(1) { animation-delay: 0.05s; }
.docs-article > *:nth-child(2) { animation-delay: 0.1s; }
.docs-article > *:nth-child(3) { animation-delay: 0.15s; }
.docs-article > *:nth-child(4) { animation-delay: 0.2s; }
.docs-article > *:nth-child(5) { animation-delay: 0.25s; }
.docs-article > *:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes docsContentReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar nav items stagger */
.sidebar-nav-list li {
  opacity: 0;
  transform: translateX(-8px);
  animation: sidebarItemReveal 0.3s ease forwards;
}

.sidebar-nav-list li:nth-child(1) { animation-delay: 50ms; }
.sidebar-nav-list li:nth-child(2) { animation-delay: 100ms; }
.sidebar-nav-list li:nth-child(3) { animation-delay: 150ms; }
.sidebar-nav-list li:nth-child(4) { animation-delay: 200ms; }
.sidebar-nav-list li:nth-child(5) { animation-delay: 250ms; }
.sidebar-nav-list li:nth-child(6) { animation-delay: 300ms; }
.sidebar-nav-list li:nth-child(7) { animation-delay: 350ms; }
.sidebar-nav-list li:nth-child(8) { animation-delay: 400ms; }
.sidebar-nav-list li:nth-child(n+9) { animation-delay: 450ms; }

@keyframes sidebarItemReveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Section label stagger */
.sidebar-section-label {
  opacity: 0;
  animation: sidebarItemReveal 0.3s ease forwards;
}

/* ============================================================
   20. RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 900px) {
  .sidebar-toggle {
    display: flex;
  }

  .docs-header .header-nav {
    display: none;
  }

  .docs-sidebar {
    position: fixed;
    top: 64px;
    left: -290px;
    width: 280px;
    height: calc(100vh - 64px);
    z-index: 90;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    box-shadow: none;
  }

  .docs-sidebar.open {
    left: 0;
    box-shadow: var(--shadow-xl, 0 16px 48px rgba(0, 0, 0, 0.5));
  }

  .sidebar-close {
    display: block;
  }

  .docs-content {
    padding: var(--space-6);
  }

  /* Hide right TOC sidebar on tablet — not enough horizontal space */
  .docs-toc-sidebar {
    display: none;
  }

  /* Command palette responsive */
  .cmd-palette {
    width: 100%;
    max-width: calc(100vw - 32px);
    border-radius: var(--radius-lg);
  }

  /* Docs index responsive — tablet */
  .docs-index-title {
    font-size: 32px;
  }

  .docs-index-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   21. RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 480px) {
  .docs-article h1 {
    font-size: 26px;
  }

  .docs-article h2 {
    font-size: 20px;
  }

  .docs-content {
    padding: var(--space-4);
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }

  /* Code blocks on mobile: horizontal scroll hint */
  .docs-article pre {
    border-radius: var(--radius-md);
  }

  .docs-article pre code {
    padding: var(--space-3) var(--space-4);
    font-size: 12.5px;
  }

  .docs-breadcrumbs {
    font-size: 12px;
  }

  .docs-page-meta {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  /* Tables: ensure horizontal scroll with edge fade */
  .docs-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--space-5);
    position: relative;
  }

  .docs-table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(to right, transparent, var(--bg-primary));
    pointer-events: none;
  }

  .back-to-top {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 36px;
    height: 36px;
  }

  /* Docs index responsive — mobile */
  .docs-index-hero {
    padding: var(--space-6) 0 var(--space-4);
  }

  .docs-index-title {
    font-size: 26px;
  }

  .docs-index-description {
    font-size: 14px;
  }

  .docs-index-actions {
    flex-direction: column;
  }

  .docs-index-cta {
    justify-content: center;
  }

  .docs-index-install {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .docs-index-cards {
    grid-template-columns: 1fr;
  }

  .docs-index-card {
    padding: var(--space-4);
  }
}

/* ============================================================
   22. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .docs-article > *,
  .sidebar-nav-list li,
  .sidebar-section-label {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .docs-callout:hover {
    transform: none;
  }

  .docs-card:hover {
    transform: none;
  }

  .cmd-palette {
    animation: none;
  }
}
