:root {
    --pg-text: #1d2129;
    --pg-body: #2b2f36;
    --pg-muted: #86909c;
    --pg-line: #e5e6eb;
    --pg-accent: #165dff;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.pg-page {
    margin: 0;
    color: var(--pg-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pg-main {
    width: 100%;
    max-width: 860px;
    padding: 40px 24px 64px;
    margin: 0 auto;
}

.pg-content {
    color: var(--pg-body);
    font-size: 16.5px;
    line-height: 1.9;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

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

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

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

.pg-content h1,
.pg-content h2,
.pg-content h3,
.pg-content h4,
.pg-content h5,
.pg-content h6 {
    margin: 2em 0 0.7em;
    color: var(--pg-text);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.pg-content h1 {
    font-size: 1.7em;
}

.pg-content h2 {
    font-size: 1.5em;
}

.pg-content h3 {
    font-size: 1.26em;
}

.pg-content h4 {
    font-size: 1.1em;
}

.pg-content h5,
.pg-content h6 {
    font-size: 1em;
}

.pg-content a {
    color: var(--pg-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(22, 93, 255, 0.25);
}

.pg-content a:hover {
    border-bottom-color: var(--pg-accent);
}

.pg-content a:focus-visible {
    outline: 2px solid var(--pg-accent);
    outline-offset: 3px;
    border-radius: 3px;
}

.pg-content strong,
.pg-content b {
    font-weight: 600;
}

.pg-content ul,
.pg-content ol {
    padding-left: 1.5em;
    margin: 0 0 1.2em;
}

.pg-content li {
    margin: 0.35em 0;
}

.pg-content li > ul,
.pg-content li > ol {
    margin: 0.35em 0;
}

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

.pg-content blockquote {
    padding: 14px 20px;
    margin: 1.6em 0;
    color: #4e5969;
    background: #f7f9fc;
    border-left: 3px solid #c9d4e5;
    border-radius: 0 10px 10px 0;
}

.pg-content blockquote p:last-child {
    margin-bottom: 0;
}

.pg-content code {
    padding: 0.15em 0.4em;
    font-family: Menlo, Consolas, "SFMono-Regular", monospace;
    font-size: 0.88em;
    background: #f2f3f5;
    border-radius: 5px;
}

.pg-content pre {
    padding: 18px 20px;
    margin: 1.6em 0;
    overflow: auto;
    color: #e6edf3;
    font-family: Menlo, Consolas, "SFMono-Regular", monospace;
    font-size: 14px;
    line-height: 1.65;
    background: #1e2430;
    border-radius: 12px;
}

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

.pg-content table {
    width: 100%;
    margin: 1.6em 0;
    font-size: 15px;
    border-collapse: collapse;
}

.pg-content th,
.pg-content td {
    padding: 10px 12px;
    border: 1px solid var(--pg-line);
}

.pg-content th {
    font-weight: 600;
    text-align: left;
    background: #f7f8fa;
}

.pg-content tr:nth-child(even) td {
    background: #fbfcfd;
}

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

.pg-content figure {
    margin: 1.6em 0;
}

.pg-content figcaption {
    margin-top: 0.6em;
    color: var(--pg-muted);
    font-size: 13px;
    text-align: center;
}

.pg-content video,
.pg-content iframe,
.pg-content embed,
.pg-content object {
    max-width: 100%;
}

.pg-content iframe {
    display: block;
    margin: 1.6em auto;
    border: 0;
    border-radius: 12px;
}

.pg-content-empty {
    padding: 24px 0;
    color: var(--pg-muted);
}

.pg-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--pg-muted);
    text-align: center;
}

.pg-not-found-code {
    margin: 0;
    color: #e5e6eb;
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.pg-not-found p:last-child {
    margin: 12px 0 0;
    font-size: 14px;
}

@media (max-width: 720px) {
    .pg-main {
        padding: 24px 16px 40px;
    }

    .pg-content {
        font-size: 16px;
        line-height: 1.85;
    }

    .pg-content img {
        border-radius: 8px;
    }

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

    .pg-not-found-code {
        font-size: 52px;
    }
}

@media print {
    body.pg-page {
        background: #fff;
    }

    .pg-main {
        max-width: none;
        padding: 0;
    }
}
