.document-page { background: #f7f9fc; }
.document-container, .page-heading-inner { width: min(100%, 1240px); padding-right: 32px; padding-left: 32px; margin: 0 auto; }
.page-heading { padding: 31px 0 43px; border-bottom: 1px solid #e7edf6; background: radial-gradient(ellipse at 86% 45%, #e7e7ff 0, transparent 56%), radial-gradient(ellipse at 35% 100%, #dfedff 0, transparent 65%), #f6f9ff; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 27px; padding: 0; list-style: none; color: #7a899e; font-size: 13px; line-height: 1.7; }
.breadcrumbs li + li::before { content: "/"; padding-right: 9px; color: #abb7c8; }
.breadcrumbs a:hover { color: #398edb; }
.page-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.page-heading-copy { min-width: 0; }
.page-heading h1 { margin: 0; color: #24354e; font-size: clamp(28px, 3vw, 38px); font-weight: 650; line-height: 1.45; letter-spacing: -.02em; overflow-wrap: anywhere; }
.page-subtitle { margin: 13px 0 0; color: #718099; font-size: 16px; line-height: 1.85; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 23px; margin: 18px 0 0; color: #7a889d; font-size: 13px; line-height: 1.6; }
.page-heading-actions { display: flex; flex-wrap: wrap; flex-shrink: 0; align-items: center; gap: 16px; }
.compact-button { min-width: 128px; min-height: 44px; padding: 0 18px; gap: 14px; border-radius: 10px; font-size: 14px; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: #7a899e; font-size: 13px; cursor: pointer; }
.text-button:hover { color: #398edb; }
.article-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 40px; padding-bottom: 64px; }
.tutorial-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 28px 30px 24px; border: 1px solid #e6ecf5; border-radius: 16px; background: #fff; transition: box-shadow .2s, border-color .2s, transform .2s; }
.tutorial-card:hover { transform: translateY(-3px); border-color: #c8def7; box-shadow: 0 12px 30px #406ca010; }
.tutorial-card-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #97a3b4; font-size: 12px; }
.tutorial-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #edf5ff; color: #5b9bde; }
.tutorial-icon svg { width: 23px; height: 23px; }
.tutorial-card:nth-child(3n + 2) .tutorial-icon { background: #f0edff; color: #9384d9; }
.tutorial-card:nth-child(3n) .tutorial-icon { background: #eaf8f6; color: #58aaa1; }
.tutorial-card h2 { margin: 21px 0 10px; color: #2c3c54; font-size: 20px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.tutorial-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.tutorial-card p { margin: 0; color: #7a879a; font-size: 14px; line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tutorial-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 25px; color: #95a1b2; font-size: 12px; }
.tutorial-read { color: #5993d1; font-size: 13px; }
.tutorial-read span { margin-left: 10px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 264px; align-items: start; gap: 28px; padding-top: 36px; padding-bottom: 64px; }
.article-card, .sidebar-card, .login-card, .editor-card { border: 1px solid #e6ecf5; border-radius: 16px; background: #fff; }
.article-card { min-width: 0; padding: 35px 40px 28px; }
.article-prose { color: #46556b; font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.article-prose > :first-child { margin-top: 0; }
.article-prose > :last-child { margin-bottom: 0; }
.article-prose p { margin: 16px 0; }
.article-prose h2, .article-prose h3, .article-prose h4, .article-prose h5, .article-prose h6 { color: #283b56; font-weight: 600; line-height: 1.55; scroll-margin-top: 28px; }
.article-prose h2 { margin: 38px 0 18px; padding-bottom: 12px; border-bottom: 1px solid #edf1f7; font-size: 25px; }
.article-prose h3 { margin: 30px 0 14px; font-size: 21px; }
.article-prose h4 { margin: 26px 0 12px; font-size: 18px; }
.article-prose h5, .article-prose h6 { margin: 22px 0 10px; font-size: 16px; }
.article-prose a { color: #368fdc; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b7d9f4; }
.article-prose a:hover { color: #2379c2; }
.article-prose strong { color: #32445e; font-weight: 650; }
.article-prose ul, .article-prose ol { margin: 16px 0; padding-left: 25px; }
.article-prose li { padding-left: 3px; margin: 5px 0; }
.article-prose li > p { margin: 8px 0; }
.article-prose blockquote { margin: 22px 0; padding: 1px 20px; border-left: 3px solid #8db9ec; border-radius: 0 8px 8px 0; background: #f4f8ff; color: #718199; }
.article-prose pre { max-width: 100%; margin: 23px 0; padding: 20px; overflow: auto; border: 1px solid #e6edf7; border-radius: 10px; background: #f6f8fc; color: #415671; line-height: 1.75; overflow-wrap: normal; }
.article-prose code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .87em; padding: 2px 6px; border-radius: 4px; background: #f0f4fb; }
.article-prose pre code { padding: 0; background: transparent; font-size: 13px; }
.article-prose img { display: block; max-width: 100%; height: auto; margin: 22px auto; border: 1px solid #e8edf4; border-radius: 10px; }
.article-prose hr { height: 1px; border: 0; background: #e6edf5; margin: 32px 0; }
.article-table-scroll { max-width: 100%; margin: 24px 0; overflow-x: auto; }
.article-prose table { min-width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.article-prose th, .article-prose td { padding: 11px 15px; border: 1px solid #e4eaf4; text-align: left; }
.article-prose th { background: #f4f7fd; color: #3d5370; }
.article-end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 38px; padding-top: 24px; border-top: 1px solid #e9eef6; color: #5692d2; font-size: 14px; }
.article-sidebar { display: grid; gap: 20px; }
.sidebar-card { padding: 24px; }
.sidebar-card h2 { margin: 0 0 18px; color: #344966; font-size: 16px; font-weight: 600; }
.article-toc ol, .related-articles { margin: 0; padding: 0; list-style: none; }
.article-toc li { margin: 12px 0; color: #7a899e; font-size: 13px; line-height: 1.7; }
.article-toc li.toc-level-3 { padding-left: 12px; }
.article-toc li.toc-level-4, .article-toc li.toc-level-5, .article-toc li.toc-level-6 { padding-left: 24px; }
.article-toc a:hover, .related-articles a:hover { color: #368fdc; }
.related-articles li + li { border-top: 1px solid #eef2f8; }
.related-articles a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; color: #77879d; font-size: 13px; line-height: 1.75; }
.related-articles li:first-child a { padding-top: 0; }
.related-articles a span { flex-shrink: 0; color: #b1bdcf; }
.sidebar-all { display: flex; justify-content: space-between; margin-top: 15px; color: #5794d6; font-size: 13px; }
.login-container { padding-top: 44px; padding-bottom: 64px; }
.login-card { max-width: 440px; margin: auto; padding: 32px 36px; }
.login-card h2 { margin: 0 0 27px; color: #344966; font-size: 22px; font-weight: 600; }
.form-field { display: grid; gap: 10px; margin-bottom: 23px; }
.form-field label, .editor-body-heading label { color: #3c4e69; font-size: 14px; font-weight: 600; }
.form-field input, .form-field textarea { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid #dfe7f2; border-radius: 8px; background: #fff; color: #40516b; font: inherit; font-size: 14px; line-height: 1.7; }
.form-field textarea { resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #a4afbf; }
.form-field input:focus, .form-field textarea:focus, #article-content:focus { border-color: #8abcf0; outline: 2px solid #e4f0fd; outline-offset: 0; }
.login-card .button { width: 100%; margin-top: 4px; border-radius: 9px; font-size: 15px; }
.login-back { display: block; margin-top: 24px; text-align: center; color: #8b99ad; font-size: 13px; }
.form-error { margin: 0 0 22px; padding: 12px 15px; border-radius: 8px; background: #fff1f1; color: #bc5555; font-size: 14px; line-height: 1.75; }
.empty-state { padding-top: 64px; padding-bottom: 80px; text-align: center; }
.editor-container { padding-top: 36px; padding-bottom: 64px; }
.editor-card { padding: 32px; }
.editor-seo { margin: 0 0 26px; padding: 16px 18px 0; border: 1px solid #e7edf6; border-radius: 10px; background: #fafcff; }
.editor-seo summary { padding-bottom: 16px; color: #4c607c; font-size: 14px; cursor: pointer; }
.editor-seo summary span { margin-left: 16px; color: #99a6b9; font-size: 12px; }
.editor-seo-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 24px; }
.editor-body-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.editor-body-heading > span { color: #99a6b9; font-size: 12px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 9px; border: 1px solid #e1e8f3; border-bottom: 0; border-radius: 10px 10px 0 0; background: #f8faff; }
.editor-toolbar[hidden], .editor-tabs[hidden] { display: none; }
.editor-toolbar button { min-width: 35px; padding: 8px 11px; border: 0; border-radius: 6px; background: transparent; color: #5e7290; font-size: 13px; cursor: pointer; }
.editor-toolbar button:hover { background: #e7effb; color: #3489d7; }
.editor-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border: 1px solid #e1e8f3; border-radius: 0 0 10px 10px; }
.editor-pane { min-width: 0; }
.editor-pane + .editor-pane { border-left: 1px solid #e1e8f3; }
.editor-pane-label { padding: 10px 18px; background: #fbfcff; color: #94a1b6; font-size: 12px; border-bottom: 1px solid #edf1f8; }
#article-content { display: block; width: 100%; height: 560px; padding: 22px; resize: vertical; border: 0; background: #fff; color: #536782; font: 14px/1.85 "SFMono-Regular", Consolas, "PingFang SC", monospace; }
.preview-content { height: 560px; padding: 22px; overflow-y: auto; font-size: 14px; }
.preview-content:empty::before { content: "正文预览会显示在这里"; color: #a0acc0; }
.preview-content h2 { font-size: 22px; }
.preview-content h3 { font-size: 19px; }
.editor-save-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; }
#editor-status { margin: 0; color: #8c9ab0; font-size: 13px; line-height: 1.8; }
#editor-status.is-error { color: #bc5555; }
.editor-card button:disabled { opacity: .55; cursor: wait; }
.editor-login-message { color: #bc5555; font-size: 13px; }
.editor-login-message a { color: #368fdc; text-decoration: underline; }
.editor-tabs { display: none; }
@media (max-width: 950px) {
    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .article-toc { display: none; }
    .related-articles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
    .related-articles li:first-child a { padding-top: 13px; }
    .page-heading-row { align-items: flex-start; }
    .page-heading-actions { flex-direction: column; align-items: flex-end; gap: 10px; }
}
@media (max-width: 640px) {
    .document-container, .page-heading-inner { padding-right: 20px; padding-left: 20px; }
    .page-heading { padding-top: 23px; padding-bottom: 29px; }
    .breadcrumbs ol { margin-bottom: 20px; font-size: 12px; }
    .page-heading-row { flex-direction: column; gap: 20px; }
    .page-heading h1 { font-size: 27px; line-height: 1.5; }
    .page-subtitle { margin-top: 11px; font-size: 14px; }
    .page-heading-actions { flex-direction: row; align-items: center; gap: 20px; }
    .article-meta { gap: 8px 18px; font-size: 12px; }
    .article-list { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 25px; padding-bottom: 40px; }
    .tutorial-card { padding: 23px; }
    .tutorial-card h2 { font-size: 19px; margin-top: 18px; }
    .article-layout { gap: 22px; padding-top: 23px; padding-bottom: 40px; }
    .article-card { padding: 24px 21px; }
    .article-prose { font-size: 15px; line-height: 1.95; }
    .article-prose h2 { margin-top: 29px; font-size: 22px; }
    .article-prose h3 { font-size: 19px; }
    .article-prose pre { padding: 15px; }
    .article-prose img { margin: 18px auto; border-radius: 7px; }
    .sidebar-card { padding: 23px; }
    .related-articles { grid-template-columns: minmax(0, 1fr); }
    .login-container { padding-top: 27px; padding-bottom: 40px; }
    .login-card { padding: 27px 24px; }
    .editor-container { padding-top: 24px; padding-bottom: 40px; }
    .editor-card { padding: 23px 17px; }
    .editor-seo { padding: 14px 13px 0; }
    .editor-seo summary { padding-bottom: 14px; }
    .editor-seo summary span { display: none; }
    .editor-seo-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .editor-toolbar { gap: 2px; padding: 6px; }
    .editor-toolbar button { padding: 8px 9px; font-size: 12px; }
    .editor-tabs:not([hidden]) { display: flex; border: 1px solid #e1e8f3; border-bottom: 0; background: #f8faff; }
    .editor-tabs button { flex: 1; padding: 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8c9cb3; font-size: 13px; cursor: pointer; }
    .editor-tabs button[aria-selected="true"] { border-bottom-color: #69a8e9; background: #fff; color: #368fdc; }
    .editor-workspace { grid-template-columns: minmax(0, 1fr); }
    .editor-pane + .editor-pane { border-left: 0; }
    .editor-card.is-enhanced .editor-pane.is-inactive { display: none; }
    .editor-pane-label { display: none; }
    #article-content { height: 420px; padding: 16px; font-size: 13px; }
    .preview-content { height: 420px; padding: 18px; font-size: 14px; }
    .editor-save-row { align-items: flex-start; flex-direction: column; gap: 14px; }
    .editor-save-row .button { width: 100%; }
    .compact-button { min-height: 42px; min-width: 116px; font-size: 13px; }
}
