/* 阳光主题设计令牌。
   :root 的默认值必须与 ThemeRegistry 的 DefaultValue 保持一致（有校验脚本守护），
   后台只注入「被覆盖的键 + 受影响派生」，靠 CSS 变量级联完成 Site → Page → Module 继承。
   主色 #B45309 深琥珀（白字约 4.8:1，达 WCAG AA），浅金 #FCD34D 仅作点缀，不承载文字。 */
:root {
    --ink: #292524;              /* text */
    --ink-soft: #6B6259;         /* mutedText */
    --prose-ink: #4A4138;        /* proseText */
    --dark-ink: #E7D9C5;        /* darkInk */
    --line: #EDE0CF;             /* line */
    --line-strong: #E0CBA8;      /* lineStrong */
    --hover-line: #CBAE7E;       /* derived: lineStrong */
    --placeholder: #BCAA90;      /* derived: mutedText */
    --bg: #FFFBF5;               /* pageBg */
    --bg-alt: #FFF6E9;           /* sectionBg */
    --surface: #FFFFFF;          /* surface */
    --hero-from: #FFF1D6;        /* heroFrom */
    --dark-bg: #2E241C;          /* darkBg */
    --brand: #B45309;            /* brand */
    --brand-dark: #8A3F06;       /* brandDark */
    --brand-soft: #FEF3C7;       /* brandSoft */
    --accent: #FCD34D;           /* accent */
    --success: #2E7D5B;
    --success-bg: #E4F3EA;
    --warning: #8A5B06;
    --brand-rgb: 180, 83, 9;     /* derived: brand */
    --bg-rgb: 255, 251, 245;     /* derived: pageBg */
    --surface-rgb: 255, 255, 255; /* derived: surface */
    --shadow-rgb: 120, 76, 20;   /* derived: brand */
    --radius: 16px;
    --shadow: 0 10px 32px rgba(var(--shadow-rgb), .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink); background: var(--bg); line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(var(--bg-rgb), .94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.3px; }
.brand-logo { height: 32px; width: auto; }
.brand-avatar { height: 34px; width: 34px; border-radius: 50%; object-fit: cover; }
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.footer-social a { font-size: 13px; color: var(--accent); margin-bottom: 0; }
.footer-social a:hover { text-decoration: underline; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { font-size: 15px; color: var(--ink-soft); transition: color .2s; }
.site-nav a:hover { color: var(--brand); }
.site-nav a.active { color: var(--brand); font-weight: 700; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: .2s; cursor: pointer; }
.btn-primary { background: var(--brand); color: var(--surface); box-shadow: 0 6px 18px rgba(var(--brand-rgb), .2); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-outline { border-color: rgba(var(--surface-rgb), .55); color: var(--surface); }
.btn-outline:hover { background: rgba(var(--surface-rgb), .14); }

/* Hero */
.hero { background: linear-gradient(160deg, var(--hero-from) 0%, var(--bg) 68%); padding: 84px 0 72px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
/* grid item 默认 min-width:auto 会按内容 max-width 撑破轨道，长文本被裁 —— 必须归零 */
.hero-inner > * { min-width: 0; }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: 1.6px; font-weight: 700; color: var(--brand); text-transform: uppercase; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.24; letter-spacing: -1.5px; margin: 18px 0 20px; }
.hero h1 span { color: var(--brand); }
.hero-copy p { color: var(--ink-soft); font-size: 17px; max-width: 540px; margin: 0 0 32px; }
.hero-actions, .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(var(--brand-rgb), .14); overflow: hidden; transform: rotate(-1.2deg); }
.panel-bar { height: 38px; background: var(--bg-alt); display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.panel-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.panel-body { padding: 26px; }
.panel-line { height: 11px; border-radius: 6px; background: var(--line); margin-bottom: 14px; }
.w40 { width: 40%; } .w60 { width: 60%; } .w70 { width: 70%; } .w90 { width: 90%; }
.panel-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.panel-cards span { height: 82px; border-radius: 10px; background: linear-gradient(140deg, var(--brand-soft), var(--bg)); border: 1px solid var(--line-strong); }

/* Sections */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { position: relative; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.8px; margin: 12px 0 10px; }
.section-head p { color: var(--ink-soft); margin: 0; }
.head-link { position: absolute; right: 0; bottom: 4px; color: var(--brand); font-size: 14px; font-weight: 600; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: .2s; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature-card h3 { font-size: 18px; margin: 0 0 10px; }
.feature-card p { color: var(--ink-soft); font-size: 14px; margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.content-card, .list-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: .2s; }
.content-card:hover, .list-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-tag { font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .5px; margin-bottom: 12px; }
.content-card h3, .list-card h3 { font-size: 19px; margin: 0 0 10px; }
.content-card p, .list-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }
.card-more { font-size: 13px; color: var(--brand); font-weight: 600; }
.empty { color: var(--ink-soft); grid-column: 1 / -1; }
.list-grid { display: grid; gap: 14px; }
.list-card { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 20px; padding: 22px 26px; }
.list-date { color: var(--brand); font-weight: 700; font-size: 13px; }
.list-body h3 { margin: 0 0 6px; } .list-body p { margin: 0; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 34px; }
.pager a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.pager a.active { background: var(--brand); color: var(--surface); border-color: var(--brand); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 16px; }
.stat strong { display: block; font-size: 38px; color: var(--brand); line-height: 1.2; }
.stat span { color: var(--ink-soft); font-size: 14px; }

/* Page hero / prose */
.page-hero { background: linear-gradient(150deg, var(--hero-from), var(--bg)); border-bottom: 1px solid var(--line); padding: 62px 0 54px; }
.page-hero-sm { padding: 44px 0 40px; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -1px; margin: 10px 0 12px; }
.page-hero p { color: var(--ink-soft); margin: 0; max-width: 720px; }
.article-meta { color: var(--ink-soft); font-size: 13px; margin-top: 18px; }
.back-link { display: inline-block; color: var(--brand); font-size: 14px; margin-bottom: 16px; }
.prose { max-width: 800px; }
.prose h2 { font-size: 24px; margin: 36px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); font-size: 16px; }
.article-wrap { max-width: 820px; }
.article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 30px; }

/* Rich text body */
.markdown-body { font-size: 16px; line-height: 1.85; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { line-height: 1.4; margin: 32px 0 14px; letter-spacing: -.4px; }
.markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 24px; } .markdown-body h3 { font-size: 19px; }
.markdown-body p, .markdown-body ul, .markdown-body ol { color: var(--prose-ink); }
.markdown-body blockquote { margin: 20px 0; padding: 14px 20px; background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; }
.markdown-body blockquote p { margin: 0; }
.markdown-body pre { background: var(--dark-bg); color: var(--dark-ink); padding: 18px; border-radius: 10px; overflow-x: auto; font-size: 13px; }
.markdown-body code { background: var(--brand-soft); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.markdown-body pre code { background: none; padding: 0; color: inherit; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.markdown-body th { background: var(--bg-alt); }
.markdown-body img { border-radius: 10px; }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 270px 1fr; gap: 40px; align-items: start; }
.docs-side { position: sticky; top: 92px; }
.docs-search { display: flex; gap: 8px; margin-bottom: 20px; }
.docs-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background-color: var(--surface); color: var(--ink); outline: none; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.docs-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .1); }
.docs-search button { padding: 10px 14px; border: 0; border-radius: 8px; background: var(--brand); color: var(--surface); cursor: pointer; font-size: 14px; }
.docs-tree { display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--line); padding-left: 16px; }
.docs-tree a { padding: 7px 10px; border-radius: 7px; color: var(--ink-soft); font-size: 14px; }
.docs-tree a:hover, .docs-tree a.active { background: var(--brand-soft); color: var(--brand); }
.docs-tree a.active { font-weight: 600; }
.tree-child { padding-left: 22px !important; font-size: 13px !important; }
.tree-group { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.tree-title { font-size: 12px; color: var(--ink-soft); margin: 14px 0 4px; }
.docs-main { min-width: 0; }
.doc-item { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 14px; transition: .2s; }
.doc-item:hover { transform: translateY(-2px); border-color: var(--accent); }
.doc-item h3 { margin: 0 0 8px; font-size: 18px; }
.doc-item p { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; }
.doc-item span { color: var(--brand); font-size: 13px; font-weight: 600; }

/* Contact / CTA */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.contact-card span { color: var(--ink-soft); font-size: 13px; }
.contact-card strong { font-size: 17px; }
.contact-card a { color: var(--brand); }
.cta { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: var(--surface); padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta h2 { margin: 0 0 8px; font-size: 28px; }
.cta p { margin: 0; opacity: .9; }
.cta .btn-primary { background: var(--surface); color: var(--brand-dark); }

/* Footer */
.site-footer { background: var(--dark-bg); color: var(--dark-ink); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-col h3 { color: var(--surface); font-size: 18px; margin: 0 0 12px; }
.footer-col h4 { color: var(--surface); font-size: 14px; margin: 0 0 14px; }
.footer-col p { margin: 0 0 8px; font-size: 14px; }
.footer-col a { display: block; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover, .footer-bottom a:hover { color: var(--surface); }
.footer-bottom { border-top: 1px solid rgba(var(--bg-rgb), .12); padding: 18px 0; display: flex; gap: 20px; align-items: center; font-size: 13px; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom .footer-admin { margin-left: auto; }
.icp-link:hover { text-decoration: underline; }

/* 动态首页模块：布局预设 */
.home-module { position: relative; }
.home-module[data-layout="TwoColumns"] .module-grid,
.home-module[data-layout="ThreeColumns"] .module-grid { grid-template-columns: repeat(2, 1fr); }
.home-module[data-layout="ThreeColumns"] .module-grid { grid-template-columns: repeat(3, 1fr); }
/* 布局变体只在大屏生效：移动端必须回落单栏，否则 (0,3,0) 特异性会把
   media 里的 .hero-inner 单栏规则压掉，导致标题碎行、按钮被迫换行 */
@media (min-width: 961px) {
    .home-module[data-layout="TextLeftMediaRight"] .hero-inner { grid-template-columns: 1.05fr .95fr; }
    .home-module[data-layout="TextLeftMediaRight"] .hero-panel { display: block; }
}
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module-media { width: 100%; border-radius: var(--radius); }
.module-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px; margin-bottom: 14px; }
.module-rich { max-width: 860px; margin: 0 auto; }

/* 站点模式通用组件（公司官网 / 个人博客共用） */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.card-head h3 { margin: 0; font-size: 18px; }
.card-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; }
/* 与后台一致：排除特殊类型，覆盖全部文本类输入（不要用 [type=text] 选，漏掉无 type 属性的） */
.field input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="hidden"], [type="range"], [type="submit"], [type="button"]),
.field select,
.field textarea {
    width: 100%;
    min-height: 42px;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    outline: none;
    background-color: var(--surface);
    color: var(--ink);
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--hover-line); }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .1);
    background-color: var(--bg);
}
.field input:disabled, .field select:disabled, .field textarea:disabled { background-color: var(--bg-alt); color: var(--ink-soft); border-color: var(--line); cursor: not-allowed; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.msg { min-height: 20px; font-size: 13px; margin: 12px 0 0; color: var(--brand); }
.breadcrumb { background: var(--bg-alt); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.breadcrumb .container { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.article-neighbors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-neighbors > div { min-width: 0; }
.article-neighbors .next { text-align: right; }
.article-neighbors span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.article-neighbors a { font-weight: 600; color: var(--brand); }
.back-top { position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand); box-shadow: var(--shadow); cursor: pointer; font-size: 18px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; z-index: 40; }
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { background: var(--brand); color: var(--surface); }

/* 博客 / 资讯 */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.blog-main { min-width: 0; }
.blog-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-card h3 { font-size: 15px; margin: 0 0 14px; }
.side-card p { color: var(--ink-soft); font-size: 13px; margin: 0 0 12px; }
.side-card > a { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.side-card > a:hover { color: var(--brand); }
.side-card > a span { color: var(--brand); font-weight: 700; }
.blog-list { display: grid; gap: 18px; }
.blog-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: .2s; }
.blog-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.blog-cover { display: block; width: 220px; height: 150px; border-radius: 10px; overflow: hidden; background: var(--bg-alt); }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { min-width: 0; display: flex; flex-direction: column; }
.blog-meta { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.blog-body h2 { font-size: 20px; margin: 0 0 10px; line-height: 1.4; }
.blog-body h2 a:hover { color: var(--brand); }
.blog-body p { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; flex: 1; }

/* 关于 / 联系 */
.about-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; align-items: start; }
.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); text-align: center; }
.about-avatar { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; color: var(--surface); background: var(--brand); }
.about-avatar-placeholder { line-height: 1; }
.about-card h2 { font-size: 20px; margin: 0 0 6px; }
.about-tagline { color: var(--ink-soft); font-size: 13px; margin: 0 0 18px; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.social-links a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; color: var(--brand); background: var(--bg); }
.social-links a:hover { background: var(--brand-soft); border-color: var(--brand); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.contact-form-card .card-head { margin-bottom: 18px; }

/* 新增首页模块类型 */
.profile-module { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: center; }
.profile-module .about-avatar { margin: 0; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 18px; }
.timeline li::before { content: ''; position: absolute; left: -33px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 3px solid var(--bg); }
.timeline h3 { margin: 0 0 4px; font-size: 17px; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.timeline .badge { display: inline-block; font-size: 12px; color: var(--brand); font-weight: 700; margin-bottom: 4px; }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .2s; }
.case-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.case-card img { width: 100%; height: 170px; object-fit: cover; }
.case-card .case-body { padding: 20px; }
.case-card h3 { margin: 0 0 8px; font-size: 17px; }
.case-card p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* Responsive */
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .hero { padding: 60px 0 50px; }
    .card-grid, .module-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .docs-layout { grid-template-columns: 210px 1fr; gap: 24px; }
}
@media (max-width: 680px) {
    .container { width: calc(100% - 28px); }
    .header-inner { height: 60px; }
    .nav-toggle { display: block; }
    .site-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 14px 16px; box-shadow: 0 12px 24px rgba(var(--shadow-rgb), .1); }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 12px 6px; border-bottom: 1px solid var(--line); }
    .hero { padding: 44px 0 40px; }
    /* 移动端必须单栏：hero-panel 虽然 display:none，但空的 grid 列仍占 0.95fr，
       会把 hero-copy 压到一半宽，导致标题碎行、按钮被迫换行 */
    .hero-inner { grid-template-columns: 1fr; gap: 0; }
    .hero h1 { font-size: 32px; letter-spacing: -.8px; }
    .hero-copy p { font-size: 15px; }
    .hero-panel { display: none !important; }
    .section { padding: 50px 0; }
    .section-head { margin-bottom: 26px; }
    .head-link { position: static; display: inline-block; margin-top: 12px; }
    .card-grid, .module-grid, .contact-grid, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
    .list-card { grid-template-columns: 1fr; gap: 8px; }
    .page-hero { padding: 40px 0 34px; }
    .docs-layout { grid-template-columns: 1fr; gap: 20px; }
    .docs-side { position: static; }
    .docs-tree { border-left: 0; padding-left: 0; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .footer-bottom { flex-wrap: wrap; }
    .footer-bottom .footer-admin { margin-left: 0; }
    .blog-layout, .about-layout, .contact-layout, .profile-module { grid-template-columns: 1fr; }
    .blog-side { position: static; }
    .blog-card { grid-template-columns: 1fr; }
    .blog-cover { width: 100%; height: 190px; }
    .case-grid, .form-grid, .article-neighbors { grid-template-columns: 1fr; }
    .article-neighbors .next { text-align: left; }
    .about-avatar { margin: 0 auto 18px; }
}

