/* =========================================================
   站群模板 · 博客版（blog-craft）
   风格：内容优先、大量留白、卡片式文章流，支持深浅色
   ========================================================= */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f4f1ec;
  --text: #1b1d21;
  --text-2: #43484f;
  --muted: #838a93;
  --border: #ebe6df;
  --brand: #ff6b35;
  --brand-deep: #e8541f;
  --brand-soft: #fff1ea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(24, 20, 16, .04), 0 8px 24px rgba(24, 20, 16, .05);
  --shadow-lg: 0 4px 12px rgba(24, 20, 16, .07), 0 18px 40px rgba(24, 20, 16, .09);
  --wrap: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Songti SC", "SimSun", serif;
}

[data-theme="dark"] {
  --bg: #15171c;
  --surface: #1c1f26;
  --surface-2: #23272f;
  --text: #e9eaec;
  --text-2: #c2c6cd;
  --muted: #8b929c;
  --border: #2b303a;
  --brand: #ff7d4d;
  --brand-deep: #ff6b35;
  --brand-soft: rgba(255, 125, 77, .13);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* ================= 顶部 ================= */

.head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.head-inner {
  display: flex; align-items: center; gap: 22px;
  height: 68px;
}

.logo { display: flex; align-items: center; gap: 11px; flex: none; }

.logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 107, 53, .3);
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.logo-tag {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-top: 2px;
}

.head-search {
  margin-left: auto; display: flex; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 6px 0 16px; height: 40px;
  min-width: 210px; transition: border-color .2s, box-shadow .2s;
}
.head-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.head-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
  font-size: 14px; color: var(--text); font-family: inherit;
}
.head-search input::placeholder { color: var(--muted); }
.head-search button {
  border: 0; background: transparent; color: var(--brand);
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 10px;
  font-family: inherit; border-radius: 999px;
}
.head-search button:hover { background: var(--brand-soft); }

.theme-toggle {
  flex: none; width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

/* 语言切换器 */
.lang-switch { position: relative; flex: none; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: 13.5px; font-family: inherit;
  transition: border-color .2s, color .2s;
}
.lang-btn:hover { border-color: var(--brand); color: var(--brand); }
.lang-globe { font-size: 14px; }
.lang-caret { font-size: 10px; color: var(--muted); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 172px; padding: 6px; margin: 0; list-style: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; border-radius: 8px; font-size: 13.5px; color: var(--text-2);
}
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.lang-menu a em { font-style: normal; font-size: 11.5px; color: var(--muted); }

/* 导航 */
.nav { border-bottom: 1px solid var(--border); background: var(--surface); }
.nav-inner { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  position: relative; flex: none; padding: 14px 15px; font-size: 14.5px;
  color: var(--text-2); font-weight: 500; white-space: nowrap; transition: color .2s;
}
.nav-inner a::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 0;
  height: 2px; background: var(--brand); border-radius: 2px;
  transform: scaleX(0); transition: transform .22s ease;
}
.nav-inner a:hover { color: var(--text); }
.nav-inner a.active { color: var(--brand); font-weight: 600; }
.nav-inner a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 100%; border: 0; background: var(--surface);
  color: var(--text-2); font-size: 14px; padding: 12px 22px; text-align: left;
  cursor: pointer; font-family: inherit; border-bottom: 1px solid var(--border);
}
.nav-toggle.on { color: var(--brand); }

/* ================= 布局 ================= */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding-top: 30px;
  padding-bottom: 56px;
  align-items: start;
}
.layout.single { grid-template-columns: minmax(0, 1fr); max-width: 860px; }

.side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 20px; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 20px; }
.main > .panel + .panel { margin-top: 20px; }

