
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    --navy: #10213d;
    --blue: #245be8;
    --muted: #66758d;
    --line: #e4eaf2;
    --pale: #f5f8fc;
    --white: #ffffff;
    --success: #14835a;
    --danger: #c0392b;
    --radius: 12px;
    --shadow: 0 7px 24px #0e25400a;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #1b2a43;
    font-family: "DM Sans", "Noto Sans SC", Arial, sans-serif;
    line-height: 1.65;
    background: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--blue);
}

a:hover {
    color: #1744b8;
}

:focus-visible {
    outline: 3px solid #245be855;
    outline-offset: 3px;
}

/* ==============================
   顶部导航
============================== */

.top {
    min-height: 76px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px max(calc((100vw - 1240px) / 2), 5%);
    gap: 25px;
    background: #ffffff;
}

.brand {
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    white-space: nowrap;
}

.brand b {
    color: var(--blue);
}

.brand-icon {
    display: grid;
    place-items: center;
    background: var(--blue);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.top nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
}

.top nav a {
    color: #40516b;
    text-decoration: none;
    transition: color .2s;
}

.top nav a:hover {
    color: var(--blue);
}

.top select {
    border: 1px solid var(--line);
    padding: 6px 9px;
    border-radius: 5px;
    background: #ffffff;
    color: var(--navy);
}

/* ==============================
   首页与通用 Hero
============================== */

.hero {
    padding: 78px max(calc((100vw - 1240px) / 2), 5%) 85px;
    background: linear-gradient(120deg, #f2f6fc, #ffffff 70%);
    min-height: 380px;
}

.hero h1 {
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.2;
    letter-spacing: -.04em;
    color: var(--navy);
    max-width: 850px;
    margin: 12px 0 18px;
    overflow-wrap: anywhere;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: .17em;
    color: var(--blue);
    font-weight: 800;
    text-transform: uppercase;
}

.lead {
    font-size: 16px;
    color: var(--muted);
    max-width: 800px;
    line-height: 1.8;
}

.market-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.market-cards a {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 15px;
    min-width: 190px;
    text-decoration: none;
    color: var(--navy);
    transition: transform .2s, box-shadow .2s;
}

.market-cards a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.market-cards span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

/* ==============================
   首页功能卡片
============================== */

.below {
    max-width: 1240px;
    margin: auto;
    padding: 35px 24px 95px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature,
.content-card,
.article-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: white;
    box-shadow: var(--shadow);
}

.feature > span {
    font-size: 10px;
    color: var(--blue);
    letter-spacing: .13em;
    font-weight: 700;
}

.feature h2 {
    font-size: 19px;
    color: var(--navy);
}

.feature p,
.content-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
}

/* ==============================
   内容区域
============================== */

