.doc-preview {
  color: var(--foreground);
  font-size: 0.938rem;
  line-height: 1.75;
}

/* Headings */
.doc-preview h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.doc-preview h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.doc-preview h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.doc-preview h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.doc-preview > *:first-child {
  margin-top: 0;
}

/* Paragraphs */
.doc-preview p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Links */
.doc-preview a {
  color: var(--color-blue-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-preview a:hover {
  opacity: 0.8;
}

/* Lists */
.doc-preview ul,
.doc-preview ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 1.75rem;
}

.doc-preview ul {
  list-style-type: disc;
}

.doc-preview ol {
  list-style-type: decimal;
}

.doc-preview li {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.doc-preview li > ul,
.doc-preview li > ol {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Inline code */
.doc-preview code {
  font-family:
    'JetBrains Mono', 'Fira Code', Menlo, Monaco, 'Courier New', monospace;
  font-size: 0.85em;
  color: var(--foreground);
  background: var(--muted);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
}

/* Code blocks */
.doc-preview pre {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  color: var(--foreground);
  background: var(--muted);
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

.doc-preview pre code {
  color: inherit;
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Blockquotes */
.doc-preview blockquote {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted-foreground);
  font-style: italic;
}

.doc-preview blockquote p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Tables */
.doc-preview table {
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.doc-preview th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
  background: var(--muted);
  border: 1px solid var(--border);
}

.doc-preview td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
}

.doc-preview tr:hover td {
  background: var(--accent);
}

/* Horizontal rules */
.doc-preview hr {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border: none;
  border-top: 1px solid var(--border);
}

/* Images */
.doc-preview img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Strong / emphasis */
.doc-preview strong {
  font-weight: 600;
}

.doc-preview em {
  font-style: italic;
}
