/* ==========================================================================
   站点全局：设计令牌、基础排版、头部、页脚、按钮、表单、通用容器
   首页样式见 welcome.css，内页样式见 pages.css
   ========================================================================== */

:root {
    --w-bg: #faf6ee;
    --w-ink: #1f2d27;
    --w-body: #4a5a52;
    --w-muted: #7b8a81;
    --w-green: #3f6a55;
    --w-green-deep: #2c4d3d;
    --w-clay: #b4795a;
    --w-line: rgba(31, 45, 39, .12);
    --w-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body.mainbody {
    margin: 0;
    background: var(--w-bg);
    background-image: none;
    color: var(--w-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- 头部 Logo ---------- */
.el-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3f6a55, #2c4d3d);
    color: #f7f2e7;
    font-size: 17px;
    font-weight: 600;
}

/* ---------- 通用容器 ---------- */
.page {
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 56px) 24px clamp(48px, 6vw, 80px);
}

.page-narrow {
    max-width: 860px;
}

.page-head {
    max-width: 720px;
    margin-bottom: clamp(22px, 3vw, 38px);
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    letter-spacing: .3em;
    color: var(--w-clay);
}

.page-title,
.section-title {
    margin: 0;
    font-family: var(--w-serif);
    font-size: clamp(28px, 3.8vw, 42px);
    line-height: 1.3;
    letter-spacing: .04em;
    color: var(--w-ink);
    font-weight: 600;
}

.page-lede,
.lede {
    margin: 14px 0 0;
    font-size: 15.5px;
    line-height: 1.95;
    color: var(--w-muted);
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 15px;
    letter-spacing: .04em;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease, opacity .22s ease;
}

.btn-solid {
    background: var(--w-green-deep);
    color: #fbf8f1;
    box-shadow: 0 12px 26px -16px rgba(44, 77, 61, .85);
}

.btn-solid:hover {
    background: #233f32;
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    border-color: rgba(63, 106, 85, .34);
    color: var(--w-green-deep);
    background: rgba(255, 255, 255, .6);
}

.btn-ghost:hover {
    background: rgba(63, 106, 85, .08);
    color: var(--w-green-deep);
}

.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 13.5px;
}

.btn-block {
    width: 100%;
}

.btn.is-disabled {
    opacity: .4;
    pointer-events: none;
}

/* ---------- 表单 ---------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--w-muted);
}

.field > span {
    letter-spacing: .06em;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--w-line);
    border-radius: 12px;
    background: #fff;
    color: var(--w-ink);
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.field textarea {
    height: auto;
    padding: 12px 14px;
    line-height: 1.75;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid rgba(63, 106, 85, .35);
    outline-offset: 1px;
    border-color: transparent;
}

/* ---------- 提示条 ---------- */
.alert {
    margin: 0 0 20px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
}

.alert p {
    margin: 0;
}

.alert-error {
    background: #fdf0ee;
    border: 1px solid #f3d5cf;
    color: #a3452f;
}

.alert-warn {
    background: #fdf7e8;
    border: 1px solid #f0e2c2;
    color: #8a6a2f;
}

.alert-ok {
    background: #eef6ef;
    border: 1px solid #d5e8d8;
    color: #2f6b46;
}

/* ---------- 页脚 ---------- */
.site-footer {
    padding: 46px 24px 26px;
    border-top: 1px solid var(--w-line);
}

.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 28px;
    max-width: 1160px;
    margin: 0 auto;
}

.site-footer-brand {
    margin-bottom: 10px;
    font-family: var(--w-serif);
    font-size: 20px;
    letter-spacing: .08em;
    color: var(--w-ink);
}

.site-footer-col p {
    margin: 6px 0;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--w-muted);
}

.site-footer-col a {
    color: inherit;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px 18px;
}

.site-footer-links a {
    font-size: 13.5px;
    color: var(--w-muted);
    text-decoration: none;
}

.site-footer-links a:hover {
    color: var(--w-green-deep);
}

.site-footer-bottom {
    max-width: 1160px;
    margin: 26px auto 0;
    padding-top: 18px;
    border-top: 1px solid var(--w-line);
    text-align: center;
    font-size: 12.5px;
    color: #8b9991;
}

.site-footer-dot {
    margin: 0 8px;
    opacity: .7;
}

/* ---------- 错误页 ---------- */
.site-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 72px 24px;
}

.site-error-card {
    max-width: 520px;
    text-align: center;
}

.site-error-code {
    margin: 0;
    font-size: 64px;
    font-weight: 600;
    letter-spacing: .1em;
    color: #d9cbb4;
}

.site-error-title {
    margin: 10px 0 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--el-text-primary);
}

.site-error-text {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.9;
    color: var(--el-text-secondary);
}

.site-error-req {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--el-text-placeholder);
    word-break: break-all;
}

.site-error-link {
    display: inline-flex;
    align-items: center;
    height: 40px;
    margin-top: 26px;
    padding: 0 24px;
    border: 1px solid var(--el-border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--el-text-regular);
    text-decoration: none;
}

/* ---------- 窄屏头部两行 ----------
   注意：element.css 在 site.css 之后加载，选择器必须加 .el-header 前缀提高优先级 */
@media (max-width: 560px) {
    .el-header {
        height: auto;
    }

    .el-header .el-header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 8px var(--el-pad) 0;
        gap: 10px 12px;
    }

    .el-header .el-header-nav {
        order: 3;
        flex: 1 0 100%;
    }

    .el-header .el-nav {
        height: 40px;
        overflow-x: auto;
    }

    .el-header .el-nav-link {
        height: 40px;
        padding: 0 10px;
        font-size: 14px;
    }

    .el-header .el-header-actions {
        margin-left: auto;
    }

    .site-footer-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}
