.theme-article-body,
.theme-main-post-body {
    color: var(--color-text-medium);
    font-size: 1.2rem;
    line-height: 1.55;
}

.theme-article-body > *:first-child,
.theme-main-post-body > *:first-child {
    margin-top: 0;
}

.theme-article-body > *:last-child,
.theme-main-post-body > *:last-child {
    margin-bottom: 0;
}

.theme-article-body p,
.theme-article-body ul,
.theme-article-body ol,
.theme-article-body blockquote,
.theme-article-body pre,
.theme-article-body hr,
.theme-main-post-body p,
.theme-main-post-body ul,
.theme-main-post-body ol,
.theme-main-post-body blockquote,
.theme-main-post-body pre,
.theme-main-post-body hr {
    margin: 0 0 1.45rem;
}

.theme-article-body li + li,
.theme-main-post-body li + li {
    margin-top: 0.45rem;
}

.theme-article-body li > p,
.theme-article-body li > ul,
.theme-article-body li > ol,
.theme-main-post-body li > p,
.theme-main-post-body li > ul,
.theme-main-post-body li > ol {
    margin-bottom: 0.85rem;
}

.theme-article-body strong,
.theme-main-post-body strong {
    color: var(--color-text-medium);
    font-weight: 700;
}

.theme-article-body em,
.theme-main-post-body em {
    color: var(--color-text-highlight);
    font-style: italic;
}

.theme-article-body a,
.theme-main-post-body a {
    color: var(--color-link);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.14em;
    transition:
        color 0.18s ease,
        text-decoration-color 0.18s ease;
}

.theme-article-body a:hover,
.theme-article-body a:focus-visible,
.theme-main-post-body a:hover,
.theme-main-post-body a:focus-visible {
    color: var(--color-primary);
    text-decoration-color: var(--color-primary);
}

.theme-article-body h2,
.theme-article-body h3,
.theme-article-body h4,
.theme-main-post-body h2,
.theme-main-post-body h3,
.theme-main-post-body h4 {
    margin: 2.1rem 0 0.85rem;
    color: var(--color-text-dark);
    line-height: 1.18;
    text-wrap: balance;
}

.theme-article-body h2,
.theme-main-post-body h2 {
    font-size: 1.7em;
    letter-spacing: -0.02em;
}

.theme-article-body h3,
.theme-main-post-body h3 {
    font-size: 1.36em;
    letter-spacing: -0.015em;
}

.theme-article-body h4,
.theme-main-post-body h4 {
    font-size: 1.12em;
}

.theme-article-body ul,
.theme-article-body ol,
.theme-main-post-body ul,
.theme-main-post-body ol {
    padding-left: 1.55rem;
}

.theme-article-body ul,
.theme-main-post-body ul {
    list-style: disc;
}

.theme-article-body ol,
.theme-main-post-body ol {
    list-style: decimal;
}

.theme-article-body li::marker,
.theme-main-post-body li::marker {
    color: var(--color-primary);
}

.theme-article-body blockquote,
.theme-main-post-body blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 0.15rem 0 0.15rem 1.3rem;
    border-left: solid 3px var(--color-border-dark);
    color: var(--color-text-highlight);
    font-style: italic;
}

.theme-article-body blockquote > *:last-child,
.theme-main-post-body blockquote > *:last-child {
    margin-bottom: 0;
}

.theme-article-body blockquote p,
.theme-article-body blockquote ul,
.theme-article-body blockquote ol,
.theme-main-post-body blockquote p,
.theme-main-post-body blockquote ul,
.theme-main-post-body blockquote ol {
    margin-bottom: 0.9rem;
}

.theme-article-body blockquote cite,
.theme-main-post-body blockquote cite {
    display: block;
    margin-top: 0.85rem;
    color: var(--color-text-medium);
    font-size: 0.85em;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-article-body hr,
.theme-main-post-body hr {
    border: 0;
    border-top: solid 1px var(--color-border-medium);
}

.theme-article-body code,
.theme-article-body pre,
.theme-article-body pre code,
.theme-main-post-body code,
.theme-main-post-body pre,
.theme-main-post-body pre code {
    font-family:
        "SFMono-Regular", SFMono-Regular, Consolas, "Liberation Mono", Menlo,
        monospace;
}

.theme-article-body :not(pre) > code,
.theme-main-post-body :not(pre) > code {
    display: inline-block;
    border-radius: 0.35rem;
    background: var(--color-text-dark);
    color: var(--color-white);
    padding: 0.24rem 0.4rem;
    font-size: 0.88em;
    line-height: 1;
    vertical-align: middle;
}

.theme-article-body pre,
.theme-main-post-body pre {
    overflow-x: auto;
    margin: 1.9rem 0 2rem;
    padding: 1.15rem 1.25rem;
    border: solid 1px var(--color-border-dark);
    border-radius: 0.5rem;
    background: var(--color-text-dark);
    box-shadow: 0 10px 24px -22px var(--color-shadow-card);
}

.theme-article-body pre code,
.theme-main-post-body pre code {
    display: block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: var(--color-white);
    font-size: 0.9em;
    line-height: 1.75;
    white-space: pre;
}

.theme-article-body img,
.theme-main-post-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

@media screen and (max-width: 980px) {
    .theme-article-body,
    .theme-main-post-body {
        font-size: 1.08rem;
        line-height: 1.8;
    }

    .theme-article-body h2,
    .theme-main-post-body h2 {
        font-size: 1.5em;
    }

    .theme-article-body h3,
    .theme-main-post-body h3 {
        font-size: 1.25em;
    }
}
