/* components.css — 公共组件：导航、按钮、卡片、标签、面板、文章 */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: var(--lh-tight); letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff; font-size: var(--fs-sm); font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- 品牌 ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-invert); }
.brand-mark { width: 30px; height: 30px; flex: none; color: var(--accent-2); }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .01em; }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: rgba(24, 25, 26, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-invert);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 100%; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav .nav-item { position: relative; display: flex; align-items: center; }
.site-nav a {
  position: relative; display: inline-block;
  padding: 10px 10px 9px; border-radius: 6px;
  color: var(--ink-invert-2); font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: color .18s ease;
}
.site-nav a:hover { color: var(--ink-invert); }
.site-nav a.is-active,
.site-nav a[aria-current="page"] { color: var(--ink-invert); font-weight: 800; }
.site-nav a.is-active::after,
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--accent-2);
}
.nav-drop {
  display: none; position: absolute; left: 0; top: 100%; z-index: 45;
  min-width: 190px; max-height: 360px; overflow-y: auto;
  padding: 8px; border-radius: 10px;
  background: rgba(28, 29, 30, 0.98);
  border: 1px solid var(--line-invert);
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, .7);
}
.nav-item.has-drop:hover .nav-drop { display: block; }
.nav-drop a { display: block; padding: 7px 10px; border-radius: 6px; font-size: 13.5px; font-weight: 600; }
.nav-drop a:hover { background: rgba(244, 244, 244, .08); color: var(--ink-invert); }
.nav-drop a::after { display: none; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--ink-invert-2); background: rgba(244, 244, 244, 0.06);
  transition: color .18s ease, background .18s ease;
}
.icon-btn:hover { color: var(--ink-invert); background: rgba(244, 244, 244, 0.13); }
.icon-btn svg { width: 17px; height: 17px; }

.nav-toggle {
  display: none; width: 36px; height: 36px; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid var(--line-invert); border-radius: 8px;
}
.nav-toggle span { display: block; width: 16px; height: 2px; margin: 3px auto; border-radius: 2px; background: var(--ink-invert); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 24px; border-radius: var(--radius-pill);
  font-size: 14.5px; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 10px 20px -14px rgba(239, 125, 33, .9); }
.btn--primary:hover { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); transform: translateY(-1px); }
.btn--ghost { color: var(--ink-invert); border-color: rgba(244, 244, 244, .34); background: rgba(20, 20, 20, .25); }
.btn--ghost:hover { border-color: var(--accent-soft); color: #fff; }

/* ---------- 小标题 ---------- */
.sec-title {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-xl); font-weight: 800; color: var(--ink);
}
.sec-title::before {
  content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--accent);
}
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sec-more { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.sec-more:hover { color: var(--accent); }
.sec-more svg { width: 13px; height: 13px; }

/* ---------- 卡片 ---------- */
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card-media { aspect-ratio: 3.55 / 1; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.cat-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.cat-card .card-media { aspect-ratio: 3.55 / 1; }
.cat-card-body { display: flex; flex: 1; flex-direction: column; padding: 13px 20px 15px; }
.cat-card-title { font-size: 21px; font-weight: 800; letter-spacing: -.005em; }
.cat-card-title a:hover { color: var(--accent-dark); }
.cat-card-sum { margin-top: 8px; font-size: 14px; line-height: 1.52; color: var(--ink-2); }
.cat-card-kw { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: auto; padding-top: 11px; }
.cat-card-kw li { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--ink-3); }
.cat-card-kw li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-soft); }
.cat-card-go {
  position: absolute; right: 16px; bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-wash); color: var(--accent);
}
.cat-card-go svg { width: 15px; height: 15px; }

/* 精选卡：更宽的图 */
.feature-card .card-media { aspect-ratio: 4 / 1; }
.feature-card .cat-card-body { padding: 14px 20px 18px; }
.feature-card .cat-card-title { font-size: 17px; line-height: 1.4; }
.feature-card .cat-card-sum { margin-top: 8px; font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-3); }

/* ---------- 面板与列表 ---------- */
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.entry-list { padding: 0 10px 10px; }
.entry-list li + li { border-top: 1px solid var(--line-2); }
.entry { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; transition: background .16s ease; }
.entry:hover { background: var(--surface-2); }
.entry-thumb { flex: none; width: 52px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.entry-thumb img { width: 100%; height: 100%; object-fit: cover; }
.entry-title { font-size: 13.5px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.entry-arrow { margin-left: auto; flex: none; color: var(--ink-3); }
.entry-arrow svg { width: 13px; height: 13px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill); background: var(--accent-wash);
  color: var(--accent-dark); font-size: var(--fs-xs); font-weight: 700;
}
.tag--quiet { background: var(--surface-2); color: var(--ink-3); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--footer); color: var(--ink-invert-2); }
.site-footer .footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 26px 40px; padding: 26px 0 18px;
}
.foot-col { flex: 1 1 180px; min-width: 168px; }
.foot-col-brand { flex: 1.6 1 260px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink-invert); font-size: 19px; font-weight: 800; }
.foot-brand .brand-mark { width: 26px; height: 26px; }
.foot-tagline { margin-top: 8px; font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-invert-3); }
.foot-label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-invert); margin-bottom: 8px; }
.foot-list { display: flex; flex-direction: column; gap: 6px; }
.foot-list a { font-size: var(--fs-sm); color: var(--ink-invert-2); }
.foot-list a:hover { color: var(--accent-soft); }
.foot-muted { font-size: var(--fs-xs); line-height: 1.6; color: var(--ink-invert-3); }
.site-footer .foot-bottom { padding: 12px 0 18px; margin-top: 4px; border-top: 1px solid var(--line-invert); }
.foot-copy { font-size: var(--fs-xs); color: var(--ink-invert-3); }