.panel-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; margin-bottom: 14px; gap: 10px;
}
.panel-title .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.panel-title a { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.panel-title a:hover { color: var(--brand); }

.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.panel-head h2 { font-size: 19px; }
.panel-head .hint { font-size: 12.5px; color: var(--muted); }

/* ================= 顶部精选 ================= */

.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 300px; background: var(--surface-2);
  box-shadow: var(--shadow-lg); margin-bottom: 26px;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity .8s ease;
}
.hero-bg.on { opacity: 1; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 10, 8, .05) 0%, rgba(12, 10, 8, .32) 45%, rgba(12, 10, 8, .78) 100%);
}
.hero-body {
  position: relative; z-index: 2; padding: 108px 30px 26px; color: #fff;
}
.hero-chip {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  margin-bottom: 13px;
}
.hero-body h2 { font-size: 27px; margin-bottom: 10px; color: #fff; }
.hero-body h2 a { color: #fff; }
.hero-body h2 a:hover { color: #fff; opacity: .86; }
.hero-body p { margin: 0; font-size: 14.5px; color: rgba(255, 255, 255, .82); max-width: 640px; }
.hero-dots { position: absolute; right: 24px; bottom: 26px; z-index: 3; display: flex; gap: 7px; }
.hero-dots i {
  width: 8px; height: 8px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .42); transition: all .25s;
}
.hero-dots i.on { background: #fff; width: 22px; border-radius: 999px; }

/* ================= 文章卡片 ================= */

.posts-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
}

.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.post-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 34%, var(--border));
}

.card-cover {
  display: block; height: 172px; background-size: cover; background-position: center;
  background-color: var(--surface-2); transition: transform .4s ease;
}
.card-cover.no-img {
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 800; font-family: var(--serif);
  color: var(--brand); background: var(--brand-soft);
}
.post-card:hover .card-cover { transform: scale(1.03); }

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }

