/* ============================================
   NEXUS MINING — DOCS STYLESHEET
   Background: #0b0f17   Accent: #f59e0b
   ============================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #0b0f17;
  color: #f59e0b;
  line-height: 1.7;
}

a { color: #f59e0b; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid #1f2530;
  background: #0b0f17;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .logo {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: #f59e0b;
  letter-spacing: 0.5px;
}

.topbar nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #f59e0b;
  font-size: 0.95rem;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.topbar nav a:hover,
.topbar nav a.active {
  opacity: 1;
  font-weight: 600;
}

/* ---------- Layout ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border-right: 1px solid #1f2530;
  padding-right: 1.5rem;
}

.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-section { margin-bottom: 0.75rem; }

.sidebar-toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  cursor: pointer;
  color: #f59e0b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.3px;
}
.sidebar-toggle:hover { color: #ffb733; }

.sidebar-toggle::after {
  content: '▸';
  font-size: 0.75rem;
  transition: transform 0.2s;
  color: #f59e0b;
  opacity: 0.6;
}
.sidebar-toggle[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

.sidebar-sublist {
  list-style: none;
  padding-left: 0.75rem;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.sidebar-sublist.open { max-height: 500px; }

.sidebar-sublist a {
  display: block;
  padding: 0.35rem 0.6rem;
  color: #f59e0b;
  opacity: 0.7;
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.15s;
}
.sidebar-sublist a:hover {
  opacity: 1;
  background: #141a24;
  border-left-color: #f59e0b;
}
.sidebar-sublist a.active {
  opacity: 1;
  font-weight: 600;
  background: #141a24;
  border-left-color: #f59e0b;
}

/* ---------- Content ---------- */
.doc-content {
  min-width: 0;
  padding-bottom: 4rem;
}

.doc-content section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 90px;
}

.doc-content h1 {
  font-size: 2rem;
  margin-top: 0;
  color: #f59e0b;
  letter-spacing: 0.5px;
}
.doc-content h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #1f2530;
  color: #f59e0b;
}
.doc-content h3 {
  color: #f59e0b;
  font-size: 1.15rem;
}

.doc-content p {
  color: #d6dee8;   /* softer grey-blue for body text readability */
  opacity: 0.9;
}

.doc-content pre {
  background: #141a24;
  border: 1px solid #1f2530;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.875rem;
}
.doc-content pre code { color: #f59e0b; }

.doc-content code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  background: #141a24;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: #f59e0b;
}
.doc-content pre code { background: none; padding: 0; }

.doc-content img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid #1f2530;
}

/* Selection highlight */
::selection { background: #f59e0b; color: #0b0f17; }

/* Scrollbar (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0f17; }
::-webkit-scrollbar-thumb { background: #1f2530; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  .sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #1f2530;
    padding-right: 0;
    padding-bottom: 1rem;
  }
}