/* ==========================================================================
   食品超级工作台 · 官网样式
   自研响应式样式（不依赖后台模板样式），移动端优先，断点：640 / 900 / 1120
   ========================================================================== */

:root {
    --c-primary:      #16a34a;
    --c-primary-dark: #15803d;
    --c-primary-soft: #ecfdf5;
    --c-accent:       #0f766e;
    --c-ink:          #0f172a;
    --c-ink-2:        #334155;
    --c-muted:        #64748b;
    --c-line:         #e2e8f0;
    --c-bg:           #ffffff;
    --c-bg-soft:      #f8fafc;
    --c-bg-dark:      #0b1220;
    --c-white:        #ffffff;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 6px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);
    --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--c-ink);
    background: var(--c-bg);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--c-primary-dark); text-decoration: none; }
a:hover { color: var(--c-primary); }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============================ 顶部导航 ============================ */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--c-line);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--c-ink); }
.brand:hover { color: var(--c-ink); }
.brand-mark {
    width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.brand-sub { font-size: 12px; color: var(--c-muted); font-weight: 400; margin-left: 2px; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
    padding: 8px 13px; border-radius: var(--r-sm); font-size: 14.5px;
    color: var(--c-ink-2); transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--c-bg-soft); color: var(--c-ink); }
.nav-links a.active { color: var(--c-primary-dark); background: var(--c-primary-soft); font-weight: 500; }
.nav-cta {
    margin-left: 6px; padding: 9px 16px !important; border-radius: var(--r-sm) !important;
    background: var(--c-primary) !important; color: #fff !important; font-weight: 500;
}
.nav-cta:hover { background: var(--c-primary-dark) !important; }

