/* Documentation Styling (docs.wicks.bot style tailored to Vex) */
:root {
  --doc-sidebar-w: 280px;
  --doc-toc-w: 230px;
  --doc-border: rgba(255, 255, 255, 0.08);
  --doc-lead: #94a3b8;
  --doc-heading: #f8fafc;
}

body.docs-body {
  background: #040817;
  color: #cbd5e1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.7;
}

.docs-layout {
  display: flex;
  min-height: calc(100vh - 70px);
  max-width: 1560px;
  margin: 0 auto;
}

/* Sidebar */
.docs-sidebar {
  width: var(--doc-sidebar-w);
  flex: none;
  border-right: 1px solid var(--doc-border);
  padding: 24px 16px 80px;
  height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.docs-search-wrap {
  margin-bottom: 20px;
}

.docs-search {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--doc-border);
  color: #f1f5f9;
  font-size: 13px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s, background .15s;
}

.docs-search:focus {
  border-color: #5865f2;
  background: rgba(255, 255, 255, 0.07);
}

.docs-search-wrap {
  position: relative;
}

.docs-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.docs-group {
  margin-bottom: 24px;
}

.docs-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s;
}

.docs-nav-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.docs-nav-link.active {
  color: #ffffff;
  background: rgba(88, 101, 242, 0.22);
  border: 1px solid rgba(88, 101, 242, 0.45);
  font-weight: 600;
}

.docs-nav-link svg {
  flex: none;
  opacity: 0.7;
}

.docs-nav-link.active svg {
  opacity: 1;
  color: #5865f2;
}

/* Main Content Area */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: 36px 48px 96px;
  max-width: 900px;
}

.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
}

.docs-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
}

.docs-breadcrumbs a:hover {
  color: #94a3b8;
}

.docs-breadcrumbs .sep {
  opacity: 0.5;
}

.docs-breadcrumbs .cur {
  color: #cbd5e1;
  font-weight: 500;
}

.doc-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #5865f2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.docs-main h1 {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.25;
}

.doc-lead {
  font-size: 17px;
  color: #94a3b8;
  line-height: 1.7;
  margin: 0 0 32px;
  border-bottom: 1px solid var(--doc-border);
  padding-bottom: 24px;
}

.docs-main h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  margin: 36px 0 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.docs-main h3 {
  font-size: 17px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 24px 0 10px;
}

.docs-main p {
  margin: 0 0 16px;
  color: #cbd5e1;
}

.docs-main ul, .docs-main ol {
  margin: 0 0 20px 24px;
  padding: 0;
  color: #cbd5e1;
}

.docs-main li {
  margin-bottom: 8px;
}

.docs-main code {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 6px;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-main a {
  color: #5865f2;
  text-decoration: none;
  font-weight: 500;
}

.docs-main a:hover {
  text-decoration: underline;
}

/* Step list */
.steps {
  list-style: none;
  counter-reset: step-counter;
  margin: 20px 0;
  padding: 0;
}

.steps li {
  position: relative;
  counter-increment: step-counter;
  padding-left: 44px;
  margin-bottom: 18px;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.5);
  color: #818cf8;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}

/* Callouts / Admonitions */
.doc-result {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}

.doc-result strong {
  color: #818cf8;
  display: block;
  font-size: 13.5px;
  margin-bottom: 4px;
}

.doc-result p {
  margin: 0;
  font-size: 14px;
  color: #cbd5e1;
}

.theme-admonition {
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  border-left: 4px solid;
}

.theme-admonition.alert--warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 4px solid #f59e0b;
}

.admonitionHeading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #fbbf24;
  margin-bottom: 6px;
}

.admonitionContent p {
  margin: 0;
  font-size: 14px;
  color: #e2e8f0;
}

/* Next Steps Cards */
.next-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.next-cards a {
  display: block;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--doc-border);
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  transition: all .2s;
}

.next-cards a:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 101, 242, 0.45);
  background: rgba(88, 101, 242, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

.next-cards a span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.5;
}

/* Table of Contents (On this page) */
.docs-toc {
  width: var(--doc-toc-w);
  flex: none;
  padding: 36px 0 36px 24px;
  height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
  overflow-y: auto;
}

.docs-toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 12px;
}

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

.docs-toc li {
  margin-bottom: 8px;
}

.docs-toc a {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: none;
  display: block;
  line-height: 1.4;
  transition: color .15s;
}

.docs-toc a:hover {
  color: #f1f5f9;
}

/* Mobile Toggle */
.docs-mob-toggle {
  display: none;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  margin: 12px 16px 0;
}

@media (max-width: 1100px) {
  .docs-toc { display: none; }
  .docs-main { padding: 28px 24px 80px; }
}

@media (max-width: 820px) {
  .docs-layout { flex-direction: column; }
  .docs-mob-toggle { display: flex; align-items: center; gap: 8px; }
  .docs-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--doc-border);
    display: none;
  }
  .docs-sidebar.open { display: block; }
}
