/* Markdown Body Styles */
.markdown-body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  word-wrap: break-word;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.markdown-body h1 {
  font-size: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}

.markdown-body h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border-light);
}

.markdown-body h3 { font-size: 1.25em; }
.markdown-body h4 { font-size: 1em; }
.markdown-body h5 { font-size: 0.875em; }
.markdown-body h6 { font-size: 0.85em; color: var(--text-secondary); }

.markdown-body p {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-body a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.markdown-body a:hover { text-decoration: underline; }
.markdown-body strong { font-weight: 600; }

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 8px 0;
}

.markdown-body hr {
  height: 2px;
  background: var(--border);
  border: none;
  margin: 24px 0;
  border-radius: 1px;
}

.markdown-body blockquote {
  margin: 0 0 16px 0;
  padding: 4px 16px;
  border-left: 4px solid var(--primary);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.markdown-body blockquote p:last-child { margin-bottom: 0; }

.markdown-body ul, .markdown-body ol {
  margin-top: 0;
  margin-bottom: 16px;
  padding-left: 2em;
}

.markdown-body li { margin-top: 4px; }
.markdown-body li + li { margin-top: 4px; }

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: #e83e8c;
}

:root.dark .markdown-body code { color: #f48fb1; }

.markdown-body pre {
  margin-top: 0;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--border-light);
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.markdown-body table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
  overflow-x: auto;
  display: block;
}

.markdown-body table th, .markdown-body table td {
  padding: 8px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.markdown-body table th {
  font-weight: 600;
  background: var(--bg-secondary);
}

.markdown-body table tr:nth-child(even) { background: var(--bg-secondary); }

.markdown-body input[type="checkbox"] {
  margin-right: 6px;
  accent-color: var(--primary);
}
