/* ── Base ── */
body {
  background: #0d1117 !important;
  color: #e6edf3 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
}

/* ── Sidebar ── */
.sidebar {
  background: #161b22 !important;
  border-right: 1px solid #30363d !important;
}

.sidebar-nav a {
  color: #e6edf3 !important;
  font-size: 0.9rem !important;
}

.sidebar-nav a:hover {
  color: #58a6ff !important;
  text-decoration: none !important;
}

.sidebar-nav li.active > a,
.sidebar-nav a.active {
  color: #58a6ff !important;
  font-weight: 600;
  border-right: 2px solid #58a6ff;
}

.sidebar ul li::before {
  display: none !important;
}

/* ── Main content area ── */
.content {
  background: #0d1117 !important;
}

.markdown-section {
  color: #e6edf3 !important;
  max-width: none !important;
  padding-left: 4rem !important;
  padding-right: 2rem !important;
}

/* ── Headings ── */
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: #e6edf3 !important;
  border-bottom: 1px solid #30363d !important;
  padding-bottom: 0.4rem !important;
  margin-top: 2rem !important;
  margin-bottom: 1.2rem !important;
}

.markdown-section h1 { font-size: 1.8rem !important; }
.markdown-section h2 { font-size: 1.4rem !important; }
.markdown-section h3 { font-size: 1.15rem !important; }

/* Code badge inside headings (e.g. ## `logging`) */
.markdown-section h1 > code,
.markdown-section h2 > code,
.markdown-section h3 > code {
  background: rgba(88, 166, 255, 0.1) !important;
  border: 1px solid rgba(88, 166, 255, 0.3) !important;
  border-radius: 6px !important;
  padding: 2px 10px !important;
  font-size: 0.85em !important;
  color: #58a6ff !important;
}

/* ── Inline code ── */
.markdown-section code {
  background: #1c2128 !important;
  border: 1px solid #30363d !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-size: 0.85em !important;
  color: #e6edf3 !important;
}

/* ── Code blocks ── */
.markdown-section pre {
  background: #1c2128 !important;
  border: 1px solid #30363d !important;
  border-radius: 8px !important;
}

.markdown-section pre code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: #e6edf3 !important;
}

/* ── Tables ── */
.markdown-section table {
  border-collapse: collapse !important;
  width: 100% !important;
  border: 1px solid #30363d !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  margin-bottom: 1.5rem !important;
  background: #0d1117 !important;
}

.markdown-section table th {
  background: #161b22 !important;
  color: #8b949e !important;
  font-weight: 600 !important;
  padding: 10px 14px !important;
  border: none !important;
  border-bottom: 1px solid #30363d !important;
  text-align: left !important;
}

.markdown-section table td {
  padding: 10px 14px !important;
  border: none !important;
  border-bottom: 1px solid #21262d !important;
  color: #e6edf3 !important;
  vertical-align: middle !important;
  background: #0d1117 !important;
}

.markdown-section table tr:last-child td {
  border-bottom: none !important;
}

.markdown-section table tr,
.markdown-section table tr:nth-child(even),
.markdown-section table tr:nth-child(odd) {
  background: transparent !important;
}

.markdown-section table tr:hover td {
  background: rgba(88, 166, 255, 0.06) !important;
}

/* Inline code inside table cells */
.markdown-section table td code {
  background: #21262d !important;
  border: 1px solid #30363d !important;
  border-radius: 3px !important;
  padding: 1px 5px !important;
  font-size: 0.82em !important;
  color: #e6edf3 !important;
}

/* Field name column — blue tint */
.markdown-section table td:first-child code {
  background: rgba(88, 166, 255, 0.1) !important;
  border-color: rgba(88, 166, 255, 0.25) !important;
  color: #79c0ff !important;
}

/* ── Links ── */
.markdown-section a {
  color: #58a6ff !important;
}

.markdown-section a:hover {
  text-decoration: underline !important;
}

/* ── Horizontal rule ── */
.markdown-section hr {
  border-color: #30363d !important;
  margin: 2rem 0 !important;
}

/* ── Blockquote ── */
.markdown-section blockquote {
  border-left: 3px solid #30363d !important;
  color: #8b949e !important;
  background: #161b22 !important;
  margin: 1rem 0 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0 6px 6px 0 !important;
}

/* ── Search ── */
.search input {
  background: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 6px !important;
  color: #e6edf3 !important;
  outline: none !important;
}

.search input:focus {
  border-color: #58a6ff !important;
}

/* ── Navbar / repo link ── */
.github-corner svg {
  fill: #58a6ff !important;
  color: #0d1117 !important;
}

/* ── App name in sidebar ── */
.app-name a {
  color: #e6edf3 !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
}
