 /* --- Root Core Parameters --- */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #334155;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --primary: #4f46e5;
  --primary-light: #f5f3ff;
  --accent-orange: #f05a28;
  --border-color: #e2e8f0;
  --danger-color: #ef4444;
}
/* --- Hero Search Core --- */
.hero-section {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: 40px 0;
}
.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.search-wrapper {
  position: relative;
  max-width: 650px;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}
.search-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  transition: all 0.2s;
}
.search-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}
.search-badge {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: monospace;
}

/* --- Main Layout Distribution --- */
.main-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 1024px) {
  .main-layout { grid-template-columns: 8fr 4fr; }
}

/* --- Left Column Card Modules --- */
.doc-card {
  background: var(--bg-card);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs svg { width: 14px; height: 14px; }
.breadcrumbs .current { color: #94a3b8; font-weight: 400; }

.main-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  margin-bottom: 36px;
  line-height: 1.2;
}

/* --- Content Sections styling --- */
.doc-section { scroll-margin-top: 100px; }
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 4px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 20px;
}
.step-block { margin-bottom: 30px; }
.step-text { font-size: 1rem; color: #475569; margin-bottom: 16px; }
.step-number { font-weight: 700; color: var(--text-dark); }

.ui-inline-badge {
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88rem;
}
.ui-inline-badge.text-danger {
  color: var(--danger-color);
  background: #fef2f2;
  border-color: #fca5a5;
}

/* --- Custom Lists Structure --- */
.nested-list, .sub-nested-list {
  list-style: none;
  margin: 20px 0;
}
.nested-list > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
  color: #475569;
}
.nested-list > li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--primary);
  font-size: 1.2rem;
  top: -2px;
}
.sub-nested-list {
  margin: 12px 0 0 12px;
  border-left: 2px solid #f1f5f9;
  padding-left: 16px;
}
.sub-nested-list li {
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.inline-link {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 500;
}

/* --- Image Containers --- */
.image-wrapper {
  margin: 24px 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
  background: #ffffff;
}
.max-w-md { max-width: 480px; }
.max-w-sm { max-width: 360px; }

.image-header {
  background: #f8fafc;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.tag {
  background: #e2e8f0;
  color: var(--text-dark);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}
.image-body { background: #fff; padding: 10px; }
.image-body img { width: 100%; height: auto; display: block; border-radius: 6px; }
.image-fallback {
  padding: 45px 20px;
  text-align: center;
  font-style: italic;
  font-size: 0.88rem;
  color: #94a3b8;
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
}

/* --- Tables & Callouts System --- */
.divider { height: 1px; background: #f1f5f9; margin: 40px 0; }

.callout {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
  margin: 24px 0;
  font-size: 0.95rem;
}
.callout-info {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  color: #166534;
}
.callout-info svg { color: #22c55e; }
.callout-warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}
.callout-warning svg { color: #f59e0b; }
.callout-content strong { color: var(--text-dark); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.data-table th { background: #f8fafc; color: var(--text-dark); font-weight: 600; }

/* --- Right Sidebar Column Layout --- */
.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1024px) {
  .sidebar-column {
    position: sticky;
    top: 90px;
    height: fit-content;
  }
}
.widget-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}
.widget-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 700;
}
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.counter-badge {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
}
.widget-list { list-style: none; }
.widget-list li { margin-bottom: 4px; }
.widget-list a {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 8px;
  transition: all 0.2s;
}
.widget-list a:hover { background: #f8fafc; color: var(--text-dark); }

/* Scrollspy active elements classes */
.toc-link.active {
  color: var(--primary) !important;
  font-weight: 700;
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
}
.scrollable-list { max-height: 350px; overflow-y: auto; }
.current-page {
  color: var(--primary) !important;
  font-weight: 700;
  background: var(--primary-light);
  text-decoration: underline;
}
.article-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 6px;
  color: #94a3b8;
}

/* --- Floating Button Utility --- */
.floating-action-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
}
.fab-btn {
  background: var(--accent-orange);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(240, 90, 40, 0.3);
  transition: transform 0.2s, background 0.2s;
}
.fab-btn:hover { background: #d94e1f; transform: translateY(-2px); }
.fab-btn svg { width: 18px; height: 18px; }

/* --- Dynamic Content Body HTML Overrides --- */

.doc-content-body {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.6;
}

.doc-content-body p {
  margin-bottom: 16px;
  color: #475569;
}

.doc-content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 36px 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  scroll-margin-top: 100px;
}

.doc-content-body h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 4px;
}

.doc-content-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 28px 0 16px 0;
  scroll-margin-top: 100px;
}

/* Unordered Lists styling (purple bullets) */
.doc-content-body ul {
  list-style: none;
  margin: 20px 0;
  padding-left: 0;
}

.doc-content-body ul > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: #475569;
}

.doc-content-body ul > li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--primary);
  font-size: 1.4rem;
  top: -2px;
}

/* Ordered Lists styling (numbered steps) */
.doc-content-body ol {
  margin: 20px 0;
  padding-left: 24px;
  color: #475569;
}

.doc-content-body ol > li {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Nested lists (both ul and ol) */
.doc-content-body ul ul,
.doc-content-body ol ul,
.doc-content-body ul ol,
.doc-content-body ol ol {
  margin: 12px 0 0 12px;
  border-left: 2px solid #f1f5f9;
  padding-left: 16px;
  list-style-type: initial;
}

.doc-content-body ul ul > li::before,
.doc-content-body ol ul > li::before {
  display: none; /* Hide custom bullet for nested sub-lists if using standard type */
}

.doc-content-body ul ul > li,
.doc-content-body ol ul > li {
  padding-left: 0;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* Code & Badge formatting */
.doc-content-body code, 
.doc-content-body kbd {
  font-family: inherit;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Blockquotes styled like info callouts */
.doc-content-body blockquote {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  color: #166534;
  padding: 20px;
  border-radius: 14px;
  margin: 24px 0;
  font-size: 0.95rem;
}

.doc-content-body blockquote strong {
  color: var(--text-dark);
}

/* Tables styling */
.doc-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.doc-content-body table th, 
.doc-content-body table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.doc-content-body table th {
  background: #f8fafc;
  color: var(--text-dark);
  font-weight: 600;
}