/* 汽车音响 · 版式：首页分区 + 内页共用区块
   分区高度按 03-ui/compare-log.md 的预算落位（1440 基准） */

html { scroll-behavior: smooth; }

body { background: var(--c-bg); }

main { display: block; }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--c-dark);
  color: var(--c-on-dark);
  min-height: 367px;
}

.hero-media {
  position: absolute;
  top: 0;
  bottom: 0;
  right: max(0px, calc((100% - 1440px) / 2));
  width: min(620px, 46%);
  background: #141517 url("../images/hero-cabin.jpg") center 38% / cover no-repeat;
  opacity: .92;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--c-dark) 0%, rgba(27, 28, 30, .86) 26%, rgba(27, 28, 30, .02) 60%);
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding-top: 36px;
  padding-bottom: 28px;
}

.hero-copy { position: relative; max-width: 780px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--c-accent);
}

.hero h1 {
  margin-bottom: 14px;
  font-size: 41px;
  line-height: 1.22;
  letter-spacing: 0.01em;
}

.hero-lead {
  display: grid;
  gap: 8px;
  max-width: 640px;
  padding-left: 14px;
  border-left: 2px solid var(--c-accent);
  color: #d9d7d2;
  font-size: 14.5px;
  line-height: 1.8;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.hero-facts {
  position: relative;
  margin-left: auto;
  margin-top: 34px;
  padding: 0 6px 0 0;
  color: #e9e7e1;
  font-size: 15px;
  line-height: 1.9;
  text-align: right;
}
.hero-facts li { white-space: nowrap; }
.hero-facts li + li { margin-top: 4px; }
.hero-facts strong { color: var(--c-accent); font-weight: 700; }

/* 首屏下方的信息条 */
.signal-bar {
  background: #3c3d3f;
  color: #e6e3dc;
  border-top: 1px solid #4a4b4e;
}
.signal-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 53px;
  font-size: 13.5px;
  letter-spacing: .04em;
}
.signal-inner svg { flex: 0 0 auto; color: var(--c-accent); }
.signal-inner .signal-sep { color: #8d8c88; }

/* ---------- 分类卡片 ---------- */

.categories { padding: 12px 0 6px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-card) var(--gap-col);
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 4px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: #fff;
  transition: border-color .18s ease, background-color .18s ease;
}
.cat-card:hover { border-color: var(--c-line); background: #fcfbf9; }

.cat-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-img);
  overflow: hidden;
  background: var(--c-surface-2);
}
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cat-body { min-width: 0; flex: 1 1 auto; }

.cat-card h3 { font-size: var(--fs-card-title); line-height: 1.3; }

.cat-card p {
  margin-top: 3px;
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.cat-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; color: var(--c-muted-2); font-size: 11px; line-height: 1.4; }
.cat-tags .tag { padding: 0; border: 0; background: none; color: inherit; font-size: 11px; line-height: 1.4; }
.cat-tags .tag-accent { color: #8a6712; font-weight: 600; }

.cat-card .btn { flex: 0 0 auto; }

.cat-card.is-feature { background: #fffdf7; border-color: #efe3c6; }
.cat-card.is-feature h3 { font-size: 19px; }

/* ---------- 流程 ---------- */

.process { padding: 32px 0 22px; }

.process-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.process-head h2 { position: relative; padding-left: 14px; font-size: 25px; }
.process-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px; border-radius: 2px;
  background: var(--c-accent);
}
.process-head p { color: var(--c-muted); font-size: 13.5px; }

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.step {
  position: relative;
  padding: 0 14px;
  text-align: center;
}

.step + .step::before {
  content: "→";
  position: absolute;
  left: -7px;
  top: 26px;
  color: #cccac4;
  font-size: 16px;
}

.step-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border: 1.5px solid var(--c-accent);
  border-radius: 50%;
  background: #fffdf6;
  color: #8a6712;
}

.step-num {
  display: block;
  color: var(--c-accent-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
}

.step h3 { margin-top: 2px; font-size: 15.5px; }

.step p {
  margin-top: 5px;
  color: var(--c-muted);
  font-size: 12.8px;
  line-height: 1.7;
}

/* ---------- 精选阅读 + 装车检查 ---------- */

.featured-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
  gap: var(--gap-col);
  padding: 16px 0 20px;
}

