:root {
  --primary: #1e3a8a; /* Updated to requested blue */
  --accent: #2563eb; /* Slightly brighter blue for interactive elements */
  --accent-light: #60a5fa;
  --bg: #ffffff;
  --text: #000000; /* Pure black as requested */
  --muted: #475569; /* Darker grey for better contrast */
  --surface: #f8fafc;
  --border: #e2e8f0;
  --sidebar-width: 300px; /* Slightly wider for modern feel */
  --header-height: 70px;
  --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Status Colors */
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
}

.brand-logo {
  width: 48px;
  height: 48px;
  display: inline-block;
  color: #1e3a8a; /* Primary color */
}

.brand-logo path {
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  height: 100vh;
  display: flex;
  overflow: hidden;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Decorative Header Strip */
.docs-header-strip {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  z-index: 100;
}

/* Sidebar */
.docs-sidebar {
  width: var(--sidebar-width);
  background: #fff;
  border-right: 1px solid var(--border);
  height: 100vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  box-shadow: 4px 0 24px rgba(0,0,0,0.02);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  font-weight: 800;
  color: var(--primary);
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
}

/* Search Area */
.search-container {
  padding: 0 32px 24px 32px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 60;
}

.search-wrapper {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-sans);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
  display: none; /* Hidden by default */
  z-index: 100;
}

.search-results.visible {
  display: block;
  animation: slideDown 0.1s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-result-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--surface);
}

.search-result-title {
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.search-result-snippet {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0 2px;
  border-radius: 2px;
}

.no-results {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Navigation */
.nav-group {
  margin-bottom: 32px;
}

.nav-group-title {
  padding: 0 32px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 32px;
  color: #334155;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--primary);
}

.nav-item.active {
  background: #eff6ff;
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.nav-item .chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
  color: var(--muted);
  opacity: 0.7;
}

.nav-item.expanded .chevron {
  transform: rotate(90deg);
}

.nav-sub-group {
  display: none;
  background: #fff;
  padding: 4px 0;
}

.nav-sub-group.open {
  display: block;
}

.nav-sub-item {
  display: block;
  padding: 8px 32px 8px 56px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
  position: relative;
}

.nav-sub-item:before {
  content: '';
  position: absolute;
  left: 42px;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
  transform: translateY(-50%);
}

.nav-sub-item:hover {
  color: var(--primary);
}

.nav-sub-item:hover:before {
  background: var(--accent);
}

.nav-sub-item.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-sub-item.active:before {
  background: var(--primary);
}

/* Main Content */
.docs-main {
  flex: 1;
  overflow-y: auto;
  position: relative;
  scroll-behavior: smooth;
  background: #fff;
}

.docs-content {
  max-width: 900px; /* Wider content area */
  margin: 0 auto;
  padding: 80px 80px 160px;
}

/* Typography & Content Styles */
h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--primary);
  line-height: 1.1;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 64px;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  position: relative;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}

p {
  line-height: 1.75;
  margin-bottom: 24px;
  color: var(--text);
  font-size: 16px;
}

.lead {
  font-size: 20px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 48px;
  font-weight: 400;
}

ul, ol {
  margin-bottom: 32px;
  padding-left: 24px;
  line-height: 1.75;
}

li {
  margin-bottom: 12px;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Components */
.callout {
  padding: 24px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 32px;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.callout.danger {
  background: var(--danger-bg);
  border-color: #fee2e2;
  border-left-color: var(--danger);
}

.callout-title {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout.danger .callout-title {
  color: var(--danger);
}

pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 32px;
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 40px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  box-shadow: var(--shadow-lg);
  position: relative;
}

code {
  font-family: var(--font-mono);
}

p code {
  background: var(--surface);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.85em;
  color: var(--primary);
  font-weight: 500;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 40px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--primary);
  background: var(--surface);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #f8fafc;
}

/* Responsive */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow: auto;
  }

  .docs-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: relative;
    box-shadow: none;
  }

  .sidebar-header {
    justify-content: space-between;
  }

  .sidebar-content {
    display: none; /* Hide nav on mobile by default, could toggle */
  }

  .sidebar-content.active {
    display: block;
  }

  .docs-main {
    overflow: visible;
  }
  
  .docs-content {
    padding: 40px 24px;
  }
}
