/* ==========================================================================
   站点自定义样式
   基础排版来自 GitHub Pages 的 primer 主题（/assets/css/style.css），
   这里只补导航、卡片、面包屑、推广区块这些主题没有的组件。
   ========================================================================== */

:root {
  --site-fg: #1f2328;
  --site-muted: #59636e;
  --site-line: #d1d9e0;
  --site-bg-soft: #f6f8fa;
  --site-accent: #0969da;
  --site-warn-bg: #fff8e6;
  --site-warn-line: #e3c76b;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  border-bottom: 1px solid var(--site-line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
}

.site-nav__brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--site-fg);
  text-decoration: none;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-nav__list a {
  color: var(--site-muted);
  text-decoration: none;
  font-size: 14px;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current] {
  color: var(--site-accent);
}

.site-nav__list a[aria-current] {
  font-weight: 600;
}

/* ---------- 面包屑 ---------- */

.crumbs {
  font-size: 13px;
  color: var(--site-muted);
  margin-bottom: 20px;
}

.crumbs a {
  color: var(--site-muted);
}

.crumbs__sep {
  margin: 0 6px;
  color: var(--site-line);
}

/* ---------- 首页 ---------- */

.hero {
  border-bottom: 1px solid var(--site-line);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.hero__title {
  margin-bottom: 10px !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.hero__lead {
  font-size: 16px;
  color: var(--site-muted);
  line-height: 1.75;
}

.section-title {
  margin-top: 34px !important;
  font-size: 19px;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0 8px;
}

.vcard {
  display: block;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--site-fg);
  background: #fff;
}

/* 品牌卡整卡可点（卡内没有嵌套链接） */
.brand-card {
  display: block;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--site-fg);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  background: #fff;
}

.brand-card:hover {
  border-color: var(--site-accent);
  box-shadow: 0 2px 10px rgba(9, 105, 218, .12);
  transform: translateY(-1px);
  text-decoration: none;
}

.vcard__icon {
  font-size: 20px;
}

.vcard__name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin: 6px 0 2px;
  text-decoration: none;
}

.vcard__name:hover {
  text-decoration: underline;
}

.vcard__title {
  display: block;
  font-size: 14px;
  color: var(--site-fg);
  margin-bottom: 6px;
}

.vcard__text {
  display: block;
  font-size: 13px;
  color: var(--site-muted);
  line-height: 1.7;
}

.vcard__brands {
  display: block;
  font-size: 12px;
  color: var(--site-muted);
  margin-top: 8px;
}

.vcard__more {
  display: block;
  font-size: 13px;
  color: var(--site-accent);
  margin-top: 10px;
}

/* 品牌卡片 */

.brand-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-card__name {
  font-size: 16px;
}

.brand-card__badge {
  font-size: 11px;
  line-height: 1.6;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--site-bg-soft);
  border: 1px solid var(--site-line);
  color: var(--site-muted);
}

.brand-card__tagline {
  display: block;
  font-size: 13px;
  color: var(--site-accent);
  margin: 8px 0 6px;
}

.brand-card__text {
  display: block;
  font-size: 13px;
  color: var(--site-muted);
  line-height: 1.7;
}

/* 快捷入口 */

.quick-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.quick-list__item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 4px 14px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--site-bg-soft);
  font-size: 14px;
}

.quick-list__scene {
  color: var(--site-muted);
  font-size: 13px;
}

.quick-list__q {
  color: var(--site-fg);
}

.quick-list__a {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .quick-list__item {
    grid-template-columns: 1fr;
  }
}

/* 最新更新 / 链接列表 */

.recent-list,
.link-list {
  margin: 14px 0 0;
  padding-left: 20px;
}

.recent-list li,
.link-list li {
  margin-bottom: 8px;
  font-size: 14px;
}

.recent-list__date {
  color: var(--site-muted);
  font-size: 12px;
  margin-left: 8px;
}

/* ---------- 品牌页 ---------- */

.brand__lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--site-muted);
}

.brand__price {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 14px 0 10px;
}

.brand__price th,
.brand__price td {
  border: 1px solid var(--site-line);
  padding: 8px 12px;
  text-align: left;
}

.brand__price th {
  background: var(--site-bg-soft);
  font-weight: 600;
}

.brand__meta {
  font-size: 12.5px;
  color: var(--site-muted);
}

.brand__highlights {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
}

.brand__fit,
.brand__caveat {
  font-size: 14px;
  line-height: 1.8;
}

.brand__caveat {
  background: var(--site-warn-bg);
  border-left: 3px solid var(--site-warn-line);
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
}

/* ---------- 推广区块 ---------- */

.aff-cta {
  border: 1px solid var(--site-line);
  border-radius: 8px;
  background: var(--site-bg-soft);
  padding: 16px 18px;
  margin: 26px 0;
}

.aff-cta__label {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 12px !important;
}

.aff-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
}

.aff-cta__button {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  background: var(--site-accent);
  color: #fff !important;
  font-size: 14px;
  text-decoration: none;
}

.aff-cta__button:hover {
  background: #0757b3;
  text-decoration: none;
}

.aff-cta__link {
  font-size: 13.5px;
}

.aff-cta__note {
  font-size: 12.5px;
  color: var(--site-muted);
  line-height: 1.75;
  margin: 12px 0 0 !important;
}

/* ---------- FAQ ---------- */

.faq {
  margin: 14px 0 0;
}

.faq__item {
  border-bottom: 1px solid var(--site-line);
  padding: 12px 0;
}

.faq__q {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

.faq__a {
  font-size: 14px;
  line-height: 1.85;
  color: var(--site-fg);
  padding-top: 8px;
}

.faq__a > :first-child {
  margin-top: 0;
}

.faq__a > :last-child {
  margin-bottom: 0;
}

/* ---------- 相关阅读 ---------- */

.related {
  border-top: 1px solid var(--site-line);
  margin-top: 34px;
  padding-top: 16px;
}

.related__title {
  font-weight: 600;
  font-size: 14px;
  margin: 14px 0 6px !important;
}

.related__list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}

.related__list li {
  margin-bottom: 6px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  font-size: 13px;
}

.site-footer__nav a {
  margin-right: 2px;
}

.site-footer__note {
  color: var(--site-muted);
  font-size: 12.5px;
  line-height: 1.7;
  margin: 8px 0;
}

/* ---------- 首页底部说明 ---------- */

.site-note {
  margin-top: 34px;
  padding: 14px 18px;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  background: var(--site-bg-soft);
  font-size: 13.5px;
  line-height: 1.8;
}

/* 栏目页与文章页的标题层级 */

.hub h1,
.brand h1,
.guide h1 {
  margin-bottom: 14px;
}
