/* ============================================================
   云栈资源 · 样式表
   结构：变量 / 基础 / 头部 / 首页 / 卡片 / 侧栏 / 详情页 / 组件 / 响应式
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  --bg: #f4f6fb;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-2: #fafbff;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #8b94a7;
  --line: #e6e9f2;
  --line-strong: #d4d9e8;
  --brand: #3455f0;
  --brand-2: #6d8bff;
  --brand-soft: #edf1ff;
  --accent: #ff7a45;
  --ok: #0f9d58;
  --warn: #d97706;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 20px;

  --shadow-s: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow: 0 6px 24px -8px rgba(17, 24, 39, .12), 0 2px 6px -2px rgba(17, 24, 39, .06);
  --shadow-l: 0 24px 60px -24px rgba(17, 24, 39, .28);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --header-h: 66px;
  --container: 1220px;
}

html[data-theme="dark"] {
  --bg: #0c1019;
  --bg-soft: #101725;
  --surface: #141b29;
  --surface-2: #17202f;
  --ink: #eef2fa;
  --ink-2: #aab5c9;
  --ink-3: #758199;
  --line: #232c3d;
  --line-strong: #2f3a4f;
  --brand: #7c96ff;
  --brand-2: #9db0ff;
  --brand-soft: #1a2440;
  --accent: #ff9366;
  --ok: #34d399;
  --warn: #fbbf24;

  --shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 8px 28px -12px rgba(0, 0, 0, .6);
  --shadow-l: 0 30px 70px -30px rgba(0, 0, 0, .8);
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 30rem at 12% -8%, rgba(52, 85, 240, .10), transparent 60%),
    radial-gradient(48rem 26rem at 92% 2%, rgba(109, 139, 255, .10), transparent 62%);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(60rem 30rem at 12% -8%, rgba(60, 90, 200, .18), transparent 60%),
    radial-gradient(48rem 26rem at 92% 2%, rgba(90, 60, 180, .16), transparent 62%);
}

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
img { max-width: 100%; display: block; }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(52, 85, 240, .18); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.14em;
}

.ic--filled { fill: currentColor; stroke: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header { background: var(--surface); }
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--brand), #6b3df0 55%, #a855f7);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0;
  box-shadow: 0 6px 16px -6px rgba(52, 85, 240, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .04em; }
.brand-en { font-size: 9.5px; letter-spacing: .26em; color: var(--ink-3); font-weight: 600; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14.5px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .18s, background .18s;
}

.main-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.main-nav a.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  width: 210px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  transition: border-color .18s, box-shadow .18s, width .22s, background .18s;
}

.header-search:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px var(--brand-soft);
  width: 250px;
  background: var(--surface);
}

.header-search .ic { color: var(--ink-3); }
.header-search input {
  border: 0; outline: 0; background: none; width: 100%; font-size: 14px;
}
.header-search input::placeholder { color: var(--ink-3); }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: color .18s, border-color .18s, background .18s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand-2); background: var(--brand-soft); }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn--ghost { border-color: transparent; background: none; }

.nav-toggle { display: none; }

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 0 14px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 10px 4px;
  font-size: 15px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a.is-active { color: var(--brand); font-weight: 600; }

/* ---------- 4. 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 54px 0 40px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.22;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand), #7c3aed 60%, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 560px;
  margin-bottom: 24px;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 8px 0 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: var(--shadow);
  max-width: 600px;
  transition: box-shadow .2s, border-color .2s;
}
.hero-search:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow);
}
.hero-search .ic { width: 20px; height: 20px; color: var(--ink-3); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15.5px; }
.hero-search input::placeholder { color: var(--ink-3); }
.hero-search button {
  height: 40px;
  padding: 0 20px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #5b3df0);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 8px 18px -8px rgba(52, 85, 240, .8);
  transition: transform .16s, box-shadow .16s;
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(52, 85, 240, .85); }
.hero-search button:active { transform: translateY(0); }

.hero-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
}
.hero-tags .label { color: var(--ink-3); }
.hero-tags a {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all .18s;
}
.hero-tags a:hover {
  color: var(--brand);
  border-color: var(--brand-2);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}
.hero-stats .stat { text-align: center; padding: 2px 0; }
.hero-stats .stat + .stat { border-left: 1px dashed var(--line-strong); }
.hero-stats b {
  display: block;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: 12px; color: var(--ink-3); }
.hero-note {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 7px;
}
.hero-note .ic { color: var(--ok); }

/* ---------- 5. 主体布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  align-items: start;
  padding-bottom: 70px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-head h2 .bar {
  width: 4px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), #7c3aed);
}
.section-head .sub { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 2px; }

/* 分类胶囊 */
.cat-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: nowrap;
  transition: all .18s;
}
.cat-chip:hover { border-color: var(--brand-2); color: var(--brand); }
.cat-chip .cnt { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cat-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 600;
}
html[data-theme="dark"] .cat-chip.is-active { background: var(--brand); border-color: var(--brand); color: #0b1020; }
.cat-chip.is-active .cnt { color: rgba(255, 255, 255, .6); }
html[data-theme="dark"] .cat-chip.is-active .cnt { color: rgba(0, 0, 0, .45); }

/* 工具条 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.result-info { font-size: 13px; color: var(--ink-3); }
.result-info b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.sorts { display: flex; gap: 4px; padding: 3px; background: var(--bg-soft); border-radius: 10px; }
.sorts button {
  padding: 5px 13px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: all .18s;
}
.sorts button:hover { color: var(--ink); }
.sorts button.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-s);
}

/* ---------- 6. 资源卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s, border-color .22s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.card-cover .cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.card-cover .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .34), transparent 42%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 9px);
  mix-blend-mode: soft-light;
}
.card:hover .card-cover .cover { transform: scale(1.045); }

.cover-glyph {
  position: relative;
  z-index: 1;
  font-size: clamp(38px, 15cqw, 64px);
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  letter-spacing: .06em;
  text-shadow: 0 6px 26px rgba(0, 0, 0, .28);
  line-height: 1;
  padding-left: .06em;
}
.cover-glyph--sm { font-size: 40px; letter-spacing: .02em; }

.cover-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  height: 23px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(10, 14, 24, .42);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  letter-spacing: .02em;
}

.cover-hot {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 10px;
  height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ff5c3a, #ff8a3d);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 4px 12px -4px rgba(255, 92, 58, .7);
}
.cover-hot .ic { width: 11px; height: 11px; }

.card-body {
  padding: 14px 15px 13px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 7px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.84em;
}
.card-title a { transition: color .16s; }
.card:hover .card-title a { color: var(--brand); }

.card-sub { font-size: 12.5px; color: var(--ink-3); }

.card-excerpt {
  font-size: 12.8px;
  line-height: 1.62;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
}
.meta-chip .ic { width: 11px; height: 11px; }
.meta-chip--disk { color: var(--ink-2); font-weight: 500; }
.meta-chip--disk .disk-dot {
  width: 5px; height: 5px; border-radius: 50%;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.8px;
  color: var(--ink-3);
}
.card-stats { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.card-stats span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.card-foot > span { white-space: nowrap; }
.card-stats .ic { width: 12px; height: 12px; }

.fav-btn {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: color .18s, background .18s, transform .18s;
}
.fav-btn:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fav-btn.is-on { color: var(--accent); }
.fav-btn.is-on .ic { fill: currentColor; stroke: currentColor; }
.fav-btn .ic { width: 15px; height: 15px; }
.fav-btn:active { transform: scale(.88); }

/* 空状态 */
.empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty .ic { width: 34px; height: 34px; margin-bottom: 12px; opacity: .5; }
.empty h3 { font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }
.empty p { font-size: 13.5px; margin: 0; }

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.pagination button,
.pagination span {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .16s;
  font-variant-numeric: tabular-nums;
}
.pagination button:hover:not(:disabled) { border-color: var(--brand-2); color: var(--brand); }
.pagination button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 600;
}
html[data-theme="dark"] .pagination button.is-active { background: var(--brand); border-color: var(--brand); color: #0b1020; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination .ellipsis { border: 0; background: none; }

/* ---------- 7. 侧栏 ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.panel-head h3 {
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.panel-head h3 .ic { color: var(--brand); }
.panel-head .more { font-size: 12px; color: var(--ink-3); }
.panel-head .more:hover { color: var(--brand); }

.cat-links { display: flex; flex-direction: column; gap: 2px; }
.cat-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 8px; border-radius: 8px;
  font-size: 13px; color: var(--ink-2);
  transition: background .16s, color .16s;
}
.cat-links a:hover { background: var(--surface-2); color: var(--brand); }
.cat-links .n { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.notice-panel {
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%);
  border-color: color-mix(in srgb, var(--brand) 20%, var(--line));
}
.notice-list { display: flex; flex-direction: column; gap: 9px; }
.notice-list li {
  font-size: 12.8px;
  color: var(--ink-2);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}
.notice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-2);
}

.rank-list { display: flex; flex-direction: column; gap: 2px; counter-reset: rank; }
.rank-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  transition: background .16s;
}
.rank-item:hover { background: var(--surface-2); }
.rank-no {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--bg-soft);
  font-variant-numeric: tabular-nums;
}
.rank-item:nth-child(1) .rank-no { background: linear-gradient(135deg, #ff5c3a, #ff8a3d); color: #fff; }
.rank-item:nth-child(2) .rank-no { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; }
.rank-item:nth-child(3) .rank-no { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.rank-body { min-width: 0; }
.rank-title {
  font-size: 13.2px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .16s;
}
.rank-item:hover .rank-title { color: var(--brand); }
.rank-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.3px;
  color: var(--ink-2);
  transition: all .16s;
}
.tag-cloud a:hover { color: var(--brand); border-color: var(--brand-2); background: var(--brand-soft); }
.tag-cloud a .cnt { font-size: 10.5px; color: var(--ink-3); }


/* ---------- 8. 详情页 ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-3);
  padding: 26px 0 18px;
  flex-wrap: wrap;
}
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { opacity: .55; }
.crumbs .current { color: var(--ink-2); }

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 40px;
  align-items: start;
  padding-bottom: 70px;
}

.article-head { margin-bottom: 24px; }
.article-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.article-head h1 {
  font-size: clamp(24px, 2.9vw, 33px);
  line-height: 1.32;
  letter-spacing: -.025em;
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.article-meta span { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.article-meta .author { color: var(--ink-2); font-weight: 600; }

.article-body { font-size: 15.2px; line-height: 1.95; color: var(--ink-2); }
.article-body h2 {
  font-size: 19px;
  color: var(--ink);
  margin: 34px 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  scroll-margin-top: 90px;
}
.article-body h2 .idx {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 3px 7px;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.article-body p { margin-bottom: 1.1em; }
.article-body strong { color: var(--ink); font-weight: 700; }

.lead-quote {
  padding: 16px 20px;
  border-left: 3px solid var(--brand);
  background: var(--surface-2);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--ink-2);
  font-size: 14.8px;
  line-height: 1.85;
  margin-bottom: 22px;
}

.highlight-list { display: grid; gap: 10px; margin: 0 0 6px; }
.highlight-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
}
.highlight-list .ic {
  width: 17px; height: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--ok), #22c55e);
  border-radius: 50%;
  padding: 3px;
  stroke-width: 2.6;
  margin-top: 2px;
  flex: none;
}

/* 资源信息表 */
.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 6px;
}
.info-table th,
.info-table td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--line); }
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: 0; }
.info-table th {
  width: 104px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface-2);
  font-size: 13px;
  white-space: nowrap;
}
.info-table td { color: var(--ink); }
.info-table td .mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.mono { font-family: var(--mono); font-size: .95em; letter-spacing: .02em; }
.badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
}
.badge-ok .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* 下载卡片 */
.download-card {
  margin: 26px 0 8px;
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--line));
  border-radius: var(--radius-l);
  background:
    radial-gradient(38rem 16rem at 100% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 62%),
    var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}