/* 表面背景（后台「主题配色」可配置）：卡片 / 弹窗容器背景统一走 --surface，
   未配置时回退到默认纯白，与改造前视觉一致。 */
.feature-card, .content-card, .list-card, .stat, .doc-item, .contact-card,
.card, .side-card, .blog-card, .about-card, .case-card, .hero-panel {
    background: var(--surface, var(--surface));
}

/* ---------- 反馈编号与进度查询 ---------- */
.feedback-query-card { margin-top: 0; }
.fq-form { display: flex; gap: 10px; align-items: stretch; }
.fq-form input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; background-color: var(--surface); color: var(--ink); font-size: 15px; letter-spacing: 1px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; transition: border-color .15s, box-shadow .15s; }
.fq-form input:hover { border-color: var(--hover-line); }
.fq-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12); }
.fq-form .btn { padding: 11px 24px; white-space: nowrap; }

.fq-result { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 18px; }
.fq-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.fq-badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.fq-badge.ok { background: var(--success-bg); color: var(--success); }
.fq-badge.doing { background: var(--brand-soft); color: var(--warning); }
.fq-badge.pending { background: var(--bg-alt); color: var(--ink-soft); }
.fq-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: .5px; }
.fq-meta { display: grid; grid-template-columns: 76px 1fr; gap: 8px 14px; margin: 0 0 16px; font-size: 13px; }
.fq-meta dt { color: var(--ink-soft); }
.fq-meta dd { margin: 0; word-break: break-word; }
.fq-block { border: 1px solid var(--line); border-radius: 12px; background: var(--surface, var(--surface)); padding: 14px 16px; margin-top: 12px; }
.fq-block > span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.fq-block p { margin: 0; font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.fq-block.reply { border-color: var(--brand); background: var(--brand-soft); }
.fq-block.reply > span { color: var(--brand); font-weight: 700; }
.fq-block.pending p { color: var(--ink-soft); }

/* 提交成功后的编号展示 */
.feedback-code-box { margin-top: 16px; border: 1px solid var(--brand); border-radius: 14px; background: var(--brand-soft); padding: 18px 20px; }
.fc-label { display: block; font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .5px; margin-bottom: 8px; }
.fc-value { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fc-value strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 26px; letter-spacing: 3px; color: var(--brand); line-height: 1.2; }
.fc-value .btn { background: var(--surface); border-color: var(--brand); color: var(--brand); padding: 6px 14px; font-size: 13px; font-weight: 600; }
.fc-value .btn:hover { background: var(--brand); color: var(--surface); }
.fc-tip { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

@media (max-width: 680px) {
    .fq-form { flex-direction: column; }
    .fq-form .btn { width: 100%; }
    .fq-meta { grid-template-columns: 1fr; gap: 2px 0; }
    .fq-meta dt { margin-top: 8px; }
    .fc-value strong { font-size: 22px; }
}

/* 首页「反馈查询」模块：左文右卡 */
.feedback-module { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.feedback-module-text h2 { margin: 12px 0 10px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.6px; }
.feedback-module-text p { color: var(--ink-soft); margin: 0; }
.feedback-module .feedback-query-card { margin-top: 0; }
@media (max-width: 960px) {
    .feedback-module { grid-template-columns: 1fr; gap: 26px; }
}

/* ---------- 导航两级下拉 ----------
   桌面：父项 hover / 键盘聚焦展开；移动端：直接静态展开子项，不依赖 hover。 */
.site-nav .nav-sub-wrap { position: relative; }
.site-nav .nav-parent { display: inline-flex; align-items: center; gap: 5px; }
.nav-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .5; }
.site-nav .nav-sub {
    position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    min-width: 168px; padding: 8px; display: none; flex-direction: column; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow); z-index: 60;
}
.site-nav .nav-sub-wrap:hover .nav-sub,
.site-nav .nav-sub-wrap:focus-within .nav-sub { display: flex; }
.site-nav .nav-sub a { font-size: 14px; padding: 8px 12px; border-radius: 7px; white-space: nowrap; }
.site-nav .nav-sub a:hover, .site-nav .nav-sub a.active { background: var(--brand-soft); color: var(--brand); }
.site-nav .nav-sub-wrap .nav-parent.active { color: var(--brand); font-weight: 700; }

@media (max-width: 680px) {
    .site-nav .nav-sub-wrap { display: block; }
    .site-nav .nav-parent { padding: 12px 6px; border-bottom: 1px solid var(--line); }
    .site-nav .nav-sub {
        position: static; transform: none; display: flex; min-width: 0;
        padding: 0 0 0 16px; border: 0; box-shadow: none; background: transparent;
    }
    .site-nav .nav-sub a { padding: 10px 6px; border-bottom: 1px solid var(--line); }
    .site-nav .nav-sub a:last-child { border-bottom: 0; }
    .nav-caret { display: none; }
}
