/*
 * Typography — Confab
 * Controls all rendered markdown styling.
 * Tune via the settings panel or edit this file directly.
 */

:root {
  --prose-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --prose-font-size: 15px;
  --prose-line-height: 1.75;
  --prose-color: #1c1917;
  --prose-heading-weight: 600;
  --prose-heading-letter-spacing: -0.02em;
  --prose-heading-scale: 1;
  --prose-heading-margin-top: 2em;
  --prose-heading-color: #0c0a09;
  --prose-paragraph-spacing: 1.15em;
  --prose-list-indent: 1.5em;
  --prose-list-item-spacing: 0.35em;
  --prose-code-font-size: 0.875em;
  --prose-code-block-radius: 8px;
  --prose-link-color: #44403c;
  --prose-link-underline-color: #d6d3d1;
  --prose-blockquote-border-color: #d6d3d1;
  --prose-blockquote-text-color: #57534e;
  --prose-content-width: 720px;
}

.prose {
  font-family: var(--prose-font-family);
  font-size: var(--prose-font-size);
  line-height: var(--prose-line-height);
  color: var(--prose-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Headings --- */

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-weight: var(--prose-heading-weight);
  letter-spacing: var(--prose-heading-letter-spacing);
  color: var(--prose-heading-color);
  margin-top: var(--prose-heading-margin-top);
  margin-bottom: 0.6em;
  line-height: 1.3;
}

.prose h1:first-child,
.prose h2:first-child,
.prose h3:first-child,
.prose h4:first-child {
  margin-top: 0;
}

.prose h1 { font-size: calc(1.5em * var(--prose-heading-scale)); }
.prose h2 { font-size: calc(1.25em * var(--prose-heading-scale)); }
.prose h3 { font-size: calc(1.1em * var(--prose-heading-scale)); }
.prose h4 { font-size: calc(1em * var(--prose-heading-scale)); font-weight: 500; }

/* --- Paragraphs --- */

.prose p {
  margin: 0 0 var(--prose-paragraph-spacing);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* --- Lists --- */

.prose ul,
.prose ol {
  margin: 0 0 var(--prose-paragraph-spacing);
  padding-left: var(--prose-list-indent);
}

.prose li {
  margin-bottom: var(--prose-list-item-spacing);
  line-height: 1.65;
}

.prose li:last-child {
  margin-bottom: 0;
}

.prose li > ul,
.prose li > ol {
  margin-top: var(--prose-list-item-spacing);
  margin-bottom: 0;
}

.prose ul { list-style-type: disc; }
.prose ul ul { list-style-type: circle; }
.prose ol { list-style-type: decimal; }

/* --- Emphasis --- */

.prose strong {
  font-weight: 600;
  color: var(--prose-heading-color);
}

.prose em {
  font-style: italic;
}

/* --- Links --- */

.prose a {
  color: var(--prose-link-color);
  text-decoration: underline;
  text-decoration-color: var(--prose-link-underline-color);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.prose a:hover {
  text-decoration-color: var(--prose-link-color);
}

/* --- Blockquotes --- */

.prose blockquote {
  margin: 1.2em 0;
  padding: 0 0 0 1.25em;
  border-left: 2px solid var(--prose-blockquote-border-color);
  color: var(--prose-blockquote-text-color);
  font-style: italic;
}

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

/* --- Code --- */

.prose code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: var(--prose-code-font-size);
  background: #f5f5f4;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: #1c1917;
}

.prose pre {
  margin: 1.2em 0;
  padding: 1em 1.25em;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  border-radius: var(--prose-code-block-radius);
  overflow-x: auto;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.85em;
}

/* --- Horizontal rules --- */

.prose hr {
  border: none;
  border-top: 1px solid #e7e5e4;
  margin: 2em 0;
}

/* --- Tables --- */

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.925em;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.6em 1em;
  border-bottom: 1px solid #e7e5e4;
}

.prose th {
  font-weight: 600;
  color: var(--prose-heading-color);
  border-bottom-width: 2px;
}

.prose tr:last-child td {
  border-bottom: none;
}

/* --- Images --- */

.prose img {
  max-width: 100%;
  border-radius: 8px;
}