.content-grid {
    max-width: 1240px;
    margin: auto;
    padding: 40px 24px 80px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.content-card h2 {
    color: var(--navy);
    font-size: 19px;
    margin-top: 0;
}

.related {
    max-width: 1240px;
    margin: auto;
    padding: 10px 24px 70px;
}

.related h2 {
    color: var(--navy);
}

.related ul {
    padding-left: 22px;
}

.related li {
    margin: 8px 0;
}

/* ==============================
   页脚
============================== */

.site-footer,
footer {
    border-top: 1px solid var(--line);
    padding: 30px max(calc((100vw - 1240px) / 2), 5%);
    color: #77849a;
    font-size: 12px;
}

.foot {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}

.site-footer small {
    font-size: 10px;
}

.site-footer a,
footer a {
    text-decoration: none;
}

/* ==============================
   文章列表
============================== */

.compact {
    min-height: 300px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.article-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s;
    overflow-wrap: anywhere;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px #0e254014;
}

.article-card small {
    color: var(--blue);
    font-weight: 700;
}

.article-card h2 {
    font-size: 19px;
    color: var(--navy);
}

.article-card p {
    color: var(--muted);
    font-size: 13px;
}

/* ==============================
   文章详情
============================== */

.post {
    max-width: 850px;
    margin: 65px auto 100px;
    padding: 0 24px;
}

.post h1 {
    font-size: 42px;
    line-height: 1.2;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.post-body {
    font-size: 16px;
    line-height: 1.9;
    margin: 35px 0;
    overflow-wrap: anywhere;
}

.post-body h2 {
    font-size: 27px;
    margin-top: 36px;
    color: var(--navy);
}

.post-body h3 {
    font-size: 21px;
    color: var(--navy);
}

.post-body p {
    margin: 16px 0;
}

.post-body ul,
.post-body ol {
    padding-left: 25px;
}

.post-body li {
    margin: 8px 0;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.post-body a {
    overflow-wrap: anywhere;
}

.featured {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
}

/* ==============================
   提示信息
============================== */

.notice,
.hint,
.tip {
    font-size: 12px;
    color: var(--muted);
}

.notice {
    background: #f2f6fc;
    border: 1px solid var(--line);
    padding: 15px 18px;
    border-radius: 9px;
    margin: 20px 0;
    line-height: 1.8;
}

.notice p {
    margin: 7px 0;
}

.flash {
    margin: 20px auto;
    max-width: 1200px;
    background: #eef6ff;
    border: 1px solid #dceaff;
    padding: 12px 18px;
    border-radius: 8px;
}

/* ==============================
   登录页面
============================== */

.login {
    min-height: 65vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
}

.login form {
    width: min(420px, 100%);
    padding: 35px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.login label,
.editor-page label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 15px 0;
}

.login input,
.editor-page input,
.editor-page textarea,
.editor-page select {
    display: block;
    width: 100%;
    padding: 11px;
    border: 1px solid #d8e0eb;
    border-radius: 7px;
    margin-top: 6px;
    font: inherit;
    font-weight: 400;
    background: #ffffff;
    color: #1b2a43;
}

.login input:focus,
.editor-page input:focus,
.editor-page textarea:focus,
.editor-page select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px #245be81a;
}

/* ==============================
   按钮
============================== */

.button {
    display: inline-block;
    background: var(--blue);
    color: white;
    border: 0;
    border-radius: 7px;
    padding: 11px 17px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.button:hover {
    background: #1748c8;
    color: white;
}

.button:active {
    transform: translateY(1px);
}

.button.light {
    background: #eef2f8;
    color: #34445e;
}

.button.light:hover {
    background: #e0e7f1;
}

/* ==============================
   后台管理
============================== */

.dashboard,
.editor-page {
    max-width: 1200px;
    margin: auto;
    padding: 55px 24px 100px;
}

.dash-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.dash-head h1,
.editor-page h1 {
    margin: 5px 0;
    color: var(--navy);
}

.dash-head p {
    color: var(--muted);
}

.table {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.tr {
    display: grid;
    grid-template-columns: 2fr .5fr .7fr 1.1fr 1fr;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    align-items: center;
}

.tr:last-child {
    border: 0;
}

.tr small {
    display: block;
    color: #8b96a7;
    overflow-wrap: anywhere;
}

.th {
    background: var(--pale);
    font-weight: 800;
}

.pill {
    display: inline-block;
    font-style: normal;
    border-radius: 20px;
    padding: 4px 8px;
    background: #edf1f7;
}

.pill.published {
    background: #e4f8ef;
    color: #14835a;
}

.pill.scheduled {
    background: #fff2d7;
    color: #936400;
}

.pill.draft {
    background: #edf1f7;
    color: #66758d;
}

.link {
    border: 0;
    background: none;
    color: var(--blue);
    cursor: pointer;
    padding: 4px;
}

.link:hover {
    text-decoration: underline;
}

/* ==============================
   文章编辑页面
============================== */

.editor-page {
    max-width: 950px;
}

.editor-page form {
    margin-top: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.tip {
    font-weight: 400;
    margin-left: 8px;
}

.editor-shell {
    border: 1px solid #d8e0eb;
    border-radius: 9px;
    overflow: hidden;
    background: #ffffff;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: #f4f6fa;
    border-bottom: 1px solid #d8e0eb;
    padding: 8px;
}

.toolbar button {
    border: 1px solid #d7dfeb;
    background: white;
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #34445e;
}

.toolbar button:hover {
    background: #eaf0fb;
    border-color: #b9c9e5;
}

.visual-editor {
    min-height: 360px;
    padding: 20px;
    outline: none;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.visual-editor:empty:before {
    content: attr(data-placeholder);
    color: #9aa5b5;
}

.visual-editor h2 {
    font-size: 26px;
    color: var(--navy);
}

.visual-editor h3 {
    font-size: 21px;
}

.visual-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ==============================
   SEO 面板和发布设置
============================== */

.seo-panel,
.publish-panel {
    background: #f7f9fc;
    border: 1px solid var(--line);
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
}

.seo-panel h2,
.publish-panel h2 {
    font-size: 18px;
    margin: 0 0 12px;
    color: var(--navy);
}

/* 复选框保持原生大小，不拉伸成普通输入框 */
.publish-panel input[type="checkbox"],
.editor-page input[type="checkbox"] {
    display: inline-block;
    width: auto;
    margin: 0 7px 0 0;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--blue);
}

.publish-panel label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    margin: 12px 0;
}

/* ==============================
   操作按钮组
============================== */

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* ==============================
   语言切换
============================== */

.language-switch {
    margin-top: 20px;
}

.language-switch a {
    display: inline-block;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--line);
    padding: 8px 13px;
    border-radius: 7px;
    background: #ffffff;
}

.language-switch a:hover {
    border-color: var(--blue);
}

/* ==============================
   404 页面
============================== */

.error-page {
    max-width: 850px;
    margin: auto;
    padding: 100px 24px;
    text-align: center;
}

.error-page h1 {
    color: var(--navy);
    font-size: clamp(40px, 7vw, 76px);
    margin: 0;
}

.error-page p {
    color: var(--muted);
}

/* ==============================
   平板适配
============================== */

@media (max-width: 850px) {
    .top {
        height: auto;
        padding: 16px 20px;
        align-items: flex-start;
        flex-direction: column;
    }

    .top nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .below,
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tr {
        grid-template-columns: 1.5fr .5fr .7fr;
    }

    .tr > *:nth-child(4) {
        display: none;
    }

    .tr > *:nth-child(5) {
        grid-column: 1 / -1;
    }
}

/* ==============================
   手机适配
============================== */

@media (max-width: 560px) {
    .hero {
        padding: 55px 22px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 36px;
    }

    .lead {
        font-size: 14px;
    }

    .below,
    .article-grid,
    .content-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .below {
        padding: 25px 16px 60px;
    }

    .content-grid {
        padding: 25px 16px 50px;
    }

    .related {
        padding: 10px 16px 50px;
    }

    .dash-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .tr {
        padding: 10px;
        gap: 7px;
    }

    .post {
        margin: 40px auto 65px;
        padding: 0 18px;
    }

    .post h1 {
        font-size: 32px;
    }

    .post-body {
        font-size: 15px;
    }

    .post-body h2 {
        font-size: 23px;
    }

    .editor-page,
    .dashboard {
        padding: 35px 15px 65px;
    }

    .login form {
        padding: 24px;
    }

    .market-cards a {
        width: 100%;
    }

    .actions .button {
        text-align: center;
    }

    .visual-editor {
        min-height: 280px;
        padding: 14px;
    }

    .seo-panel,
    .publish-panel {
        padding: 15px;
    }

    .site-footer,
    footer {
        padding: 25px 18px;
    }
}
