/* Code block styling - server-side highlighted */
pre.hljs.code-block {
  display: block;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  background: #0d1117;
  border-radius: 6px;
  border: 1px solid #30363d;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

pre.hljs.code-block code {
  display: block;
  background: transparent;
  padding: 0;
  margin: 0;
  border: none;
  color: #e6edf3;
  white-space: pre;
}

/* Inline single-line code */
.text-content p > code:not(.language-bash),
.region--content p > code:not(.language-bash) {
  display: inline;
  padding: 0.125rem 0.375rem;
  background: #f0f0f0;
  color: #1a1a1a;
  border-radius: 3px;
  font-size: 0.875em;
  border: none;
  white-space: nowrap;
}

/* Tighten margins: reduce gap between code blocks and following paragraphs */
pre.hljs.code-block + p {
  margin-block-start: 0;
}

/* Reduce bottom margin on code blocks */
pre.hljs.code-block {
  margin-block-end: 0.25rem;
}

/* Paragraph spacing: tighter default, but add space before section headings */
.text-content p {
  margin-block: 0.5rem;
}

/* Add top margin to paragraphs that start a new section (contain <strong> heading) */
.text-content p:has(strong:first-child),
.region--content p:has(strong:first-child) {
  margin-block-start: 1.5rem;
}

/* Syntax highlight colors (GitHub Dark theme) */
.hljs-comment { color: #8b949e; font-style: italic; }
.hljs-keyword { color: #ff7b72; }
.hljs-built_in { color: #ffa657; font-weight: bold; }
.hljs-string { color: #a5d6ff; }
.hljs-variable { color: #79c0ff; }
.hljs-attr { color: #79c0ff; }
.hljs-number { color: #79c0ff; }
.hljs-title { color: #d2a8ff; }
.hljs-params { color: #e6edf3; }
.hljs-section { color: #ffa657; }
.hljs-meta { color: #8b949e; }