.featured {
  padding: 22px 22px 24px;
  background: var(--c-surface);
  border-radius: var(--radius-card);
}

.featured .section-head { margin-bottom: 18px; }
.featured .section-head h2 { font-size: 22px; }

.reading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.reading-card {
  display: block;
  background: #fff;
  border: 1px solid #ecebe7;
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease;
}
.reading-card:hover { border-color: #d9d5cc; transform: translateY(-2px); }

.reading-thumb { aspect-ratio: 16 / 9.2; overflow: hidden; background: var(--c-surface-2); }
.reading-thumb img { width: 100%; height: 100%; object-fit: cover; }

.reading-body { padding: 13px 15px 16px; }
.reading-kicker { color: #8a6712; font-size: 11.5px; letter-spacing: .08em; }
.reading-card h3 { margin: 4px 0 6px; font-size: 15px; line-height: 1.45; }
.reading-card p { color: var(--c-muted); font-size: 12px; line-height: 1.6; }

.checklist { padding: 10px 0 0; }
.checklist .section-head { margin-bottom: 10px; }
.checklist .section-head h2 { font-size: 22px; }

.checklist ul { display: grid; gap: 14px; }

.checklist li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 13.5px;
  line-height: 1.7;
}

.check-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-ink);
  font-size: 11px;
  font-weight: 700;
}
.check-mark::before { content: "✓"; }

.checklist li strong { display: inline; margin-right: 6px; font-size: 13px; }
.checklist li span { color: var(--c-muted); }

/* ---------- 器材对照表 ---------- */

.spec { padding: 12px 0 8px; }
.spec-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.spec-head h2 { position: relative; padding-left: 14px; font-size: 25px; }
.spec-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px; border-radius: 2px;
  background: var(--c-accent);
}
.spec-head p { color: var(--c-muted); font-size: 13.5px; }

.type-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.type-table thead th {
  padding: 7px 16px;
  border-top: 2px solid var(--c-dark-2);
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: 13px;
  text-align: left;
  letter-spacing: .04em;
}

.type-table tbody td {
  padding: 2px 16px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-muted);
  vertical-align: middle;
}
.type-table tbody th {
  padding: 2px 16px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

/* ---------- 收束带 ---------- */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--c-dark-2);
  color: var(--c-on-dark);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(27,28,30,.06) 0%, rgba(27,28,30,.82) 40%, var(--c-dark-2) 74%),
    url("../images/hero-cabin.jpg") left 52% / 760px auto no-repeat;
  opacity: .8;
}
.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 125px;
  padding: 24px var(--pad-x);
}
.cta h2 { font-size: 30px; line-height: 1.3; }
.cta p { margin-top: 6px; color: #cfccc5; font-size: 13.5px; }

/* ---------- 内页：分类页 ---------- */

.page-hero {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}
.page-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 38px var(--pad-x) 34px;
  flex-wrap: wrap;
}
.page-hero h1 { margin: 6px 0 10px; font-size: 38px; }
.page-hero p { max-width: 720px; color: var(--c-muted); font-size: 14.5px; }

.page-stats { display: flex; gap: 30px; }
.page-stats div { text-align: right; }
.page-stats strong { display: block; font-size: 24px; line-height: 1.2; }
.page-stats span { color: var(--c-muted); font-size: 12.5px; }

.browse { padding: 18px 0 26px; }

.browse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0 12px;
}
.browse-head h2 { font-size: 20px; }
.browse-head p { color: var(--c-muted); font-size: 13px; }
.result-count { color: var(--c-muted); font-size: 13px; }

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  padding: 0 0 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  background: #fff;
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease;
}
.entry-card:hover { border-color: #c9c5bc; transform: translateY(-2px); }
.entry-card .tag,
.entry-card h3,
.entry-card p { margin-left: 18px; margin-right: 18px; }
.entry-card .entry-media { margin: 0 0 12px; }
.entry-card h3 { margin-top: 10px; margin-bottom: 6px; font-size: 17px; line-height: 1.45; }
.entry-card p { color: var(--c-muted); font-size: 13px; line-height: 1.7; }
.entry-card .entry-foot { margin-top: auto; padding-top: 12px; color: #8a6712; font-size: 12.5px; }

/* 列表卡片缩略图：<a> 必须 block，否则 height 不生效 */
.entry-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c-surface-2);
}
.entry-media img { width: 100%; height: 100%; object-fit: cover; }

