/* Site-specific reading styles. Keep the theme submodule unchanged. */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.container {
  width: calc(100% - 48px);
  max-width: 920px;
}

/* Leave room for the theme's desktop table of contents. */
@media (min-width: 889px) {
  .container.post-details {
    width: calc(60% - 64px);
  }
}

.markdown-body {
  font-size: 16px;
  line-height: 1.75;
}

.markdown-body h1 {
  font-size: 1.75em;
}

.markdown-body h2 {
  font-size: 1.375em;
}

.markdown-body h3 {
  font-size: 1.125em;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 1.6em;
  margin-bottom: 0.65em;
  line-height: 1.4;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote {
  margin-bottom: 1em;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.6em;
}

.markdown-body li + li {
  margin-top: 0.3em;
}

.markdown-body img {
  max-width: min(100%, 640px);
  max-height: 480px;
  width: auto;
  height: auto;
}

.markdown-body > table {
  font-size: 0.95em;
  line-height: 1.6;
}

.markdown-body > table th,
.markdown-body > table td {
  border-width: 1px;
}

/* Keep source and output aligned; scroll long lines instead of wrapping. */
.markdown-body code,
.markdown-body pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.markdown-body code {
  font-size: 0.9em;
}

.markdown-body .highlight {
  overflow-x: auto;
}

.markdown-body .highlight table {
  display: table;
  width: 100%;
  margin: 0;
  overflow: visible;
}

.markdown-body .highlight pre,
.markdown-body pre {
  font-size: 14px;
  line-height: 1.65;
  white-space: pre;
}

.markdown-body .highlight pre {
  overflow: visible;
}

.markdown-body .highlight .gutter {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  opacity: 0.6;
}

.markdown-body .highlight .gutter pre {
  padding-right: 8px;
  padding-left: 8px;
  background: transparent;
}

.markdown-body .highlight tr {
  background: transparent;
}

@media (max-width: 768px) {
  .container {
    width: calc(100% - 32px);
  }
}

@media (max-width: 888px) {
  .post-catalog {
    max-width: calc(100vw - 32px);
    background-color: var(--bg-body);
  }
}

.comments-note {
  margin: 2em 0 1em;
  color: var(--color-text-a);
  font-size: 14px;
  line-height: 1.6;
}

.comments-note a {
  color: inherit;
  text-decoration: underline;
}

/* Do not show incomplete counter labels while loading or when blocked. */
.footer-views:has(span:empty) {
  display: none;
}

.footer-views span {
  margin: 0 0.3em;
}