.download-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.disk-logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  flex: none;
  letter-spacing: .02em;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.download-top .dl-title { flex: 1; min-width: 160px; }
.download-top .dl-title b { display: block; font-size: 15.5px; margin-bottom: 3px; }
.download-top .dl-title span { font-size: 12.8px; color: var(--ink-3); }

.dl-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s, color .16s;
  white-space: nowrap;
}
.btn .ic { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #5b3df0);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(52, 85, 240, .9);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(52, 85, 240, .95); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand); background: var(--brand-soft); }

.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn-sm .ic { width: 14px; height: 14px; }

.code-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  margin-top: 14px;
  flex-wrap: wrap;
}
.code-strip .label { font-size: 12.5px; color: var(--ink-3); }
.code-strip .code {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 10px;
  cursor: pointer;
  transition: border-color .16s, color .16s;
}
.code-strip .code:hover { border-color: var(--brand-2); color: var(--brand); }
.code-strip .hint { font-size: 12px; color: var(--ink-3); margin-left: auto; }

.dl-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.65;
}
.dl-tip .ic { color: var(--warn); margin-top: 3px; }

/* 标签行 */
.tag-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 22px 0 0; }
.tag-row .label { font-size: 13px; color: var(--ink-3); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 500;
  transition: all .16s;
}
.tag:hover { background: var(--brand); color: #fff; }

/* 声明块 */
.disclaimer {
  margin-top: 30px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.8px;
  line-height: 1.75;
  color: var(--ink-3);
}
.disclaimer b { color: var(--ink-2); display: block; margin-bottom: 5px; font-size: 13px; }

/* 相关推荐 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.mini-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--brand) 26%, var(--line));
}
.mini-cover { aspect-ratio: 16 / 9; display: grid; place-items: center; position: relative; }
.mini-cover .cover-glyph { font-size: 26px; }
.mini-body { padding: 9px 11px 11px; }
.mini-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.mini-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

/* 详情侧栏 */
.detail-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + 20px); }
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.side-cover {
  border-radius: 10px;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.side-cover .cover-glyph { font-size: 46px; }
.side-list { display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.side-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-list .k { color: var(--ink-3); }
.side-list .v { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.side-actions { display: flex; gap: 8px; margin-top: 14px; }
.side-actions .btn { flex: 1; height: 40px; font-size: 13.5px; }

/* ---------- 9. 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 46px 0 30px;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 32px;
}
.footer-brand p { font-size: 13px; color: var(--ink-3); line-height: 1.75; margin: 12px 0 0; max-width: 320px; }
.footer-col h4 { font-size: 13.5px; margin-bottom: 12px; color: var(--ink); }
.footer-col a { display: block; font-size: 13px; color: var(--ink-3); padding: 4px 0; transition: color .16s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}
.footer-bottom .links { display: flex; gap: 16px; }

/* ---------- 10. 组件：弹窗 / Toast / 返回顶部 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 14, 25, .5);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s, visibility .22s;
}
.modal-mask.is-open { opacity: 1; visibility: visible; }
.modal {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  padding: 26px;
  transform: translateY(10px) scale(.98);
  transition: transform .24s cubic-bezier(.2, .8, .3, 1);
  text-align: center;
}
.modal-mask.is-open .modal { transform: none; }
.modal .disk-logo { margin: 0 auto 14px; width: 54px; height: 54px; border-radius: 15px; font-size: 17px; }
.modal h3 { font-size: 17px; margin-bottom: 8px; }
.modal p { font-size: 13.5px; color: var(--ink-3); line-height: 1.7; margin-bottom: 20px; }
.modal .countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); }
.modal-actions { display: flex; flex-direction: column; gap: 9px; }
.modal-actions .btn { width: 100%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 16px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-l);
  opacity: 0;
  visibility: hidden;
  transition: all .24s cubic-bezier(.2, .8, .3, 1);
  max-width: calc(100vw - 40px);
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.to-top {
  position: fixed;
  right: 26px;
  bottom: 30px;
  z-index: 40;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .22s;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--brand); border-color: var(--brand-2); }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .nav-toggle { display: grid; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .layout, .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sidebar, .detail-side { position: static; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .container { padding: 0 16px; }
  .header-search { display: none; }
  .hero { padding: 34px 0 26px; }
  .hero h1 { font-size: 26px; }
  .hero-search { height: 48px; padding-left: 14px; }
  .hero-search button { height: 36px; padding: 0 14px; font-size: 13.5px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 11px 12px 11px; }
  .card-title { font-size: 13.8px; }
  .card-excerpt { display: none; }
  .card-sub { font-size: 11.5px; }
  .card-foot { font-size: 11px; }
  .card-stats span:first-child { display: none; }
  .sidebar { grid-template-columns: 1fr; }
  .article-body { font-size: 14.6px; line-height: 1.9; }
  .download-card { padding: 16px; }
  .dl-actions { width: 100%; }
  .dl-actions .btn { flex: 1; }
  .info-table th { width: 82px; padding: 10px 12px; font-size: 12.5px; }
  .info-table td { padding: 10px 12px; font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .to-top { right: 14px; bottom: 16px; }
  .breadcrumbs { padding-top: 18px; }
}

@media (max-width: 380px) {
  .card-grid { grid-template-columns: 1fr; }
  .card-excerpt { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   布局模板
   同一份 HTML，四套骨架：classic（默认）/ magazine / list / minimal
   规则只在桌面端生效，移动端沿用原有响应式，避免结构塌掉
   ============================================================ */

@media (min-width: 761px) {

  /* ---------- magazine：居中大标题 + 双列大卡 + 无侧栏 ---------- */
  body[data-layout="magazine"] .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 26px;
  }
  body[data-layout="magazine"] .hero {
    padding-top: 12px;
  }
  body[data-layout="magazine"] .hero h1 {
    font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
    font-size: clamp(34px, 4.6vw, 54px);
    line-height: 1.22;
    letter-spacing: -.01em;
  }
  body[data-layout="magazine"] .hero p.lead {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
  }
  body[data-layout="magazine"] .hero-search {
    width: min(560px, 100%);
    margin: 0 auto;
  }
  body[data-layout="magazine"] .hero-tags {
    justify-content: center;
  }
  body[data-layout="magazine"] .hero-stats {
    display: none;
  }
  body[data-layout="magazine"] .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  body[data-layout="magazine"] .sidebar {
    display: none;
  }
  body[data-layout="magazine"] .section-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
  }
  body[data-layout="magazine"] .cat-row {
    justify-content: center;
  }
  body[data-layout="magazine"] .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 26px;
  }
  body[data-layout="magazine"] .card-cover {
    aspect-ratio: 16 / 9;
  }
  body[data-layout="magazine"] .card-title {
    font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
    font-size: 21px;
    line-height: 1.35;
  }
  body[data-layout="magazine"] .card-excerpt {
    -webkit-line-clamp: 3;
  }

  /* ---------- list：横向条目 + 高密度 ---------- */
  body[data-layout="list"] .hero-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 26px;
    padding-top: 8px;
    padding-bottom: 24px;
  }
  body[data-layout="list"] .hero h1 {
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.3;
  }
  body[data-layout="list"] .hero p.lead {
    font-size: 14px;
    max-width: 620px;
  }
  body[data-layout="list"] .hero-tags {
    display: none;
  }
  body[data-layout="list"] .hero-stats .stat-num {
    font-size: 24px;
  }
  body[data-layout="list"] .card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  body[data-layout="list"] .card {
    flex-direction: row;
    align-items: stretch;
  }
  body[data-layout="list"] .card-cover {
    width: 190px;
    flex: none;
    aspect-ratio: auto;
    min-height: 138px;
  }
  body[data-layout="list"] .card-cover .cover-glyph {
    font-size: 46px;
  }
  body[data-layout="list"] .card-body {
    flex: 1;
    min-width: 0;
    padding: 14px 20px 12px;
    gap: 6px;
  }
  body[data-layout="list"] .card-title {
    font-size: 16px;
    line-height: 1.4;
  }
  body[data-layout="list"] .card-excerpt {
    -webkit-line-clamp: 2;
    font-size: 12.5px;
  }
  body[data-layout="list"] .card-foot {
    margin-top: auto;
  }
  body[data-layout="list"] .card:hover {
    transform: translateY(-1px);
  }

  /* ---------- minimal：极简 + 四列密排 ---------- */
  body[data-layout="minimal"] .hero {
    padding: 62px 0 36px;
    background: none;
    border-bottom: 0;
  }
  body[data-layout="minimal"] .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 18px;
  }
  body[data-layout="minimal"] .hero-eyebrow {
    display: none;
  }
  body[data-layout="minimal"] .hero h1 {
    font-size: clamp(24px, 2.4vw, 30px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -.01em;
  }
  body[data-layout="minimal"] .hero h1 em {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: inherit;
    font-style: normal;
    border-bottom: 2px solid var(--brand);
  }
  body[data-layout="minimal"] .hero p.lead {
    max-width: 520px;
    margin: 0 auto;
    font-size: 13.5px;
    color: var(--ink-3);
  }
  body[data-layout="minimal"] .hero-search {
    width: min(480px, 100%);
    margin: 4px auto 0;
    box-shadow: none;
  }
  body[data-layout="minimal"] .hero-tags,
  body[data-layout="minimal"] .hero-stats {
    display: none;
  }
  body[data-layout="minimal"] .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  body[data-layout="minimal"] .sidebar {
    display: none;
  }
  body[data-layout="minimal"] .section-head {
    margin-bottom: 12px;
  }
  body[data-layout="minimal"] .section-head h2 {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
  }
  body[data-layout="minimal"] .toolbar {
    border-bottom: 0;
    margin-bottom: 14px;
  }
  body[data-layout="minimal"] .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  body[data-layout="minimal"] .card {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
  body[data-layout="minimal"] .card:hover {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow-s);
  }
  body[data-layout="minimal"] .card-cover {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
  }
  body[data-layout="minimal"] .card-cover .cover-glyph {
    font-size: 40px;
    opacity: .85;
  }
  body[data-layout="minimal"] .card-body {
    padding: 9px 2px 4px;
    gap: 3px;
  }
  body[data-layout="minimal"] .card-title {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  body[data-layout="minimal"] .card-sub,
  body[data-layout="minimal"] .card-excerpt,
  body[data-layout="minimal"] .card-meta,
  body[data-layout="minimal"] .cover-hot {
    display: none;
  }
  body[data-layout="minimal"] .card-foot {
    padding: 0;
    border: 0;
    font-size: 11px;
  }
  body[data-layout="minimal"] .cover-badge {
    font-size: 10px;
    padding: 1px 6px;
    opacity: .9;
  }
}

/* ============================================================
   详情页布局：跟首页模板配套，四种骨架
   ============================================================ */
@media (min-width: 761px) {

  /* magazine：通栏居中 + 无侧栏 + 衬线标题 */
  body[data-layout="magazine"] .crumbs { display: none; }
  body[data-layout="magazine"] .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 34px;
  }
  body[data-layout="magazine"] .detail-side { display: none; }
  body[data-layout="magazine"] .article-head {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 28px;
  }
  body[data-layout="magazine"] .article-head h1 {
    font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.28;
    letter-spacing: -.015em;
  }
  body[data-layout="magazine"] .article-meta {
    justify-content: center;
    border-bottom: 0;
    padding-bottom: 0;
  }
  body[data-layout="magazine"] .article-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 2;
  }
  body[data-layout="magazine"] .lead-quote {
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: none;
    text-align: center;
    font-size: 16.5px;
    padding: 20px 0;
    margin-bottom: 34px;
  }

  /* minimal：窄栏极简 + 无侧栏 */
  body[data-layout="minimal"] .crumbs { display: none; }
  body[data-layout="minimal"] .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 30px;
  }
  body[data-layout="minimal"] .detail-side { display: none; }
  body[data-layout="minimal"] .article-head {
    max-width: 680px;
    margin: 0 auto 20px;
  }
  body[data-layout="minimal"] .article-cat { display: none; }
  body[data-layout="minimal"] .article-head h1 {
    font-size: 23px;
    font-weight: 500;
    line-height: 1.4;
  }
  body[data-layout="minimal"] .article-meta {
    font-size: 12px;
    padding-bottom: 14px;
  }
  body[data-layout="minimal"] .article-body {
    max-width: 680px;
    margin: 0 auto;
    font-size: 14.6px;
    line-height: 1.9;
  }
  body[data-layout="minimal"] .lead-quote { display: none; }
  body[data-layout="minimal"] .article-body h2 { font-size: 15px; margin-top: 30px; }

  /* list：左侧信息栏 + 右侧正文，文档站风格 */
  body[data-layout="list"] .detail-layout {
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 34px;
  }
  body[data-layout="list"] .detail-side {
    order: -1;
    top: calc(var(--header-h) + 16px);
  }
  body[data-layout="list"] .article-head { margin-bottom: 16px; }
  body[data-layout="list"] .article-cat { margin-bottom: 8px; }
  body[data-layout="list"] .article-head h1 { font-size: 23px; }
  body[data-layout="list"] .article-meta { padding-bottom: 14px; font-size: 12.5px; }
  body[data-layout="list"] .article-body {
    max-width: 820px;
    font-size: 14.4px;
    line-height: 1.78;
  }
  body[data-layout="list"] .article-body h2 {
    font-size: 15px;
    margin-top: 26px;
    padding-bottom: 7px;
  }
  body[data-layout="list"] .article-body h2 .idx { font-size: 11px; }
  body[data-layout="list"] .lead-quote {
    font-size: 13.5px;
    padding: 11px 15px;
    margin-bottom: 16px;
  }
  body[data-layout="list"] .crumbs { margin-bottom: 10px; }
}
