/*
 * Shared article typography for the public post and the editor preview.
 * Keep presentation rules here so both surfaces remain visually consistent.
 */
.article-content {
  --article-text: #20242a;
  --article-muted: #858b93;
  --article-line: #e7e9ed;
  --article-soft: #f0f2f5;
  --article-accent: #188c8c;
  color: color-mix(in srgb, var(--article-text) 88%, var(--article-muted));
  font-size: 17px;
  line-height: 1.88;
  overflow-wrap: anywhere;
}

[data-color-scheme="dark"] .article-content {
  --article-text: #eff3f6;
  --article-muted: #a0a8b0;
  --article-line: #2b3137;
  --article-soft: #20252a;
  --article-accent: #4fb8b4;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--article-text);
  line-height: 1.35;
  font-weight: 650;
}

.article-content h1 {
  margin: 1.6em 0 0.6em;
  font-size: clamp(19px, 1.9vw, 22px);
}

.article-content h2 {
  margin: 1.4em 0 0.5em;
  font-size: clamp(17px, 1.7vw, 19px);
}

.article-content h3 {
  margin: 1.2em 0 0.4em;
  font-size: clamp(15px, 1.5vw, 17px);
}

.article-content h4 {
  margin: 1.1em 0 0.3em;
  font-size: 15px;
}

.article-content hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--article-line);
}

.article-content p {
  margin: 0 0 1.1em;
}

.article-content ul,
.article-content ol {
  padding-left: 1.3em;
}

.article-content blockquote {
  margin-left: 0;
  border-left: 3px solid var(--article-accent);
  padding-left: 12px;
  color: var(--article-muted);
}

.article-content code {
  border-radius: 5px;
  padding: 2px 5px;
  background: var(--article-soft);
  color: inherit;
}

.article-content pre {
  overflow: auto;
  border-radius: 8px;
  padding: 16px;
  background: var(--article-soft);
  color: inherit;
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  border: 1px solid var(--article-line);
  padding: 8px;
}

.article-content img,
.article-content video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 16px 0 22px;
  border-radius: 8px;
  background: var(--article-soft);
}

.article-content iframe {
  display: block;
  max-width: 100%;
  margin: 16px 0 22px;
  border-radius: 8px;
  background: var(--article-soft);
}

.article-content .MathJax,
.article-content mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}
