/* components.css — 首页与内页共用的组件 */

*,
*::before,
*::after { box-sizing: border-box; }

.svg-sprite { display: none; }
.list-wrap { padding-top: 26px; }

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

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

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent-deep);
  color: #fff;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 252, .96);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand__mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--accent-deep);
}
.brand__mark svg { width: 100%; height: 100%; }
.brand__name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--accent-deep);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 14px;
}
.nav::-webkit-scrollbar { display: none; }
.nav__link {
  position: relative;
  padding: 8px 10px;
  color: var(--body);
  border-radius: var(--radius-s);
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}
.nav__link:hover { color: var(--accent-deep); background: var(--tint-soft); }
.nav__link.is-current { color: var(--accent-deep); font-weight: 700; }
.nav__link.is-current::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle::before,
.nav-toggle::after,
.nav-toggle span {
  content: "";
  display: block;
  height: 2px;
  margin: 4px auto;
  width: 18px;
  border-radius: 2px;
  background: var(--accent-deep);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background .18s ease, box-shadow .18s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(71, 129, 225, .28);
}
.btn--primary::after { content: "→"; font-weight: 400; }
.btn--primary:hover { background: #3672d6; transform: translateY(-1px); }
.btn--ghost {
  background: #fff;
  color: var(--accent-deep);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 标题组 ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.section-head__title {
  position: relative;
  padding-left: 14px;
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.section-head__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.section-head__note {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent-deep);
  background: var(--tint-soft);
  border-radius: 999px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 26px;
  background: var(--navy);
  color: #dfe7f4;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1.2fr;
  gap: 32px;
  padding: 34px 0 30px;
}
.footer__brand .brand__name { color: #fff; font-size: 18px; }
.footer__brand .brand__mark { color: #fff; }
.footer__tagline {
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: #b9c8e0;
}
.footer__beian {
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: #9fb0c9;
}
.footer__title {
  margin-bottom: 12px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--fs-xs);
  color: #c9d5e8;
}
.footer__links a:hover { color: #fff; text-decoration: underline; }
.footer__note {
  font-size: var(--fs-xs);
  line-height: 1.8;
  color: #b9c8e0;
}
.btn--top {
  margin-top: 12px;
  min-height: 34px;
  padding: 0 16px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .38);
}
.btn--top:hover { background: rgba(255, 255, 255, .12); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.breadcrumb a { color: var(--accent-deep); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb ol,
.breadcrumb ul { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }

/* ---------- 工具条（筛选/排序） ---------- */
.toolbar {
  position: sticky;
  top: 68px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  backdrop-filter: blur(6px);
}
.toolbar__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-deep);
}
label.toolbar__label[for] { cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 32px;
  padding: 0 14px;
  font-family: inherit;
  font-size: var(--fs-xs);
  color: var(--body);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: all .16s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.toolbar__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.select {
  min-height: 32px;
  padding: 0 10px;
  font-family: inherit;
  font-size: var(--fs-xs);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
}
.toolbar__count {
  font-size: var(--fs-xs);
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- 回到顶部与空状态 ---------- */
.empty-state {
  padding: 40px 0;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
}
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  :root { --fs-h1: 40px; }
  .nav { gap: 2px; font-size: 13px; }
  .nav__link { padding: 8px 7px; }
}

@media (max-width: 900px) {
  .site-header__inner { min-height: 60px; gap: 12px; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 12px 10px; font-size: 15px; }
  .nav__link.is-current::after { display: none; }
  .nav__link.is-current { background: var(--tint-soft); }
  .toolbar { top: 60px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer__note { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root {
    --fs-h1: 32px;
    --fs-h2: 18px;
    --fs-h3: 17px;
    --fs-body: 15px;
    --gutter: 18px;
  }
  .brand__name { font-size: 16px; }
  .footer__inner { grid-template-columns: 1fr; }
  .toolbar { position: static; }
  .toolbar__sort { margin-left: 0; width: 100%; }
}