.nav-toggle {
    display: none; margin-left: auto; width: 40px; height: 40px;
    border: 1px solid var(--c-line); border-radius: var(--r-sm);
    background: #fff; cursor: pointer; padding: 0;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--c-ink-2); border-radius: 2px; }

/* ============================ 通用块 ============================ */
.section { padding: 72px 0; }
.section-soft { background: var(--c-bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: 28px; margin-bottom: 10px; }
.section-head p { color: var(--c-muted); font-size: 15.5px; }
.eyebrow {
    display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
    text-transform: uppercase; color: var(--c-primary-dark);
    background: var(--c-primary-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--r-sm); font-size: 15px; font-weight: 500;
    border: 1px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: #fff; color: var(--c-ink); border-color: var(--c-line); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ============================ 首屏 ============================ */
.hero {
    position: relative; overflow: hidden;
    padding: 84px 0 76px;
    background:
        radial-gradient(900px 380px at 12% -8%, #dcfce7 0%, rgba(220, 252, 231, 0) 62%),
        radial-gradient(760px 340px at 92% 6%, #ccfbf1 0%, rgba(204, 251, 241, 0) 60%),
        var(--c-bg);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hero h1 { font-size: 42px; letter-spacing: -.02em; margin-bottom: 16px; }
.hero h1 .hl { color: var(--c-primary-dark); }
.hero .lead { font-size: 17px; color: var(--c-ink-2); margin-bottom: 26px; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    font-size: 13px; color: var(--c-ink-2); background: #fff;
    border: 1px solid var(--c-line); border-radius: 999px; padding: 5px 13px;
}
.hero-panel {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg); padding: 22px; overflow: hidden;
}
.hero-panel .p-title { font-size: 13px; color: var(--c-muted); margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.stat {
    background: var(--c-bg-soft); border-radius: var(--r-md); padding: 16px;
    text-align: center; border: 1px solid var(--c-line);
}
.stat b { display: block; font-size: 26px; font-weight: 700; color: var(--c-primary-dark); line-height: 1.2; }
.stat span { font-size: 12.5px; color: var(--c-muted); }
.hero-panel .p-note {
    margin-top: 14px; font-size: 12.5px; color: var(--c-muted);
    border-top: 1px dashed var(--c-line); padding-top: 12px; line-height: 1.65;
}

/* ============================ 卡片栅格 ============================ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

/* Grid 子项默认 min-width:auto，长内容（如 white-space:pre 的代码块）会把轨道撑宽，
   进而导致整页横向溢出。配合上面的 minmax(0, …) 才能真正让内部滚动生效 */
.grid > *, .hero-grid > *, .stat-grid > *, .steps > *, .donate-grid > *,
.foot-grid > *, .ai-flow > *, .ai-cols > *, .comment-form .cf-row > * { min-width: 0; }

.card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
    padding: 24px; transition: all .18s;
}
.card:hover { border-color: #bbf7d0; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .c-icon { font-size: 26px; line-height: 1; margin-bottom: 12px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--c-muted); font-size: 14.5px; }

/* 静态容器：外观与 .card 一致，但不带悬浮位移（用于承载列表，不适合"可点"的暗示）
   内边距刻意与 .card 对齐，保证小屏下各模块内容左边距一致 */
.box-plain {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
    padding: 8px 24px;
}

/* 架构条目 */
.arch-item { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--c-line); }
.arch-item:last-child { border-bottom: none; }
.arch-no {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
    background: var(--c-primary-soft); color: var(--c-primary-dark);
    font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.arch-item h4 { font-size: 15.5px; margin-bottom: 4px; }
.arch-item p { color: var(--c-muted); font-size: 14.5px; }

/* 步骤 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 22px; }
.step .s-no {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%; margin-bottom: 10px;
    background: var(--c-primary); color: #fff; font-size: 13px; font-weight: 700;
}
.step h4 { font-size: 15.5px; margin-bottom: 6px; }
.step p { color: var(--c-muted); font-size: 14.5px; }

/* 代码块 */
.code {
    background: var(--c-bg-dark); color: #e2e8f0; border-radius: var(--r-md);
    padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px; line-height: 1.75; overflow-x: auto; white-space: pre;
 max-width: 100%;}
.code .k { color: #7dd3fc; }
.code .s { color: #86efac; }
.code .c { color: #94a3b8; }

/* ============================ 插件生态 ============================ */
.plugin-card { display: flex; flex-direction: column; }
.plugin-card .p-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.plugin-card .p-name { font-size: 16px; font-weight: 600; }
.plugin-card .p-meta { font-size: 12.5px; color: var(--c-muted); margin-top: 2px; }
.plugin-card .p-intro { color: var(--c-muted); font-size: 14px; flex: 1; }
.plugin-card .p-foot {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--c-line);
    font-size: 12.5px; color: var(--c-muted);
}
.badge {
    display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
    line-height: 18px; white-space: nowrap;
}
.badge-on  { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.badge-off { background: #f1f5f9; color: var(--c-muted); }
.badge-dep { background: #fef3c7; color: #92400e; }
.badge-new { background: #e0f2fe; color: #075985; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 28px; }
.filter-bar input[type=search] {
    flex: 1 1 260px; max-width: 340px; padding: 11px 14px; font-size: 14.5px;
    border: 1px solid var(--c-line); border-radius: var(--r-sm); outline: none; font-family: inherit;
}
.filter-bar input[type=search]:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }

/* ============================ 赞助 ============================ */
.donate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.qr-card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
    padding: 26px; text-align: center; box-shadow: var(--shadow-sm);
}
.qr-card h3 { font-size: 17px; margin-bottom: 6px; }
.qr-card .q-sub { color: var(--c-muted); font-size: 13.5px; margin-bottom: 18px; }
.qr-box {
    width: 208px; height: 208px; margin: 0 auto 14px; border-radius: var(--r-md);
    border: 1px solid var(--c-line); background: var(--c-bg-soft);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-empty { color: var(--c-muted); font-size: 13px; padding: 0 20px; line-height: 1.7; }
.qr-tip { font-size: 12.5px; color: var(--c-muted); }

.note-box {
    background: #fffbeb; border: 1px solid #fde68a; border-left: 3px solid #f59e0b;
    border-radius: var(--r-sm); padding: 14px 18px; color: #78350f; font-size: 13.5px; line-height: 1.75;
}

.wall { display: flex; flex-wrap: wrap; gap: 10px; }
.wall-item {
    background: #fff; border: 1px solid var(--c-line); border-radius: 999px;
    padding: 7px 16px; font-size: 14px; display: inline-flex; align-items: center; gap: 8px;
}
.wall-item .w-amt { color: var(--c-primary-dark); font-weight: 600; font-size: 13px; }
.wall-msg {
    background: #fff; border: 1px solid var(--c-line); border-left: 3px solid var(--c-primary);
    border-radius: var(--r-sm); padding: 14px 18px; font-size: 14px; color: var(--c-ink-2);
}
.wall-msg .w-from { display: block; margin-top: 6px; font-size: 12.5px; color: var(--c-muted); }

.empty {
    text-align: center; color: var(--c-muted); padding: 34px 12px; font-size: 14px;
    background: #fff; border: 1px dashed var(--c-line); border-radius: var(--r-md);
}

/* ============================ 页脚 ============================ */
.foot { background: var(--c-bg-dark); color: #94a3b8; padding: 52px 0 26px; margin-top: 0; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-bottom: 34px; }
.foot h4 { color: #e2e8f0; font-size: 14.5px; margin-bottom: 14px; }
.foot a { color: #94a3b8; }
.foot a:hover { color: #fff; }
.foot ul { list-style: none; }
.foot li { margin-bottom: 9px; }
.foot .f-brand { display: flex; align-items: center; gap: 10px; color: #e2e8f0; font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.foot .f-desc { line-height: 1.8; max-width: 340px; }
.foot-bottom {
    border-top: 1px solid rgba(148, 163, 184, .18); padding-top: 20px;
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 13px;
}
.foot-bottom .fb-links a { margin-left: 14px; }

/* ============================ 返回顶部 ============================ */
.to-top {
    position: fixed; right: 20px; bottom: 24px; z-index: 40;
    width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--c-line);
    background: #fff; color: var(--c-ink-2); cursor: pointer; box-shadow: var(--shadow-md);
    display: none; align-items: center; justify-content: center; font-size: 17px;
}
.to-top.show { display: flex; }

/* ============================ AI 开发插件（重点板块） ============================ */
.section-dark {
    background: var(--c-bg-dark); color: #cbd5e1;
    background-image:
        radial-gradient(760px 320px at 8% 0%, rgba(22, 163, 74, .22) 0%, rgba(22, 163, 74, 0) 62%),
        radial-gradient(680px 300px at 96% 100%, rgba(15, 118, 110, .20) 0%, rgba(15, 118, 110, 0) 60%);
}
.section-dark .section-head h2 { color: #f8fafc; }
.section-dark .section-head p { color: #94a3b8; }
.section-dark .eyebrow { background: rgba(22, 163, 74, .18); color: #86efac; }

.ai-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.ai-step {
    background: rgba(148, 163, 184, .07); border: 1px solid rgba(148, 163, 184, .18);
    border-radius: var(--r-md); padding: 22px 20px; position: relative;
}
.ai-step .s-no {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%; margin-bottom: 12px;
    background: var(--c-primary); color: #fff; font-size: 13.5px; font-weight: 700;
}
.ai-step h4 { color: #f1f5f9; font-size: 15.5px; margin-bottom: 8px; }
.ai-step p { color: #94a3b8; font-size: 14px; line-height: 1.75; }
.ai-step::after {
    content: ''; position: absolute; right: -9px; top: 34px;
    width: 10px; height: 2px; background: rgba(148, 163, 184, .35);
}
.ai-step:last-child::after { display: none; }

.ai-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
.ai-panel {
    background: rgba(148, 163, 184, .07); border: 1px solid rgba(148, 163, 184, .18);
    border-radius: var(--r-md); padding: 22px;
}
.ai-panel h4 { color: #f1f5f9; font-size: 15.5px; margin-bottom: 14px; }
.tool-chip {
    display: block; padding: 12px 15px; border-radius: var(--r-sm); margin-bottom: 9px;
    background: rgba(148, 163, 184, .08); border: 1px solid rgba(148, 163, 184, .16);
}
.tool-chip:last-child { margin-bottom: 0; }
.tool-chip b { color: #f1f5f9; font-size: 14.5px; display: block; margin-bottom: 2px; }
.tool-chip span { color: #94a3b8; font-size: 13px; }

.prompt-box {
    background: #060b16; border: 1px solid rgba(148, 163, 184, .2); border-radius: var(--r-md);
    padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12.5px; line-height: 1.85; color: #cbd5e1; white-space: pre-wrap;
    word-break: break-word; max-height: 330px; overflow: auto;
}
.prompt-box .p-c { color: #64748b; }
.prompt-box .p-k { color: #86efac; }

.ai-note {
    margin-top: 22px; padding: 14px 18px; border-radius: var(--r-sm);
    background: rgba(22, 163, 74, .12); border: 1px solid rgba(22, 163, 74, .3);
    color: #bbf7d0; font-size: 13.5px; line-height: 1.8;
}

/* ============================ 更新日志 / 使用说明 ============================ */
.post-list { display: flex; flex-direction: column; gap: 14px; }
.post-item {
    display: block; background: #fff; border: 1px solid var(--c-line);
    border-radius: var(--r-md); padding: 22px 24px; transition: all .18s; color: inherit;
}
.post-item:hover { border-color: #bbf7d0; box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.post-item .pi-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.post-item .pi-title { font-size: 17px; font-weight: 600; color: var(--c-ink); }
.post-item .pi-date { font-size: 13px; color: var(--c-muted); margin-left: auto; white-space: nowrap; }
.post-item .pi-summary { color: var(--c-muted); font-size: 14.5px; line-height: 1.75; }
.post-item .pi-foot { margin-top: 12px; display: flex; gap: 14px; font-size: 12.5px; color: var(--c-muted); }

/* 文章正文 */
.article { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 34px 38px; }
.article-head { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--c-line); }
.article-head h1 { font-size: 26px; margin-bottom: 10px; }
.article-meta { font-size: 13px; color: var(--c-muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.article-body { font-size: 15.5px; line-height: 1.95; color: var(--c-ink-2); word-wrap: break-word; }
.article-body h2 { font-size: 21px; color: var(--c-ink); margin: 30px 0 12px; padding-left: 12px; border-left: 3px solid var(--c-primary); }
.article-body h3 { font-size: 18px; color: var(--c-ink); margin: 24px 0 10px; }
.article-body h4 { font-size: 16px; color: var(--c-ink); margin: 20px 0 8px; }
.article-body h2:first-child, .article-body h3:first-child { margin-top: 0; }
.article-body p { margin: 0 0 14px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body strong { color: var(--c-ink); font-weight: 600; }
.article-body a { border-bottom: 1px solid currentColor; }
.article-body blockquote {
    margin: 0 0 16px; padding: 12px 18px; background: var(--c-bg-soft);
    border-left: 3px solid var(--c-primary); border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--c-ink-2); font-size: 14.5px;
}
.article-body blockquote p { margin: 0; }
.article-body .md-hr { border: none; border-top: 1px dashed var(--c-line); margin: 26px 0; }
.article-body code.md-inline {
    background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: 4px;
    padding: 1px 6px; font-size: 13.5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #b91c1c; word-break: break-all;
}
.article-body pre.md-code {
    background: var(--c-bg-dark); color: #e2e8f0; border-radius: var(--r-md);
    padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px; line-height: 1.8; overflow-x: auto; margin: 0 0 16px; white-space: pre;
 max-width: 100%;}

/* 上下篇 */
.post-nav { display: flex; gap: 14px; margin-top: 20px; }
.post-nav a {
    flex: 1; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
    padding: 14px 18px; font-size: 14px; color: var(--c-ink-2);
}
.post-nav a:hover { border-color: #bbf7d0; color: var(--c-primary-dark); }
.post-nav .pn-lbl { display: block; font-size: 12px; color: var(--c-muted); margin-bottom: 4px; }
.post-nav .pn-empty { flex: 1; }

/* ============================ 评论 / 留言 ============================ */
.comments { margin-top: 30px; }
.comments-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 17px; font-weight: 600; margin-bottom: 18px;
}
.comments-head .cnt { font-size: 13px; font-weight: 400; color: var(--c-muted); }

.comment {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
    padding: 18px 20px; margin-bottom: 12px;
}
.comment.is-admin { border-left: 3px solid var(--c-primary); background: var(--c-primary-soft); }
.comment .c-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.comment .c-avatar {
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff; font-size: 13.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.comment .c-name { font-size: 14.5px; font-weight: 600; color: var(--c-ink); }
.comment .c-time { font-size: 12.5px; color: var(--c-muted); margin-left: auto; white-space: nowrap; }
.comment .c-body { font-size: 14.5px; line-height: 1.85; color: var(--c-ink-2); word-wrap: break-word; white-space: pre-wrap; }
.comment .c-replies { margin-top: 12px; padding-left: 18px; border-left: 2px solid var(--c-line); }
.comment .c-replies .comment { padding: 14px 16px; margin-bottom: 10px; }
.comment .c-replies .comment:last-child { margin-bottom: 0; }
.comment .c-actions { margin-top: 10px; font-size: 12.5px; }
.comment .c-actions a { color: var(--c-muted); }
.comment .c-actions a:hover { color: var(--c-primary-dark); }

/* 评论表单 */
.comment-form {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
    padding: 24px; margin-top: 22px;
}
.comment-form h3 { font-size: 16px; margin-bottom: 6px; }
.comment-form .cf-tip { font-size: 13px; color: var(--c-muted); line-height: 1.75; margin-bottom: 16px; }
.comment-form .cf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.comment-form label { display: block; font-size: 13.5px; color: var(--c-ink-2); margin-bottom: 5px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea {
    width: 100%; padding: 11px 13px; font-size: 14.5px; font-family: inherit;
    border: 1px solid var(--c-line); border-radius: var(--r-sm); outline: none;
    background: #fff; color: var(--c-ink); transition: border-color .15s, box-shadow .15s;
}
.comment-form input:focus, .comment-form textarea:focus {
    border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.comment-form textarea { min-height: 120px; line-height: 1.7; resize: vertical; }
.comment-form .cf-bottom { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.comment-form .cf-vcode { display: flex; align-items: center; gap: 10px; }
.comment-form .cf-vcode img {
    width: 110px; height: 38px; border: 1px solid var(--c-line); border-radius: var(--r-sm);
    cursor: pointer; background: #fff;
}
.comment-form .cf-vcode input { width: 110px; }
.comment-form .cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.comment-form .cf-msg { font-size: 13.5px; margin-top: 12px; display: none; }
.comment-form .cf-msg.ok { color: var(--c-primary-dark); display: block; }
.comment-form .cf-msg.err { color: #b91c1c; display: block; }

/* ============================ 响应式 ============================ */
@media (max-width: 1120px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .hero h1 { font-size: 38px; }
    .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ai-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-step:nth-child(2)::after { display: none; }
    .ai-cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .section { padding: 56px 0; }
    .hero { padding: 60px 0 56px; }
    .hero h1 { font-size: 32px; }
    .hero .lead { font-size: 16px; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .donate-grid { grid-template-columns: minmax(0, 1fr); }
    .section-head h2 { font-size: 24px; }

    /* 移动端导航：折叠为下拉面板 */
    .nav-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; left: 0; right: 0; top: 62px;
        flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
        background: #fff; border-bottom: 1px solid var(--c-line);
        padding: 10px 20px 16px; box-shadow: var(--shadow-md);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 14px; font-size: 15px; }
    .nav-cta { margin: 6px 0 0 !important; text-align: center; }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .wrap { padding: 0 16px; }
    .section { padding: 46px 0; }
    .hero { padding: 46px 0 42px; }
    .hero h1 { font-size: 26px; }
    .hero .lead { font-size: 15px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .grid-2, .grid-3, .grid-auto { grid-template-columns: minmax(0, 1fr); }
    .stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .foot-bottom { flex-direction: column; }
    .foot-bottom .fb-links a { margin: 0 14px 0 0; }
    .card { padding: 20px; }
    /* 与 .card 同步收缩，保证各模块内容左边距一致 */
    .box-plain { padding: 6px 20px; }
    .arch-item { padding: 16px 0; }
    .qr-box { width: 178px; height: 178px; }
    .brand-sub { display: none; }
    /* AI 板块：单列，去掉连接线 */
    .ai-flow { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .ai-step::after { display: none; }
    .prompt-box { font-size: 12px; max-height: 260px; }
    /* 文章与评论 */
    .article { padding: 22px 18px; }
    .article-head h1 { font-size: 21px; }
    .article-body { font-size: 15px; line-height: 1.9; }
    .article-body h2 { font-size: 18.5px; margin-top: 24px; }
    .article-body pre.md-code { font-size: 12px; padding: 13px 14px; }
    .post-item { padding: 18px; }
    .post-item .pi-date { margin-left: 0; }
    .post-nav { flex-direction: column; }
    .comment-form { padding: 18px; }
    .comment-form .cf-row { grid-template-columns: minmax(0, 1fr); }
    .comment { padding: 15px 16px; }
    .comment .c-replies { padding-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
