/* AceLM Documentation Styles */
.docs-body {
  background-color: var(--bg-body, #080d1a);
  color: var(--text-primary, #f1f5f9);
  font-family: var(--font-main, 'Plus Jakarta Sans', sans-serif);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Return to Main Site Utility Bar */
.docs-global-bar {
  background: #040810;
  border-bottom: 1px solid var(--border-color, #1e293b);
  padding: 0.5rem 1.5rem;
  font-size: 0.8rem;
  z-index: 150;
  position: relative;
}

.docs-global-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-global-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.docs-back-link {
  color: var(--accent-cyan, #38bdf8);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.15s ease;
}

.docs-back-link:hover {
  opacity: 0.85;
}

.docs-global-sep {
  color: #475569;
}

.docs-global-node {
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
}

.docs-global-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.docs-global-link {
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease;
}

.docs-global-link:hover {
  color: #f1f5f9;
}

.docs-emblem-mini {
  width: 28px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.docs-brand-text {
  display: flex;
  flex-direction: column;
}

.docs-brand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.docs-brand-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.1;
}

/* Header */
.docs-top-header {
  background-color: rgba(12, 19, 34, 0.95);
  border-bottom: 1px solid var(--border-color, #1e293b);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

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

.docs-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.docs-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary, #ffffff);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.docs-badge {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docs-header-links {
  display: flex;
  gap: 1.25rem;
}

.docs-header-link {
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.docs-header-link:hover {
  color: var(--accent-cyan, #38bdf8);
}

/* Layout */
.docs-layout-container {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* Sidebar */
.docs-sidebar {
  width: 310px;
  flex-shrink: 0;
  background-color: #0c1322;
  border-right: 1px solid var(--border-color, #1e293b);
  padding: 1.5rem 1rem;
  height: calc(100vh - 58px);
  position: sticky;
  top: 58px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-search-box {
  margin-bottom: 1.25rem;
}

.sidebar-search-box input {
  width: 100%;
  background-color: #080d1a;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  color: #f1f5f9;
  font-size: 0.82rem;
  box-sizing: border-box;
}

.sidebar-search-box input:focus {
  outline: none;
  border-color: #38bdf8;
}

.sidebar-category {
  margin-bottom: 1.25rem;
}

.sidebar-category-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin-bottom: 0.2rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.35;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  color: #f1f5f9;
  background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-link.active {
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.1);
  font-weight: 600;
}

.sidebar-raw-link {
  color: #64748b;
  font-size: 0.8rem;
}

.sidebar-raw-link:hover {
  color: #fbbf24;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid #1e293b;
}

.sidebar-cta-btn {
  display: block;
  text-align: center;
  background: #38bdf8;
  color: #080d1a;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.55rem;
  border-radius: 6px;
  text-decoration: none;
}

/* Main Content */
.docs-main-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem;
}

.docs-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.docs-doc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1e293b;
}

.docs-breadcrumb {
  font-size: 0.85rem;
  color: #64748b;
}

.docs-breadcrumb a {
  color: #38bdf8;
  text-decoration: none;
}

.docs-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #111a2e;
  border: 1px solid #293548;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.docs-action-btn:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Article Typography */
.docs-article {
  line-height: 1.75;
  color: #cbd5e1;
}

.docs-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1e293b;
}

.docs-h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 2.5rem 0 1rem 0;
  letter-spacing: -0.015em;
  position: relative;
}

.docs-h3 {
  font-size: 1.18rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 2rem 0 0.75rem 0;
}

.docs-h4 {
  font-size: 1.02rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 1.5rem 0 0.5rem 0;
}

.heading-anchor {
  color: #334155;
  text-decoration: none;
  margin-right: 0.3rem;
  font-size: 0.9em;
  transition: color 0.15s ease;
}

.heading-anchor:hover {
  color: #38bdf8;
}

.docs-p {
  margin: 1rem 0;
  font-size: 0.96rem;
  color: #cbd5e1;
}

.docs-list {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.docs-list li {
  margin-bottom: 0.5rem;
  font-size: 0.94rem;
  color: #cbd5e1;
}

.docs-ol {
  padding-left: 1.75rem;
}

.inline-code {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85em;
  background-color: #111a2e;
  border: 1px solid #1e293b;
  color: #38bdf8;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.docs-link {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-link:hover {
  color: #7dd3fc;
}

/* Callout Box */
.docs-callout {
  background: rgba(56, 189, 248, 0.05);
  border-left: 4px solid #38bdf8;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  color: #e2e8f0;
  font-size: 0.92rem;
}

/* Code Blocks */
.code-block-wrapper {
  margin: 1.5rem 0;
  background: #0c1322;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
}

.code-block-header {
  background: #111a2e;
  padding: 0.35rem 0.85rem;
  border-bottom: 1px solid #1e293b;
  font-size: 0.72rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
}

.code-block-wrapper code {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #0c1322;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.docs-table th {
  background: #111a2e;
  color: #f1f5f9;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1e293b;
}

.docs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #162032;
  color: #cbd5e1;
  vertical-align: top;
}

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

.docs-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Figures / Diagrams */
.docs-figure {
  margin: 2rem 0;
  padding: 1rem;
  background: #0c1322;
  border: 1px solid #1e293b;
  border-radius: 8px;
  text-align: center;
}

.docs-diagram-img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  background: #080d1a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.docs-figure figcaption {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.6rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

/* Footer */
.docs-doc-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #64748b;
}

/* Responsive */
@media (max-width: 960px) {
  .docs-layout-container {
    flex-direction: column;
  }
  .docs-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #1e293b;
  }
  .docs-main-content {
    padding: 1.5rem 1rem;
  }
  .docs-header-inner {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    padding: 0.75rem 1rem;
  }
  .docs-header-links {
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }
}
