/* ===================================================================
   Documentation - Simplified Modern Blue Theme
   Compatible with sphinx_rtd_theme
   ================================================================== */

/* CSS Custom Properties - Dark Theme Design System */
:root {
  /* Primary Blue Palette - Vibrant Blues for Dark Theme */
  --primary-50: #1e293b;
  --primary-100: #334155;
  --primary-200: #475569;
  --primary-300: #2563eb;
  --primary-400: #3b82f6;
  --primary-500: #60a5fa;
  --primary-600: #3b82f6;
  --primary-700: #60a5fa;
  --primary-800: #93c5fd;

  /* Accent Colors - Adjusted for Dark Theme */
  --accent-green: #10b981;
  --accent-orange: #fb923c;
  --accent-red: #ef4444;
  --accent-purple: #a78bfa;

  /* Neutral Palette - Balanced Dark Theme (Charcoal to Grey) */
  --gray-50: #1f2937;
  --gray-100: #2d3748;
  --gray-200: #374151;
  --gray-300: #475569;
  --gray-400: #94a3b8;
  --gray-500: #cbd5e1;
  --gray-600: #e2e8f0;
  --gray-700: #f1f5f9;
  --gray-800: #f8fafc;
  --gray-900: #ffffff;

  /* Typography */
  --font-mono: 'SF Mono', 'Monaco', 'Roboto Mono', 'Courier New', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows - Dark Theme */
  --shadow-sm: 0 1px 2px 0 rgba(59, 130, 246, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(59, 130, 246, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================
   Header Customization
   ================================================================== */

/* RTD Header */
.wy-side-nav-search {
  background: var(--gray-100) !important;
}

.wy-side-nav-search > a {
  color: var(--gray-900) !important;
  font-weight: 700;
  text-decoration: none;
}

/* Logo styling */
.wy-side-nav-search img.logo {
  max-height: 60px;
  width: auto;
}

/* Search input styling */
.wy-side-nav-search input[type="text"] {
  border: 1px solid var(--primary-600);
  background: var(--gray-100);
  color: var(--gray-900);
  font-size: 14px;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ===================================================================
   Navigation Styling
   ================================================================== */

/* Navigation background */
.wy-nav-side {
  background: var(--gray-50) !important;
  border-right: 1px solid var(--primary-600);
}

/* Navigation items */
.wy-menu-vertical a {
  color: var(--gray-600) !important;
  border-left: 3px solid transparent;
  transition: var(--transition);
  font-weight: 500;
}

.wy-menu-vertical a:hover {
  background: var(--gray-100) !important;
  color: var(--primary-500) !important;
  border-left-color: var(--primary-600);
  transform: translateX(2px);
}

/* Active navigation items */
.wy-menu-vertical li.current > a,
.wy-menu-vertical li.current a {
  background: var(--primary-100) !important;
  color: var(--primary-700) !important;
  border-left-color: var(--primary-600) !important;
  font-weight: 600;
}

/* Sub-navigation */
.wy-menu-vertical li ul li a {
  color: var(--gray-500) !important;
  font-size: 14px;
  font-weight: 400;
}

.wy-menu-vertical li ul li a:hover {
  background: var(--gray-100) !important;
  color: var(--primary-500) !important;
}

.wy-menu-vertical li ul li.current a {
  background: var(--primary-100) !important;
  color: var(--primary-600) !important;
  border-left-color: var(--primary-600) !important;
  font-weight: 500;
}

/* ===================================================================
   Content Area
   ================================================================== */

/* Main content background */
.wy-nav-content {
  background: var(--gray-100);
}

.wy-nav-content-wrap {
  background: var(--gray-100);
}

.rst-content {
  color: var(--gray-900);
}

/* ===================================================================
   Typography
   ================================================================== */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: 700;
}

h1 {
  color: var(--primary-700);
  border-bottom: 3px solid var(--primary-600);
  padding-bottom: 0.5rem;
}

h2 {
  color: var(--gray-800);
  border-bottom: 2px solid var(--primary-600);
  padding-bottom: 0.25rem;
}

h3 {
  color: var(--gray-700);
}

/* Hide header anchor links */
.headerlink {
  display: none !important;
}

/* Links */
a {
  color: var(--primary-500);
  text-decoration: none;
}

a:hover {
  color: var(--primary-700);
  text-decoration: underline;
  text-decoration-color: var(--primary-500);
}

/* Toctree captions */
.caption,
.toctree-caption,
.rst-content .toctree-wrapper p.caption,
.rst-content p.caption {
  color: var(--primary-600) !important;
  font-weight: 600;
}

/* ===================================================================
   Code Blocks & Syntax Highlighting
   ================================================================== */

/* Code block container */
.highlight {
  border-radius: 8px;
  border: 1px solid var(--primary-600);
  background: #1f2937 !important;
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

/* Code block accent line */
.highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-500));
}

/* Code content */
.highlight pre {
  padding: 1.5rem;
  line-height: 1.6;
  font-family: var(--font-mono);
  font-size: 14px;
  margin: 0;
  background: transparent !important;
  border: none;
  overflow-x: auto;
  color: #e2e8f0;
}

/* Fix the white rectangle - remove borders and backgrounds from code block containers */
.code-block,
.code-block-container,
.literal-block-wrapper,
.highlight-python,
.highlight-bash,
.highlight-shell,
.highlight-console,
.highlight-default,
.rst-content .code-block,
.rst-content .literal-block,
.rst-content .doctest-block {
  background: transparent !important;
  border: none !important;
  border-radius: 8px !important;
}

/* Inline code */
code {
  background: #1f2937 !important;
  color: #60a5fa !important;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  font-weight: 600;
  border: 1px solid var(--primary-600);
  box-shadow: var(--shadow-sm);
}

/* Syntax highlighting - Blue Accent Theme */
.highlight .k, .highlight .kw { color: #93c5fd; font-weight: 700; } /* Keywords - Light Blue */
.highlight .kn, .highlight .kd, .highlight .kc { color: #60a5fa; font-weight: 600; } /* Import, declarations - Medium Blue */
.highlight .s, .highlight .s1, .highlight .s2 { color: #7dd3fc; font-weight: 500; } /* Strings - Cyan Blue */
.highlight .c, .highlight .c1, .highlight .cm { color: #64748b; font-style: italic; opacity: 0.9; } /* Comments - Muted Gray */
.highlight .n, .highlight .na { color: #e2e8f0; } /* Names - Light Gray */
.highlight .nb { color: #38bdf8; font-weight: 600; } /* Built-ins - Sky Blue */
.highlight .nf { color: #3b82f6; font-weight: 700; } /* Functions - Primary Blue */
.highlight .nc { color: #60a5fa; font-weight: 700; } /* Classes - Medium Blue */
.highlight .mi, .highlight .mf { color: #34d399; font-weight: 600; } /* Numbers - Emerald */
.highlight .o, .highlight .ow { color: #93c5fd; font-weight: 500; } /* Operators - Light Blue */
.highlight .p { color: #cbd5e1; } /* Punctuation - Light Gray */

/* ===================================================================
   Admonitions
   ================================================================== */

.admonition {
  border-radius: 8px;
  border: none;
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--gray-200);
}

.admonition-title {
  padding: 1rem 1.25rem;
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admonition p {
  padding: 1.25rem;
  margin: 0;
  line-height: 1.6;
  color: var(--gray-800);
}

/* Admonition types */
.admonition.note {
  border-left: 4px solid var(--primary-600);
}
.admonition.note .admonition-title {
  background: var(--primary-100);
  color: var(--primary-700);
}

.admonition.warning {
  border-left: 4px solid var(--accent-orange);
}
.admonition.warning .admonition-title {
  background: #52422d;
  color: var(--accent-orange);
}

.admonition.important {
  border-left: 4px solid var(--accent-green);
}
.admonition.important .admonition-title {
  background: #2d4239;
  color: var(--accent-green);
}

.admonition.tip {
  border-left: 4px solid var(--accent-purple);
}
.admonition.tip .admonition-title {
  background: #3a2d52;
  color: var(--accent-purple);
}

/* ===================================================================
   Tables - Uniform Dark Grey Background
   ================================================================== */

.wy-table-responsive table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  background: var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--primary-600);
}

.wy-table-responsive table th {
  background: var(--primary-100);
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  color: var(--primary-700);
  border-bottom: 2px solid var(--primary-600);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wy-table-responsive table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-300);
  color: var(--gray-800);
  background: var(--gray-200) !important;
}

.wy-table-responsive table tr {
  background: var(--gray-200) !important;
}

.wy-table-responsive table tr:hover {
  background: var(--gray-100) !important;
}

.wy-table-responsive table tr:hover td {
  background: var(--gray-100) !important;
}

/* Uniform row styling - override alternating colors */
.uniform-rows .row-odd,
.uniform-rows .row-even,
.uniform-rows tr:nth-child(odd),
.uniform-rows tr:nth-child(even),
.uniform-rows table tr,
.uniform-rows tbody tr,
.uniform-rows tbody tr:nth-child(odd),
.uniform-rows tbody tr:nth-child(even) {
  background: var(--gray-200) !important;
}

.uniform-rows .row-odd:hover,
.uniform-rows .row-even:hover,
.uniform-rows tr:nth-child(odd):hover,
.uniform-rows tr:nth-child(even):hover,
.uniform-rows table tr:hover,
.uniform-rows tbody tr:hover,
.uniform-rows tbody tr:nth-child(odd):hover,
.uniform-rows tbody tr:nth-child(even):hover {
  background: var(--gray-100) !important;
}

/* More specific override for list-table rows */
.wy-table-responsive .uniform-rows tbody tr,
.wy-table-responsive .uniform-rows tbody tr:nth-child(odd),
.wy-table-responsive .uniform-rows tbody tr:nth-child(even),
.wy-table-responsive .uniform-rows tr,
.wy-table-responsive .uniform-rows tr:nth-child(odd),
.wy-table-responsive .uniform-rows tr:nth-child(even) {
  background: var(--gray-200) !important;
}

.wy-table-responsive .uniform-rows tbody tr:hover,
.wy-table-responsive .uniform-rows tbody tr:nth-child(odd):hover,
.wy-table-responsive .uniform-rows tbody tr:nth-child(even):hover,
.wy-table-responsive .uniform-rows tr:hover,
.wy-table-responsive .uniform-rows tr:nth-child(odd):hover,
.wy-table-responsive .uniform-rows tr:nth-child(even):hover {
  background: var(--gray-100) !important;
}

/* Nuclear option - force all table rows in uniform-rows to have same background */
table.uniform-rows tr,
.uniform-rows tr,
.uniform-rows tbody tr,
.uniform-rows table tr,
.uniform-rows tr.row-odd,
.uniform-rows tr.row-even,
.uniform-rows tbody tr.row-odd,
.uniform-rows tbody tr.row-even {
  background-color: var(--gray-200) !important;
  background: var(--gray-200) !important;
}

table.uniform-rows tr:hover,
.uniform-rows tr:hover,
.uniform-rows tbody tr:hover,
.uniform-rows table tr:hover,
.uniform-rows tr.row-odd:hover,
.uniform-rows tr.row-even:hover,
.uniform-rows tbody tr.row-odd:hover,
.uniform-rows tbody tr.row-even:hover {
  background-color: var(--gray-100) !important;
  background: var(--gray-100) !important;
}

/* Last resort - target any element inside uniform-rows tables */
.uniform-rows * {
  background-color: inherit !important;
}

/* Force all td elements in uniform-rows tables to inherit background */
.uniform-rows td,
.uniform-rows th {
  background-color: inherit !important;
  background: inherit !important;
}

/* Ultimate override - remove all alternating backgrounds */
.uniform-rows,
.uniform-rows table,
.uniform-rows tbody,
.uniform-rows tr,
.uniform-rows td,
.uniform-rows th {
  background-color: var(--gray-200) !important;
  background: var(--gray-200) !important;
}

.uniform-rows tr:hover,
.uniform-rows td:hover,
.uniform-rows th:hover {
  background-color: var(--gray-100) !important;
  background: var(--gray-100) !important;
}

/* Block any theme-specific alternating row rules */
.uniform-rows tr:nth-child(2n),
.uniform-rows tr:nth-child(2n+1),
.uniform-rows tbody tr:nth-child(2n),
.uniform-rows tbody tr:nth-child(2n+1) {
  background-color: var(--gray-200) !important;
  background: var(--gray-200) !important;
}

/* ===================================================================
   API Documentation
   ================================================================== */

.class > dt,
.function > dt,
.method > dt {
  background: var(--gray-200);
  border: 1px solid var(--primary-600);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
}

.sig-name {
  color: var(--primary-600);
  font-weight: 700;
}

.sig-param {
  color: var(--accent-red);
  font-style: italic;
}

/* ===================================================================
   Responsive Design
   ================================================================== */

@media screen and (max-width: 768px) {
  .wy-menu-vertical a {
    font-size: 14px;
    padding: 12px 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .highlight pre {
    padding: 1rem;
    font-size: 13px;
  }

  code {
    font-size: 0.8em;
    padding: 2px 6px;
  }
}

/* ===================================================================
   RTD Theme Compatibility
   ================================================================== */

/* Ensure RTD mobile menu works properly */
.wy-nav-top {
  background: var(--gray-50) !important;
  border-bottom: 2px solid var(--primary-600);
}

.wy-nav-top a {
  color: var(--gray-900) !important;
}

/* RTD version selector styling */
.rst-versions {
  border-top: 2px solid var(--primary-600);
  background: var(--gray-50);
}

.rst-versions .rst-current-version {
  background: var(--gray-100);
  color: var(--gray-900);
}

.rst-versions .rst-current-version .fa {
  color: var(--primary-600);
}


/* ===================================================================
   Mermaid Diagrams
   ================================================================== */

/* Mermaid container with interactive pan/zoom. The container height is set
   by layout-manager.js so the SVG fills the container width at its natural
   aspect ratio — no letterboxing on first render. */
.mermaid {
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  margin: 1.5rem 0 !important;
  border-radius: 8px !important;
  border: 2px solid var(--primary-600) !important;
  background: #374151 !important;
  box-shadow: var(--shadow-lg), 0 0 18px rgba(59, 130, 246, 0.5), 0 0 35px rgba(59, 130, 246, 0.2) !important;
  padding: 1.5rem !important;
  position: relative !important;
  user-select: none !important;
  touch-action: none !important;
  box-sizing: border-box !important;
}

/* SVG fills container width; height scales from the diagram's natural
   aspect ratio (set on the viewBox by layout-manager.js). The `!important`
   rules override the inline 500px-height styles from sphinxcontrib-mermaid. */
.mermaid svg,
pre.mermaid > svg {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  transition: transform 0.1s ease-out !important;
  cursor: grab !important;
}

.mermaid svg:active {
  cursor: grabbing !important;
}

/* Responsive scaling for smaller screens */
@media screen and (max-width: 768px) {
  .mermaid {
    font-size: 10px !important;
    padding: 0.75rem !important;
  }
}

@media screen and (max-width: 1024px) {
  .mermaid {
    font-size: 11px !important;
  }
}

/* Mermaid diagram element styling for better visibility - All diagram types */

/* Node shapes - all types */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon,
.mermaid .node path {
  stroke: #3b82f6 !important;
  stroke-width: 3px !important;
  fill: #60a5fa !important;
}

/* All connector lines and edges - WHITE for maximum visibility */
.mermaid .edgePath .path,
.mermaid .flowchart-link,
.mermaid .messageLine0,
.mermaid .messageLine1,
.mermaid line,
.mermaid path.path,
.mermaid .connection,
.mermaid .link,
.mermaid polyline {
  stroke: #ffffff !important;
  stroke-width: 3px !important;
}

/* Ensure all SVG paths in mermaid are white */
.mermaid svg path[class*="path"],
.mermaid svg path[class*="link"],
.mermaid svg path[class*="edge"],
.mermaid svg line[class*="line"] {
  stroke: #ffffff !important;
}

/* Edge labels */
.mermaid .edgeLabel,
.mermaid .messageText {
  background-color: #2563eb !important;
  color: #ffffff !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-weight: normal !important;
}

/* All arrow markers - WHITE */
.mermaid .marker,
.mermaid .arrowheadPath,
.mermaid marker path,
.mermaid marker polygon {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* All text - normal weight */
.mermaid text,
.mermaid .nodeLabel,
.mermaid .label,
.mermaid .labelText,
.mermaid tspan {
  fill: #ffffff !important;
  font-weight: normal !important;
  font-size: 14px !important;
}

/* Sequence diagram actors */
.mermaid .actor {
  fill: #60a5fa !important;
  stroke: #3b82f6 !important;
  stroke-width: 2px !important;
}

.mermaid .actor-line {
  stroke: #ffffff !important;
  stroke-width: 2px !important;
}

/* Activation boxes */
.mermaid .activation0,
.mermaid .activation1,
.mermaid .activation2 {
  fill: #3b82f6 !important;
  stroke: #60a5fa !important;
}

/* Note boxes */
.mermaid .note {
  fill: #60a5fa !important;
  stroke: #3b82f6 !important;
  stroke-width: 2px !important;
}

/* Loop/alt/opt boxes */
.mermaid .loopText,
.mermaid .loopLine,
.mermaid .labelBox {
  fill: #2563eb !important;
  stroke: #3b82f6 !important;
}

/* Clusters/subgraphs */
.mermaid .cluster rect,
.mermaid .cluster-label {
  fill: #475569 !important;
  stroke: #3b82f6 !important;
  stroke-width: 2px !important;
}

.mermaid .cluster text {
  fill: #ffffff !important;
  font-weight: normal !important;
}

/* State diagram specific */
.mermaid .stateGroup rect,
.mermaid .state-note,
.mermaid .statediagram-state {
  fill: #60a5fa !important;
  stroke: #3b82f6 !important;
  stroke-width: 2px !important;
}

/* Gantt chart specific */
.mermaid .task,
.mermaid .taskText {
  fill: #60a5fa !important;
  stroke: #3b82f6 !important;
}

.mermaid .grid .tick line {
  stroke: #ffffff !important;
  opacity: 0.3 !important;
}

/* Class diagram specific */
.mermaid .classGroup rect,
.mermaid .classLabel {
  fill: #60a5fa !important;
  stroke: #3b82f6 !important;
  stroke-width: 2px !important;
}

.mermaid .divider {
  stroke: #ffffff !important;
  stroke-width: 2px !important;
}

/* ER diagram specific */
.mermaid .entityBox,
.mermaid .attributeBoxEven,
.mermaid .attributeBoxOdd {
  fill: #60a5fa !important;
  stroke: #3b82f6 !important;
  stroke-width: 2px !important;
}

.mermaid .relationshipLine {
  stroke: #ffffff !important;
  stroke-width: 3px !important;
}

/* Journey diagram specific */
.mermaid .section0,
.mermaid .section1,
.mermaid .section2 {
  fill: #60a5fa !important;
}

.mermaid .task0,
.mermaid .task1,
.mermaid .task2,
.mermaid .task3 {
  fill: #3b82f6 !important;
  stroke: #60a5fa !important;
}

/* Hint text for interactive controls */
.mermaid::after {
  content: '💡 Drag to pan • Scroll to zoom • Double-click to reset';
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 10px;
  color: var(--gray-500);
  pointer-events: none;
  opacity: 0.7;
  font-family: var(--font-sans);
}

@media screen and (max-width: 768px) {
  .mermaid::after {
    content: '💡 Drag • Pinch • Double-tap';
    font-size: 9px;
  }
}

/* ===================================================================
   Loading States & Performance
   ================================================================== */

/* Loading state */
body.loading {
  opacity: 0.9;
}

body.loaded {
    opacity: 1;
  transition: opacity 0.3s ease;
}


/* Copy button styles (fallback if sphinx-copybutton not available) */
.copy-btn:hover {
  background: var(--primary-600) !important;
  transform: scale(1.05);
}

/* ===================================================================
   Accessibility & Performance
   ================================================================== */

/* Focus states */
*:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-600);
  color: var(--gray-900);
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-600: #60a5fa;
    --primary-700: #93c5fd;
    --gray-600: #fff;
    --gray-700: #fff;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .copy-btn:hover {
    transform: none !important;
  }
}

/* Print styles */
@media print {
  .highlight {
    border: 1px solid #ccc;
    background: #f5f5f5 !important;
  }

  .wy-nav-side {
    display: none !important;
  }

  .copy-btn {
    display: none !important;
  }
}

/* ===================================================================
   Additional Dark Theme Adjustments
   ================================================================== */

/* Body and document background */
body {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* Document container */
.document {
  background: var(--gray-100);
}

/* Fix the white rectangle - remove borders and backgrounds from code block containers */
.code-block,
.code-block-container,
.literal-block-wrapper,
.highlight-python,
.highlight-bash,
.highlight-shell,
.highlight-console,
.highlight-default,
.rst-content .code-block,
.rst-content .literal-block,
.rst-content .doctest-block {
  background: transparent !important;
  border: none !important;
  border-radius: 8px !important;
}

/* Sidebar background */
.sphinxsidebarwrapper {
  background: var(--gray-50);
}

/* Footer styling */
footer, .rst-footer-buttons {
  background: var(--gray-100);
  color: var(--gray-700);
  border-top: 1px solid var(--primary-600);
}

/* Breadcrumbs */
.wy-breadcrumbs {
  background: transparent;
}

.wy-breadcrumbs li a {
  color: var(--primary-500);
}

.wy-breadcrumbs li.wy-breadcrumbs-aside a {
  color: var(--primary-600);
}

/* Section navigation */
.rst-content .section {
  background: transparent;
}

/* Field lists (parameter descriptions, etc.) */
.rst-content dl:not(.docutils) dt {
  background: var(--gray-200);
  color: var(--gray-800);
  border-top: 3px solid var(--primary-600);
}

.rst-content dl:not(.docutils) dd {
  background: var(--gray-100);
  color: var(--gray-800);
}

/* Notes and warnings */
.rst-content .note {
  background: var(--gray-200);
  border: 1px solid var(--primary-600);
}

.rst-content .warning {
  background: var(--gray-200);
  border: 1px solid var(--accent-orange);
}

/* Code block title bars */
.code-block-caption {
  background: var(--primary-100);
  color: var(--primary-700);
  border-bottom: 2px solid var(--primary-600);
}

/* Literal blocks */
.rst-content pre.literal-block {
  background: #1f2937;
  border: 1px solid var(--primary-600);
  color: #e2e8f0;
}

/* Download links */
.rst-content code.download {
  background: var(--primary-600);
  color: var(--gray-900);
}

.rst-content code.download:hover {
  background: var(--primary-500);
}

/* Search box in content */
.search-box {
  background: var(--gray-200);
  border: 1px solid var(--primary-600);
}

/* Paragraph text */
p {
  color: var(--gray-800);
}

/* List items */
li {
  color: var(--gray-800);
}

/* Definition lists */
dt {
  color: var(--gray-900);
}

dd {
  color: var(--gray-800);
}

/* Blockquotes */
blockquote {
  background: var(--gray-200);
  border-left: 4px solid var(--primary-600);
  color: var(--gray-800);
}

/* Horizontal rules */
hr {
  border-color: var(--primary-600);
}

/* Guilabel and menu selection */
.guilabel, .menuselection {
  background: var(--gray-200);
  color: var(--primary-600);
  border: 1px solid var(--primary-600);
}

/* Keyboard input */
kbd {
  background: var(--gray-200);
  color: var(--gray-900);
  border: 1px solid var(--primary-600);
  box-shadow: var(--shadow-sm);
}

/* Abbreviations */
abbr[title] {
  border-bottom: 1px dotted var(--primary-600);
  color: var(--gray-900);
}

/* Citations and footnotes */
.rst-content .citation, .rst-content .footnote {
  background: var(--gray-200);
  border-left: 3px solid var(--primary-600);
}

/* Version modified/added/deprecated */
.versionmodified {
  background: var(--gray-200);
  color: var(--primary-600);
  border-left: 3px solid var(--primary-600);
}

/* sectnum injects a <span class="sectnum"> before every numbered heading.
   Hide every sectnum span by default, then re-enable only inside h2–h6
   within the main content. This removes numbers from: the h1 document
   title, sidebar navigation entries, and inline cross-page links. */
.sectnum {
  display: none;
}
.rst-content h2 .sectnum,
.rst-content h3 .sectnum,
.rst-content h4 .sectnum,
.rst-content h5 .sectnum,
.rst-content h6 .sectnum {
  display: inline;
}