.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep); font-size: 12px; font-weight: 600;
}
.chip:hover { background: var(--brand); color: #fff; }
.chip-top { background: var(--text); color: var(--surface); }
.chip-rec { background: var(--surface-2); color: var(--text-2); }

.card-title { font-size: 17.5px; margin-bottom: 9px; }
.card-title a { transition: color .2s; }
.card-excerpt {
  margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.72;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-meta {
  margin-top: auto; display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted); flex-wrap: wrap;
}
.card-meta .avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.card-meta .who { color: var(--text-2); font-weight: 500; }
.card-meta .sep { color: var(--border); }

/* 横向列表项 */
.post-row {
  display: flex; gap: 20px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.post-row + .post-row { margin-top: 18px; }
.post-row:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--border));
}
.row-cover {
  flex: none; width: 210px; height: 138px; border-radius: var(--radius-sm);
  background-size: cover; background-position: center; background-color: var(--surface-2);
}
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-size: 18px; margin-bottom: 8px; }
.row-excerpt {
  margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.72;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ================= 侧栏 ================= */

.side-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px;
  color: var(--text-2); transition: all .2s;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.side-nav em { font-style: normal; font-size: 12px; color: var(--muted); }

.author-box { text-align: center; }
.author-avatar {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-size: 28px; font-weight: 800; font-family: var(--serif);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(255, 107, 53, .28);
}
.author-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.author-desc { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
.author-stats { display: flex; justify-content: center; gap: 26px; border-top: 1px solid var(--border); padding-top: 14px; }
.author-stats div { text-align: center; }
.author-stats b { display: block; font-size: 18px; color: var(--brand); }
.author-stats span { font-size: 12px; color: var(--muted); }

.mini-list li {
  display: flex; gap: 11px; align-items: flex-start; padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.mini-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-list li:first-child { padding-top: 0; }
.mini-list .no {
  flex: none; width: 20px; height: 20px; border-radius: 6px; margin-top: 3px;
  background: var(--surface-2); color: var(--muted);
  font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.mini-list li:nth-child(-n+3) .no { background: var(--brand); color: #fff; }
.mini-list .dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%; margin-top: 10px;
  background: var(--brand);
}
.mini-txt { min-width: 0; }
.mini-txt a {
  display: block; font-size: 14px; line-height: 1.6; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-txt a:hover { color: var(--brand); }
.mini-txt small { color: var(--muted); font-size: 12px; }

.subscribe {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; border: 0;
}
.subscribe h3 { font-size: 16px; margin-bottom: 8px; color: #fff; }
.subscribe p { margin: 0 0 14px; font-size: 13px; color: rgba(255, 255, 255, .88); line-height: 1.7; }
.subscribe .row { display: flex; gap: 8px; }
.subscribe input {
  flex: 1; min-width: 0; border: 0; border-radius: 999px; height: 38px;
  padding: 0 15px; font-size: 13px; font-family: inherit; outline: 0;
  background: rgba(255, 255, 255, .95); color: #1b1d21;
}
.subscribe button {
  flex: none; border: 0; border-radius: 999px; height: 38px; padding: 0 17px;
  background: rgba(0, 0, 0, .22); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .2s;
}
.subscribe button:hover { background: rgba(0, 0, 0, .34); }

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

.article {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 40px 30px; box-shadow: var(--shadow);
}

.article-head { border-bottom: 1px solid var(--border); padding-bottom: 22px; margin-bottom: 26px; }
.article-head h1 { font-size: 32px; line-height: 1.35; margin-bottom: 16px; letter-spacing: -.02em; }
.article-meta {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.article-meta .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.article-meta .who { color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.article-meta .sep { color: var(--border); }

/* 正文排版 */
.article-body { font-size: 16.5px; line-height: 1.92; color: var(--text-2); }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.15em; }
.article-body h2 {
  position: relative; font-size: 22px; color: var(--text);
  margin: 2em 0 .8em; padding-left: 14px;
}
.article-body h2::before {
  content: ''; position: absolute; left: 0; top: .28em; bottom: .28em;
  width: 4px; border-radius: 2px; background: var(--brand);
}
.article-body h3 { font-size: 18.5px; color: var(--text); margin: 1.7em 0 .7em; }
.article-body h4 { font-size: 16.5px; color: var(--text); margin: 1.4em 0 .6em; }
.article-body a { color: var(--brand); border-bottom: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.article-body a:hover { border-bottom-color: var(--brand); }
.article-body img { border-radius: var(--radius-sm); margin: 1.4em auto; box-shadow: var(--shadow); }
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: .45em; }
.article-body blockquote {
  margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2); font-size: 15.5px;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body pre {
  margin: 1.5em 0; padding: 18px 20px; border-radius: var(--radius-sm);
  background: #1d2027; color: #e6e8ec; overflow-x: auto;
  font-size: 13.5px; line-height: 1.7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.article-body code {
  background: var(--surface-2); padding: 2px 6px; border-radius: 5px;
  font-size: .9em; font-family: "SFMono-Regular", Consolas, Menlo, monospace;
}
.article-body pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14.5px;
}
.article-body th, .article-body td { border: 1px solid var(--border); padding: 10px 13px; text-align: left; }
.article-body th { background: var(--surface-2); font-weight: 600; color: var(--text); }
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* 上下篇 */
.neighbor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.neighbor a, .neighbor .none {
  display: block; padding: 15px 18px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid transparent;
  transition: all .22s; height: 100%;
}
.neighbor a:hover { border-color: var(--brand); background: var(--brand-soft); }
.neighbor .label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.neighbor .txt { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.6; }
.neighbor .none .txt { color: var(--muted); font-weight: 400; }
.neighbor .right { text-align: right; }

/* 目录 */
.toc-list { counter-reset: toc; font-size: 13.5px; }
.toc-list li { padding: 5px 0 5px 12px; border-left: 2px solid var(--border); transition: border-color .2s; }
.toc-list li:hover { border-left-color: var(--brand); }
.toc-list li.lv-2 { padding-left: 26px; font-size: 13px; }
.toc-list a {
  color: var(--text-2); display: block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.toc-list a:hover { color: var(--brand); }

/* 标签 */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a {
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
  background: var(--surface-2); color: var(--text-2); transition: all .2s;
}
.tag-list a:hover { background: var(--brand); color: #fff; transform: translateY(-1px); }

/* ================= 正文水印（后端开启时叠加） ================= */

.wm-layer {
  position: fixed; inset: -12%; z-index: 9990; pointer-events: none;
  user-select: none; -webkit-user-select: none;
  display: flex; flex-wrap: wrap; gap: 58px 78px;
  align-content: center; justify-content: center;
  transform: rotate(-20deg); opacity: .07; overflow: hidden;
}
.wm-layer span { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; }

/* ================= 模板案例 ================= */

.cases-grid {
  display: grid; gap: 22px; margin-top: 20px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.case-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.case-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 38%, var(--border));
}
.case-card:hover .case-cover { transform: scale(1.04); }
.case-card:hover .case-go { text-decoration: underline; }

.case-cover {
  /* 封面用站群模板的界面截图（16:10）：同比例 + 顶部对齐，露出站头与主视觉 */
  aspect-ratio: 16 / 10; background-size: cover; background-position: center top;
  background-color: var(--surface-2); transition: transform .45s ease;
}
.case-cover.no-img {
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800; font-family: var(--serif);
  color: var(--brand); background: var(--brand-soft);
}
.case-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.case-body h3 { font-size: 17.5px; margin-bottom: 8px; }
.case-body p {
  margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.72;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.case-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.case-go { font-size: 13px; font-weight: 600; color: var(--brand); }
.case-domain {
  margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--muted);
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ================= 分页 / 空态 / 骨架 ================= */

.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 14px; cursor: pointer; font-family: inherit; transition: all .2s;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager-info { font-size: 12.5px; color: var(--muted); margin-left: 4px; }

.empty { padding: 54px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty::before {
  content: '◌'; display: block; font-size: 34px; color: var(--border); margin-bottom: 10px;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; padding-bottom: 20px;
}
.skeleton-card .sk-cover { height: 172px; border-radius: 0; }
.sk-line { height: 13px; margin: 12px 20px 0; }

.to-top {
  position: fixed; right: 24px; bottom: 26px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 18px;
  box-shadow: 0 8px 22px rgba(255, 107, 53, .38);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .28s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* 面包屑 */
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a:hover { color: var(--brand); }
.crumb span { color: var(--border); }

/* 搜索结果高亮 */
mark { background: var(--brand-soft); color: var(--brand-deep); padding: 1px 3px; border-radius: 4px; }

/* 订阅 / 提示条 */
.notice {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px;
  border-radius: var(--radius-sm); background: var(--brand-soft);
  color: var(--brand-deep); font-size: 13.5px; margin-bottom: 20px;
}

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

.footer { margin-top: 20px; background: var(--surface); border-top: 1px solid var(--border); }
.footer-main {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px;
  padding-top: 44px; padding-bottom: 34px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.footer-brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.footer-brand strong { font-size: 16px; }
.footer h4 { font-size: 14px; margin-bottom: 13px; }
.footer ul li { font-size: 13.5px; color: var(--muted); line-height: 2.1; }
.footer ul li a { color: var(--muted); }
.footer ul li a:hover { color: var(--brand); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; border-top: 1px solid var(--border);
  padding-top: 18px; padding-bottom: 22px; font-size: 12.5px; color: var(--muted);
}

/* ================= 响应式 ================= */

@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .side { position: static; order: 2; }
  .article { padding: 28px 26px 24px; }
  .article-head h1 { font-size: 27px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .head-inner { height: 60px; gap: 12px; }
  .logo-tag { display: none; }
  .head-search { min-width: 0; flex: 1; height: 38px; padding-left: 13px; }
  .head-search button { padding: 6px 8px; }
  .lang-cur { display: none; }
  .lang-btn { height: 38px; padding: 0 10px; }
  .lang-menu { min-width: 152px; }
  .theme-toggle { width: 38px; height: 38px; }
  .nav-inner { display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; }
  .nav-inner.open { display: flex; }
  .nav-inner a { padding: 12px 16px; border-radius: 0; }
  .nav-inner a::after { display: none; }
  .nav-inner a.active { background: var(--brand-soft); }
  .nav-toggle { display: block; }

  .hero { min-height: 230px; }
  .hero-body { padding: 72px 20px 22px; }
  .hero-body h2 { font-size: 21px; }
  .hero-dots { right: 16px; bottom: 18px; }

  .posts-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card-cover { height: 156px; }

  .post-row { flex-direction: column; gap: 14px; padding: 16px; }
  .row-cover { width: 100%; height: 168px; }

  .panel { padding: 18px; border-radius: var(--radius-sm); }
  .article { padding: 22px 18px 20px; border-radius: var(--radius-sm); }
  .article-head h1 { font-size: 22px; }
  .article-body { font-size: 16px; line-height: 1.85; }
  .article-body h2 { font-size: 19.5px; }

  .neighbor { grid-template-columns: minmax(0, 1fr); }
  .neighbor .right { text-align: left; }

  .footer-main { grid-template-columns: 1fr; gap: 22px; padding-top: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .to-top { right: 16px; bottom: 18px; width: 40px; height: 40px; }
}

/* ---------------- 头部自适应（多语言后元素增多，需分级让位） ---------------- */
.logo { flex: none; }
.logo-name, .logo-sub, .menu a, .search-mini, .lang-cur { white-space: nowrap; }
.site-header .wrap { flex-wrap: nowrap; }
.menu { flex: none; }

@media (max-width: 1400px) {
  /* 第一级：收紧间距、隐藏 logo 副标题、导航紧凑 */
  .site-header .wrap { gap: 12px; }
  .logo-sub { display: none; }
  .menu { gap: 2px; }
  .menu a { padding: 8px 11px; font-size: 14px; }
  .search-mini input { width: 112px; }
}

@media (max-width: 1180px) {
  /* 第二级：收起搜索框，logo 与导航再收一档 */
  .search-mini { display: none; }
  .logo-name { font-size: 17px; }
  .menu a { padding: 8px 9px; font-size: 13.5px; }
  .lang-cur { padding: 0 9px; }
}

@media (max-width: 1000px) {
  /* 第三级：进入折叠菜单前的最后压缩 */
  .logo-name { font-size: 16px; }
  .logo-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }
  .menu a { padding: 7px 8px; font-size: 13px; }
}

/* 头部两行 ---------------- */

/* ---------------- 右上操作区顺序：搜索 → 语言切换 → 一键部署 ---------------- */
.header-actions .search-mini, .header-actions .header-search, .header-actions .head-search { order: 1; }
.header-actions .lang-switch { order: 2; }
.header-actions .sc-deploy-btn { order: 3; }
.header-actions .menu-toggle { order: 4; }
.header-search { order: 1; }
.head-search { order: 1; }
.lang-switch { order: 2; }
.sc-deploy-btn { order: 3; }

/* ---------------- 头部两行：第一行 logo + 右上操作区，第二行栏目 ---------------- */
.head-inner { flex-wrap: wrap; row-gap: 10px; height: auto; padding: 12px 0 10px; }
.head-inner .logo { order: 1; flex: none; }
.head-inner .logo-text { order: 1; }
.head-inner .head-actions { order: 2; margin-left: auto; }
.head-inner .nav, .head-inner .nav-list, .head-inner .menu { order: 3; flex-basis: 100%; width: 100%; }
.head-inner .head-search { order: 1; }
.head-inner .lang-switch { order: 2; }
.head-inner .sc-deploy-btn { order: 3; }
.head-inner .theme-toggle { order: 4; }
@media (max-width: 720px) {
  .head-inner .nav, .head-inner .nav-list, .head-inner .menu { top: 100%; }
}

/* ---------------- 栏目广告图：列表页通栏横幅（跨整页宽度，不受右侧栏限制） ---------------- */
.cat-ad-bar { display: block; }
.cat-ad { margin-top: 20px; }
.cat-ad:empty { display: none; }
.cat-ad img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.cat-ad-link { display: block; }

/* ---------------- 模板案例页：整页单列、一排 3 个（去掉右侧栏与页头卡片） ---------------- */
.layout.cases-layout { grid-template-columns: minmax(0, 1fr); }
.cases-layout .cases-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .cases-layout .cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cases-layout .cases-grid { grid-template-columns: minmax(0, 1fr); }
}

