/* ============================================================
   GRIDer Docs — dark theme, in tune with grider.xyz
   Palette: bg #070708 · text #fafafa · muted #a3a3a3
            border #1f1f23 · accent emerald #34d399 · Inter
   ============================================================ */

:root {
  --g-bg: #070708;
  --g-surface: #0d0d10;
  --g-surface-2: #151519;
  --g-text: #fafafa;
  --g-text-soft: #d4d4d4;
  --g-muted: #9aa0a6;
  --g-faint: #6b7280;
  --g-border: #1f1f23;
  --g-accent: #34d399;
  --g-accent-soft: rgba(52, 211, 153, 0.12);
}

/* ---- base surfaces ---- */
html, body,
.book,
.book.font-family-1 {
  background: var(--g-bg);
  color: var(--g-text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.book-body,
.book-body .body-inner {
  background: var(--g-bg);
  color: var(--g-text);
}

/* ---- sidebar ---- */
.book-summary {
  background: var(--g-surface);
  color: var(--g-muted);
  border-right: 1px solid var(--g-border);
}
.book-summary ul.summary li a,
.book-summary ul.summary li span {
  color: var(--g-muted);
}
.book-summary ul.summary li a:hover {
  color: var(--g-text);
  background: var(--g-surface-2);
}
.book-summary ul.summary li.active > a {
  color: var(--g-accent);
  background: var(--g-accent-soft);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--g-accent);
}
.book-summary ul.summary li.header {
  color: var(--g-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  font-weight: 600;
  margin-top: 18px;
}
.book-summary ul.summary li.divider {
  background: var(--g-border);
}

/* language toggle (book.json links.sidebar) */
.book-summary .summary > li:first-child .custom-link,
.book-summary .book-langs-toggle {
  color: var(--g-accent);
}

/* ---- search box ---- */
#book-search-input {
  background: var(--g-surface-2);
  border-bottom: 1px solid var(--g-border);
  box-shadow: none;
}
#book-search-input input,
#book-search-input input:focus {
  color: var(--g-text);
}
#book-search-input input::placeholder { color: var(--g-faint); }
#book-search-results,
#book-search-results .search-results {
  background: var(--g-bg);
  color: var(--g-text-soft);
}
#book-search-results .search-results .search-results-title {
  color: var(--g-text);
  opacity: 1;
  letter-spacing: 0;
}
#book-search-results .search-results .search-results-count,
#book-search-results .search-results .search-query {
  color: var(--g-accent);
}
#book-search-results .search-results .has-results .search-results-item {
  color: var(--g-text-soft);
  border-bottom: 1px solid var(--g-border);
}
#book-search-results .search-results .has-results .search-results-item h3,
#book-search-results .search-results .has-results .search-results-item h3 a {
  color: var(--g-accent);
}
#book-search-results .search-results .has-results .search-results-item p,
#book-search-results .search-results .no-results {
  color: var(--g-text-soft);
  opacity: 1;
}
#book-search-results .search-results .has-results .search-results-item a {
  color: var(--g-accent);
}

/* ---- top header bar ---- */
.book-header {
  background: transparent;
  color: var(--g-muted);
  border-bottom: 1px solid var(--g-border);
  box-shadow: none;
}
.book-header h1 a,
.book-header h1 a:hover { color: var(--g-muted); }
.book-header .btn { color: var(--g-muted); }
.book-header .btn:hover { color: var(--g-text); }

/* ---- content typography ---- */
.page-inner { max-width: 860px; }
.markdown-section { color: var(--g-text-soft); }
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5 { color: #ffffff; font-weight: 700; }
.markdown-section h1,
.markdown-section h2 {
  border-bottom: 1px solid var(--g-border);
  padding-bottom: 0.3em;
}
.markdown-section p,
.markdown-section li { color: var(--g-text-soft); }
.markdown-section strong { color: #ffffff; }
.markdown-section a { color: var(--g-accent); text-decoration: none; }
.markdown-section a:hover { text-decoration: underline; }
.markdown-section hr { background: var(--g-border); height: 1px; border: 0; }

/* ---- tables ---- */
.markdown-section table { border-collapse: collapse; }
.markdown-section table th,
.markdown-section table td { border: 1px solid var(--g-border); }
.markdown-section table th {
  background: var(--g-surface-2);
  color: #ffffff;
}
.markdown-section table tr {
  background: transparent;
  color: var(--g-text-soft);
  border-top: 1px solid var(--g-border);
}
.markdown-section table tr:nth-child(2n) { background: var(--g-surface); }

/* ---- code ---- */
.markdown-section code {
  background: var(--g-surface-2);
  color: #e5e7eb;
  border: 1px solid var(--g-border);
  border-radius: 4px;
  padding: 0.12em 0.4em;
}
.markdown-section pre {
  background: var(--g-surface-2);
  border: 1px solid var(--g-border);
  border-radius: 8px;
}
.markdown-section pre,
.markdown-section pre code { color: #e5e7eb; }
.markdown-section pre code { background: transparent; border: 0; padding: 0; }

/* ---- blockquotes / callouts (📸, 🚧, notices) ---- */
.markdown-section blockquote {
  background: var(--g-surface);
  border-left: 3px solid var(--g-accent);
  color: #cbd5e1;
  border-radius: 0 6px 6px 0;
}

/* ---- prev / next navigation ---- */
.book .book-body .navigation { color: var(--g-faint); }
.book .book-body .navigation:hover { color: var(--g-accent); }

/* ---- Honkit theme footer ---- */
.gitbook-link {
  display: none !important;
}

/* ---- scrollbar (webkit) ---- */
.book-summary::-webkit-scrollbar { width: 8px; }
.book-summary::-webkit-scrollbar-thumb { background: var(--g-border); border-radius: 8px; }
.book-summary::-webkit-scrollbar-track { background: transparent; }
