:root {
    color: #1f2937;
    background: #f6f7f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #f6f7f9;
}

body {
    min-height: 100vh;
    margin: 0;
}

.article-page {
    width: min(100% - 32px, 860px);
    margin: 0 auto;
    padding: 56px 0 80px;
}

.article {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.article-header {
    padding: 48px 56px 34px;
}

.article-header h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 720;
    line-height: 1.24;
    letter-spacing: -0.025em;
}

.article-subtitle {
    margin: 18px 0 0;
    color: #6b7280;
    font-size: 17px;
    line-height: 1.75;
}

.article-cover {
    margin: 0;
    background: #eef1f5;
}

.article-cover img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.article-content {
    padding: 42px 56px 58px;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
    white-space: pre-wrap;
    tab-size: 4;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

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

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

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    margin: 1.8em 0 0.7em;
    color: #111827;
    line-height: 1.4;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
    margin: 1.15em 0;
}

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

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li + li {
    margin-top: 0.45em;
}

.article-content strong,
.article-content b {
    font-weight: 700;
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content u {
    text-decoration: underline;
}

.article-content s,
.article-content del {
    text-decoration: line-through;
}

.article-content mark {
    padding: 0.08em 0.2em;
    background: #fef08a;
}

.article-content img,
.article-content video {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.6em auto;
    border-radius: 10px;
}

.article-content iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 420px;
    margin: 1.6em auto;
    border: 0;
}

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

.article-content blockquote {
    padding: 4px 0 4px 20px;
    color: #5b6472;
    border-left: 4px solid #dbe2ea;
}

.article-content pre {
    max-width: 100%;
    padding: 18px 20px;
    overflow-x: auto;
    color: #e5e7eb;
    background: #111827;
    border-radius: 10px;
    white-space: pre;
}

.article-content code {
    padding: 0.12em 0.35em;
    color: #be123c;
    background: #f3f4f6;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

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

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

.article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 10px 14px;
    border: 1px solid #dfe4ea;
}

.article-empty {
    padding: 96px 32px;
    text-align: center;
}

.article-empty-code {
    margin: 0 0 12px;
    color: #c9ced6;
    font-size: 64px;
    font-weight: 760;
    line-height: 1;
}

.article-empty h1 {
    margin: 0;
    color: #202733;
    font-size: 28px;
}

.article-empty p:last-child {
    margin: 14px 0 0;
    color: #7b8491;
}

@media (max-width: 640px) {
    .article-page {
        width: 100%;
        padding: 0;
    }

    .article {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .article-header {
        padding: 32px 22px 24px;
    }

    .article-header h1 {
        font-size: 30px;
    }

    .article-subtitle {
        font-size: 15px;
    }

    .article-content {
        padding: 30px 22px 48px;
        font-size: 16px;
    }

    .article-content iframe {
        min-height: 220px;
    }
}