/* 分页 */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0 0;
}
.pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: #fff;
  color: var(--c-muted);
  font-size: 13px;
}
.pager-link:hover { border-color: var(--c-accent); color: #8a6712; }
.pager-link.is-current {
  background: var(--c-dark-2);
  border-color: var(--c-dark-2);
  color: #fff;
  font-weight: 600;
}
.pager-gap {
  padding: 0 4px;
  color: var(--c-muted-2);
  font-size: 13px;
}

.entry-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 0;
}
.entry-index a {
  padding: 5px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  color: var(--c-muted);
  font-size: 12.5px;
}
.entry-index a:hover { border-color: var(--c-accent); color: #8a6712; }

.list-description {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  padding: 26px 0;
  border-top: 1px solid var(--c-line);
}
.list-description h2 { font-size: 20px; }
.list-description .prose p { margin-bottom: 12px; color: var(--c-muted); font-size: 14px; line-height: 1.9; }
.list-description .prose p:last-child { margin-bottom: 0; }

/* ---------- 内页：详情页 ---------- */

.article-head { background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.article-head-inner { padding: 26px var(--pad-x) 28px; }
.article-head h1 { max-width: 900px; margin: 12px 0 12px; font-size: 36px; line-height: 1.3; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--c-muted); font-size: 12.5px; }
.article-meta > span + span::before { content: "·"; margin-right: 8px; color: #b9b6af; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 60px;
  padding: 30px 0 34px;
  align-items: start;
}

.article-body { max-width: 700px; }
.article-body .lede {
  padding: 16px 18px;
  background: #fbf8ef;
  border-left: 3px solid var(--c-accent);
  color: #3c3a33;
  font-size: 15px;
  line-height: 1.9;
}

.key-points-title {
  margin: 18px 0 0;
  color: var(--c-ink);
  font-size: 15px;
  letter-spacing: .02em;
}

.key-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 26px;
}
.key-points div {
  padding: 13px 15px;
  background: var(--c-surface);
  border-radius: var(--radius-card);
}
.key-points strong { display: block; color: var(--c-ink); font-size: 13px; }
.key-points b { display: block; margin: 3px 0 4px; color: #8a6712; font-size: 17px; }
.key-points span { color: var(--c-muted); font-size: 12px; line-height: 1.6; }

.article-body h2 {
  position: relative;
  scroll-margin-top: 76px;
  margin: 26px 0 10px;
  padding-left: 13px;
  font-size: 22px;
}
.article-body h2::before {
  content: "";
  position: absolute;
  left: 0; top: 5px; bottom: 5px;
  width: 3px; border-radius: 2px;
  background: var(--c-accent);
}
.article-body p { margin-bottom: 12px; color: #36352f; font-size: 15.5px; line-height: 1.95; }

.article-figure {
  margin: 4px 0 18px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--c-surface-2);
}
.article-figure img { width: 100%; height: auto; object-fit: cover; }

.toc {
  position: sticky;
  top: 76px;
  padding: 16px 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  background: #fff;
}
.toc h2 { font-size: 14px; letter-spacing: .06em; }
.toc ol { margin-top: 10px; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 5px 0 5px 10px;
  border-left: 2px solid transparent;
  color: var(--c-muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.toc a:hover { color: var(--c-ink); }
.toc a.is-current { border-left-color: var(--c-accent); color: var(--c-ink); font-weight: 600; }

.toc-toggle { display: none; cursor: pointer; }

.related { padding: 24px 0 8px; border-top: 1px solid var(--c-line); }
.related .section-head { margin-bottom: 14px; }
.related .section-head h2 { font-size: 21px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.related-card {
  display: block;
  padding: 15px 17px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  background: #fff;
}
.related-card:hover { border-color: #c9c5bc; }
.related-card h3 { font-size: 15px; line-height: 1.5; }

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .nav a { padding: 8px 7px; font-size: 12.5px; }
  .brand-tag { display: none; }
  .hero-facts { font-size: 13px; }
  .hero h1 { font-size: 34px; }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 16px;
    background: var(--c-dark-2);
    border-bottom: 1px solid var(--c-line-dark);
  }
  .nav.is-open a { padding: 11px 4px; font-size: 14px; border-bottom: 1px solid #313235; }
  .nav.is-open .nav-item { display: block; }
  .nav.is-open .nav-drop {
    display: block;
    position: static;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 0 0 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .nav.is-open .nav-drop a { padding: 7px 4px; font-size: 13px; color: #a9a8a3; }
  .nav.is-open a.is-active::after { left: 4px; right: auto; width: 22px; bottom: 6px; }
  .nav.is-open .nav-all { margin: 12px 0 0; text-align: center; border-bottom: 0; }
  .hero-media { width: 54%; opacity: .55; }
  .featured-wrap { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; order: -1; }
  .toc h2 { display: none; }
  .toc-body { padding-top: 2px; }
  .toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 14px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
  }
  .toc-body[hidden] { display: none; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --fre: 0; }
  .hero-inner { padding-top: 30px; padding-bottom: 26px; }
  .hero h1 { font-size: 27px; }
  .hero-lead { font-size: 13.5px; }
  .hero-facts { display: none; }
  .hero-media { width: 100%; opacity: .3; }
  .hero-media::after { background: linear-gradient(180deg, rgba(27,28,30,.55), var(--c-dark) 88%); }
  .cat-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .step { display: grid; grid-template-columns: 46px 1fr; gap: 4px 14px; text-align: left; padding: 0; }
  .step-icon { grid-row: span 2; margin: 0; }
  .step + .step::before { content: none; }
  .step-num { align-self: end; }
  .step h3 { margin: 0; }
  .step p { grid-column: 2; }
  .reading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { padding: 16px; }
  .featured-wrap { padding-top: 4px; }
  .spec { overflow-x: auto; }
  .type-table { min-width: 560px; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 16px; min-height: 0; padding: 28px 0; }
  .cta h2 { font-size: 24px; }
  .footer-main { flex-direction: column; gap: 22px; padding: 24px 0 18px; }
  .footer-main > * { flex: 1 1 auto; }
  .page-hero h1 { font-size: 29px; }
  .page-stats { gap: 20px; }
  .list-description { grid-template-columns: 1fr; gap: 10px; }
  .key-points { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-head h1 { font-size: 27px; }
  .article-body p { font-size: 15px; }
}

@media (max-width: 560px) {
  :root { --pad-x: 18px; }
  .brand-name { font-size: 17px; }
  .hero h1 { font-size: 24px; }
  .cat-card { gap: 12px; padding: 10px 12px; }
  .cat-thumb { width: 64px; height: 64px; }
  .cat-card h3 { font-size: 16px; }
  .cat-card p { font-size: 12.5px; }
  .cat-card .btn { padding: 0 11px; }
  .entry-grid { grid-template-columns: 1fr; }
  .reading-grid { grid-template-columns: 1fr; }
  .section-head h2, .process-head h2, .spec-head h2 { font-size: 21px; }
  .signal-inner { font-size: 12px; gap: 8px; }
  .signal-inner .signal-extra { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 内页补充 ---------- */

.result-label {
  align-self: center;
  margin-right: 4px;
  color: var(--c-muted-2);
  font-size: 12.5px;
  letter-spacing: .04em;
}

.entry-empty {
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed var(--c-line);
  border-radius: var(--radius-card);
  color: var(--c-muted);
  font-size: 13.5px;
  text-align: center;
}

.page-hero .eyebrow { color: var(--c-accent-text); }
.page-hero .eyebrow::before { background: var(--c-accent-strong); }

.article-note {
  margin-top: 10px;
  color: var(--c-muted);
  font-size: 12.5px;
}

.related { max-width: 700px; }

/* skip-link：无障碍跳转链接，默认移出视口，Tab 聚焦时归位 */
.skip-link{position:absolute;left:-9999px;top:0;z-index:200;padding:8px 14px;background:#fff;color:#111;border-radius:6px;font-size:14px;text-decoration:none}
.skip-link:focus{left:8px;top:8px;outline:2px solid currentColor}

/* visually-hidden / sr-only：对读屏可见、对视觉隐藏 */
.visually-hidden,.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
