/* 布局与页面级样式（首页 / 分类页 / 详情页共用壳层） */

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--amber); color: var(--navy-deep); padding: 10px 16px; border-radius: 0 0 8px 0; font-size: 13px; }
.skip-link:focus { left: 0; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--h-header) + 12px);
}

body {
  margin: 0;
  background: var(--paper-2);
  color: var(--ink);
  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;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
}
button {
  font: inherit;
  color: inherit;
}

.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin: 0 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 {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--navy-deep);
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip:focus {
  top: 12px;
}

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

/* ============ 顶栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--h-header);
  background: var(--navy);
  color: var(--on-navy);
  border-bottom: 1px solid rgba(243, 237, 227, 0.14);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.brand svg {
  width: 24px;
  height: 24px;
  color: var(--amber);
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  font-size: var(--fs-small);
}
.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--on-navy);
  opacity: 0.82;
  white-space: nowrap;
}
.nav a:hover {
  opacity: 1;
}
.nav a.active {
  opacity: 1;
  font-weight: 700;
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}
.nav-toggle {
  display: none;
  flex: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(243, 237, 227, 0.3);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle:hover {
  background: rgba(243, 237, 227, 0.12);
}
.nav-toggle svg {
  width: 18px;
  height: 18px;
}
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-width: 0;
  width: 216px;
  height: 34px;
  padding: 0 6px 0 12px;
  background: rgba(243, 237, 227, 0.1);
  border: 1px solid rgba(243, 237, 227, 0.22);
  border-radius: var(--r-pill);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--on-navy);
  font-size: var(--fs-small);
  outline: none;
}
.search input::placeholder {
  color: rgba(243, 237, 227, 0.6);
}
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--amber);
  color: var(--navy-deep);
  font-size: var(--fs-micro);
  font-weight: 700;
  cursor: pointer;
}
.search-btn svg {
  width: 12px;
  height: 12px;
}

/* ============ 首屏 ============ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 380px at 82% 8%, rgba(60, 78, 133, 0.14), transparent 60%),
    radial-gradient(560px 320px at 6% 92%, rgba(242, 193, 99, 0.22), transparent 62%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  align-items: center;
  padding: 26px 0 24px;
}
.eyebrow {
  display: inline-block;
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
  margin-bottom: 12px;
}
.hero h1 .hl {
  color: var(--navy-soft);
}
.lede {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 60ch;
  margin-bottom: 18px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.hero-stats {
  display: flex;
  gap: 26px;
  font-size: var(--fs-small);
  color: var(--ink-2);
}
.hero-stats li {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.hero-stats strong {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 20px;
  line-height: 1;
  color: var(--navy);
}
.hero-media {
  position: relative;
}
.hero-media img {
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 18px;
  border: 8px solid #fffaf1;
  box-shadow: var(--shadow-lift);
}
.hero-badge {
  position: absolute;
  left: -14px;
  bottom: 18px;
  padding: 8px 14px;
  background: var(--navy);
  color: var(--on-navy);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

/* ============ 通用区块 ============ */
.section {
  padding: var(--sec-y) 0;
}
.section-alt {
  background: var(--paper-3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ============ 分类目录 ============ */
.topics {
  padding: var(--sec-y) 0 calc(var(--sec-y) - 2px);
}

/* ============ 版本速查 ============ */
.version-table .vtable {
  margin-top: 2px;
}

/* ============ 编辑推荐 ============ */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pick {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
  padding: 6px;
}
.pick .thumb,
.pick .pick-body,
.latest-item .thumb,
.latest-body {
  min-width: 0;
}
.pick .thumb {
  width: 92px;
  align-self: center;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}
.pick-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px 2px 2px 0;
}
.pick-body h3 {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-body p {
  font-size: var(--fs-micro);
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-body .tag {
  align-self: flex-start;
}

/* ============ 最新更新 ============ */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
}
.latest-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 66px;
  gap: 8px;
  align-items: center;
  padding: 3px 8px 3px 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.latest-item:hover {
  transform: translateX(2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}
.latest-item .thumb {
  width: 38px;
  aspect-ratio: 1 / 1;
  border-radius: 7px;
}
.latest-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.latest-body h3 {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.latest-body .tag {
  align-self: flex-start;
}
.latest-item time {
  justify-self: end;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-micro);
  color: var(--ink-3);
}

/* ============ 买前核对 ============ */
.checklist .sec-head {
  align-items: flex-start;
}

/* ============ 渠道 ============ */
.platform-strip .channel-list {
  margin-top: 2px;
}

/* ============ FAQ ============ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
  border-top: 1px solid var(--line);
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .topic-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .channel-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .channel:nth-child(3n) {
    border-right: 0;
  }
  .channel:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
  }
  .nav {
    gap: 14px;
  }
  .search {
    width: 176px;
  }
}

@media (max-width: 860px) {
  .site-header { height: auto; }
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding-top: 10px;
    padding-bottom: 8px;
  }
  .nav-toggle { display: none !important; }
  .nav {
    position: static;
    display: flex;
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    padding: 0;
    background: none;
    border: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    max-height: none;
    overflow: visible;
  }
  .nav a { padding: 4px 0; border-bottom: 0; }
  .filter-bar { position: static; }
  .footer-grid { flex-direction: column; }
  .footer-grid > * { flex: 1 1 auto; width: 100%; min-width: 0; }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 26px 0 28px;
  }
  .hero-media {
    display: none;
  }
  .latest-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pick-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .check-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 640px) {
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .channel-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .channel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .channel:nth-child(2n) {
    border-right: 0;
  }
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .hero-stats {
    flex-wrap: wrap;
    gap: 10px 20px;
  }
  .vtable {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .latest-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .latest-item time {
    display: none;
  }
  .footer-copy {
    flex-direction: column;
    gap: 6px;
  }
}

/* ============ 内页布局（环节 6 新增） ============ */
.page-hero {
  background:
    radial-gradient(760px 300px at 88% 0%, rgba(60, 78, 133, 0.1), transparent 62%),
    var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 26px 0 24px;
}
.page-hero h1 {
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy-deep);
  margin-bottom: 10px;
}
.page-lede {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-2);
  max-width: 76ch;
}
.page-body {
  padding: 26px 0 30px;
}
.list-layout {
  display: grid;
  gap: 26px;
}
.list-desc-wrap {
  margin-top: 4px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 44px;
  align-items: start;
  padding: 26px 0 34px;
}
.detail-main {
  min-width: 0;
}
.detail-side {
  min-width: 0;
}
.detail-side .related {
  margin-top: 16px;
  padding-top: 0;
  border-top: 0;
}
.detail-side .related h2 {
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}

@media (max-width: 1023px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .detail-side {
    display: contents;
  }
  .toc {
    position: static;
    order: -2;
  }
  .detail-side .related {
    order: 2;
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .filter-inner {
    gap: 8px;
  }
  .filter-label {
    width: 100%;
  }
  .filter-sort {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .filter-sort .filter-label { width: auto; }
  .filter-count { white-space: nowrap; margin-left: auto; }
  .article-body p {
    font-size: 14.5px;
  }
}
