/*
 * 前后台富文本统一排版。
 * 该文件同时由前台详情页和 TinyMCE 编辑区加载，修改时请保持选择器作用域。
 */
.article-content {
    color: #334155;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.9;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-content *,
.article-content *::before,
.article-content *::after {
    box-sizing: border-box;
}

.article-content > :first-child { margin-top: 0; }
.article-content > :last-child { margin-bottom: 0; }

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

.article-content p:empty {
    min-height: 1em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #0f172a;
    font-weight: 750;
    line-height: 1.35;
    margin: 1.6em 0 .65em;
}

.article-content h1 { font-size: 2em; }
.article-content h2 { font-size: 1.55em; }
.article-content h3 { font-size: 1.3em; }
.article-content h4 { font-size: 1.12em; }
.article-content h5,
.article-content h6 { font-size: 1em; }

.article-content strong,
.article-content b {
    color: #1e293b;
    font-weight: 700;
}

.article-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-color: #bfdbfe;
    text-underline-offset: 3px;
}

.article-content a:hover {
    color: #1d4ed8;
    text-decoration-color: currentColor;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.15em;
    padding-left: 1.65em;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin: .3em 0; }
.article-content li > ul,
.article-content li > ol { margin: .35em 0; }

.article-content blockquote {
    background: #f8fafc;
    border-left: 4px solid #93c5fd;
    color: #475569;
    margin: 1.4em 0;
    padding: .85em 1.15em;
}

.article-content blockquote > :last-child { margin-bottom: 0; }

.article-content code {
    background: #f1f5f9;
    border-radius: .3rem;
    color: #be123c;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .9em;
    padding: .12em .35em;
}

.article-content pre {
    background: #0f172a;
    border-radius: .75rem;
    color: #e2e8f0;
    margin: 1.4em 0;
    overflow-x: auto;
    padding: 1em 1.15em;
    white-space: pre;
}

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

.article-content img {
    border-radius: .65rem;
    display: block;
    height: auto;
    margin: 1.4em auto;
    max-width: 100%;
}

.article-content figure { margin: 1.4em 0; }
.article-content figure img { margin-bottom: .55em; }
.article-content figcaption {
    color: #94a3b8;
    font-size: .875em;
    text-align: center;
}

.article-content table {
    border-collapse: collapse;
    display: block;
    margin: 1.4em 0;
    max-width: 100%;
    overflow-x: auto;
    width: max-content;
}

.article-content th,
.article-content td {
    border: 1px solid #e2e8f0;
    min-width: 6rem;
    padding: .65em .8em;
    text-align: left;
    vertical-align: top;
}

.article-content th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 700;
}

.article-content hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 2em 0;
}

@media (max-width: 768px) {
    .article-content {
        font-size: 15px;
        line-height: 1.8;
    }

    .article-content h1 { font-size: 1.7em; }
    .article-content h2 { font-size: 1.4em; }
}
