/* 问题解答（博客）专用样式，只被 /blog/ 下的页面引用，不影响站内其他页面 */

/* 首屏：模板的 .lead-grid 是两栏（正文 + 产品图栏）。博客首屏右侧放一张
   NVIDIA 芯片图，所以恢复两栏，只把模板为产品图预留的高度收掉。
   注意选择器要带上 body.content-page —— compare.css 里的
   `body.content-page .lead-grid` 优先级是 (0,2,1)，只写 .page-lead .lead-grid 压不住。 */
body.content-page .page-lead .lead-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 44px;
  min-height: auto;
  padding: 40px 0 44px;
}
body.content-page .page-lead .lead-grid > div:first-child > p {
  max-width: 640px;
}

/* 首屏右侧图：模板的 .lead-orbit 自带一张 RTX 2070 SUPER 背景图，并用 ::after
   叠了一行「NVIDIA GeForce RTX 2070 SUPER」说明文字。博客页用的是自己的芯片图，
   这两个都要清掉，否则会在芯片图上压着一句型号错误的标注。
   选择器要盖过 compare.css 的 `body.content-page .lead-orbit`（0,2,1）。 */
body.content-page.blog-page .page-lead .lead-orbit {
  height: auto;
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body.content-page.blog-page .page-lead .lead-orbit::after {
  content: none;
}
body.content-page.blog-page .page-lead .lead-product-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(220, 229, 236, .9);
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(19, 47, 70, .2);
}

/* ==========================================================================
   文章页阅读版式（.article）
   参照同系列「磁盘清理」「AMD Radeon」的问题解答文章：
   单栏居中阅读、结论前置高亮框、H2 蓝色左条、编号步骤卡、文首/文末下载条，
   不使用 hero 区块与右侧栏。
   ========================================================================== */

/* ---------- 正文 + 右侧栏 ---------- */
.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 820px) 250px;
  gap: 44px;
  align-items: start;
  justify-content: center;
}
.article {
  max-width: none;
  margin: 0;
  padding: 10px 0 44px;
}
.article-side {
  padding-top: 10px;
}
@media (max-width: 1180px) {
  .article-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}
.article h1 {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.32;
  letter-spacing: -.01em;
}
.article .lead {
  padding: 16px 20px;
  margin: 0 0 26px;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--soft);
  color: #39485a;
  font-size: 16.5px;
  line-height: 1.85;
}
.article h2 {
  padding-left: 12px;
  margin: 38px 0 14px;
  border-left: 4px solid var(--blue);
  font-size: 23px;
  line-height: 1.4;
}
.article h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.5;
}
.article p {
  margin: 0 0 14px;
  color: #3f4c5a;
  line-height: 1.88;
}
.article ul,
.article ol {
  padding-left: 22px;
  margin: 0 0 16px;
  color: #3f4c5a;
}
.article li {
  margin-bottom: 7px;
  line-height: 1.82;
}
.article strong {
  color: var(--ink);
}
.article a:not(.btn) {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article a:not(.btn):hover {
  color: var(--blue);
}

/* ---------- 文章内表格 ---------- */
.article .table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 18px 0;
  overflow-x: auto;
  background: #fff;
}
.article table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 15px;
}
.article th,
.article td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.article th {
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}
.article tr:last-child td {
  border-bottom: 0;
}

/* ---------- 编号步骤卡 ---------- */
.article .steps {
  padding: 0;
  margin: 18px 0;
  list-style: none;
}
.article .step {
  display: flex;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.article .step-num {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.article .step p {
  margin: 0;
  color: #4f5f70;
  font-size: 15px;
}

/* ---------- 提示条（原 .notice，图标按参照样式隐去） ---------- */
.article .notice {
  display: block;
  padding: 14px 18px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: #33465a;
  font-size: 15px;
  line-height: 1.82;
}
.article .notice .icon {
  display: none;
}
.article .notice-safe {
  border-color: #cdead9;
  background: #f2fbf5;
  color: #22603c;
}

/* ---------- FAQ 卡片 ---------- */
.article .faq-list {
  display: grid;
  gap: 12px;
  max-width: none;
  margin: 0;
}
.article .faq-list details {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.article .faq-list details[open] {
  border-color: #91b9e2;
}
.article .faq-list summary {
  min-height: 0;
  padding: 14px 18px;
  font-size: 16px;
}
.article .faq-list details[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.article .faq-list p {
  padding: 14px 18px;
  margin: 0;
  border-top: 0;
  color: #4f5f70;
  font-size: 15px;
}

/* ---------- 文首下载条 ---------- */
.article .dl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 20px;
  margin: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.article .dl-top .btn {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 11px;
  font-size: 15.5px;
}

/* ---------- 文末下载条 ---------- */
.article .dl-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  margin: 32px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.article .dl-end p {
  margin: 0;
  color: #33465a;
  font-size: 15px;
  line-height: 1.75;
}
.article .dl-end p strong {
  display: block;
  margin-bottom: 4px;
}

/* ---------- 文末相关阅读 ---------- */
.article .read-next {
  padding-top: 18px;
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
  color: #6b7a89;
  font-size: 15px;
  line-height: 1.9;
}

@media (max-width: 760px) {
  .article {
    padding: 6px 18px 34px;
  }
  .article h1 {
    font-size: 26px;
  }
  .article h2 {
    margin: 30px 0 12px;
    font-size: 20px;
  }
  .article .lead {
    padding: 14px 16px;
    font-size: 15.5px;
  }
  .article .step {
    padding: 14px;
  }
  .article .dl-end {
    flex-direction: column;
    align-items: flex-start;
  }
  .article .dl-end .btn {
    width: 100%;
    text-align: center;
  }
}

/* 窄屏：多列表格改为卡片式，避免横向滚动 */
@media (max-width: 620px) {
  .article .table-wrap {
    border: 0;
    overflow: visible;
  }
  .article table,
  .article thead,
  .article tbody,
  .article tr,
  .article th,
  .article td {
    display: block;
    width: 100%;
  }
  .article thead {
    display: none;
  }
  .article table {
    font-size: 15px;
    min-width: 0;
  }
  .article tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
  }
  .article td {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    white-space: normal;
  }
  .article td:last-child {
    border-bottom: 0;
  }
}

/* ==========================================================================
   博客列表页排版
   参照竞品 drivers.160.com/article/news/ 的两栏列表：
   左侧「分类 tab + 横排文章行（封面 + 标题 / 摘要 / 属性）」，右侧 250px 侧栏
   （文章栏目 pill + 带序号的推荐文章）
   ========================================================================== */

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 34px;
  align-items: start;
}

/* ---------- 文章行：不要封面图，纯文字行 ---------- */
.blog-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 22px 0;
  border-bottom: 1px solid #e5ebf0;
}
.blog-item:last-child {
  border-bottom: 0;
}

.blog-item-body {
  min-width: 0;
  padding-top: 2px;
}
/* 列表页每条文章是一个 h2（页面 H1 → 条目标题 H2），链接在 h2 里面 */
.blog-item-title {
  margin: 0 0 10px;
  color: #17222b;
  font-size: 19.5px;
  font-weight: 700;
  line-height: 1.45;
}
.blog-item-title a {
  color: inherit;
  text-decoration: none;
}
.blog-item-title a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}
.blog-item-desc {
  margin: 0 0 12px;
  color: #5b6b7c;
  font-size: 14px;
  line-height: 1.7;
}
/* ---------- 右侧栏 ---------- */
.blog-side-item {
  position: relative;
  padding-top: 13px;
  margin-bottom: 28px;
  border-top: 1px solid #d7e1e8;
}
.blog-side-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  height: 2px;
  background: var(--blue);
}
/* 侧栏卡片标题不是文章内容的一部分，用 .side-title 而非 h2，
   避免和正文的 h2 章节混在同一层大纲里 */
.blog-side-item > .side-title {
  padding: 8px 0 14px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.blog-side-links {
  padding: 0;
  margin: 0;
  list-style: none;
}
.blog-side-links a {
  display: block;
  padding: 7px 0;
  color: #4f5f70;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}
.blog-side-links a:hover {
  color: var(--blue-dark);
}

.blog-rank a {
  display: block;
  height: 30px;
  overflow: hidden;
  color: #4f5f70;
  font-size: 13px;
  line-height: 30px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
}
.blog-rank a:hover {
  color: var(--blue-dark);
}
.blog-rank a span {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 4px;
  background: #c3ccd6;
  color: #fff;
  font-size: 12px;
  font-style: italic;
  line-height: 20px;
  text-align: center;
  vertical-align: 1px;
}
.blog-rank a:nth-child(1) span { background: #d81e06; }
.blog-rank a:nth-child(2) span { background: #fe634f; }
.blog-rank a:nth-child(3) span { background: #ffb7ae; }

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
@media (max-width: 640px) {
  .blog-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  }

/* ---------- 分页 ---------- */
/* 博客页（列表页 + 文章页）页脚是 4 列，站内其它 content-page 页仍是 3 列，
   所以用 body 类区分 */
body.blog-page .footer-grid {
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
}

/* 正文列到页码条就结束了，往下紧接着就是深色页脚，不留白会贴在一起 */
.blog-main {
  padding-bottom: 64px;
}

.blog-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 26px 0 0;
}
.blog-pager a,
.blog-pager .pager-num,
.blog-pager .pager-prev,
.blog-pager .pager-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d7e1e8;
  border-radius: 6px;
  background: #fff;
  color: #4f5f70;
  font-size: 14px;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.blog-pager a:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}
.blog-pager .pager-num.is-current {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}
.blog-pager .is-disabled {
  background: #f7f9fb;
  color: #b3bfca;
}
.blog-pager .pager-prev { margin-right: 6px; }
.blog-pager .pager-next { margin-left: 6px; }

/* ---------- 首屏下载条 ----------
   替代原先单颗「用工具检测一次」按钮：把「为什么用工具」讲清楚，
   按钮仍然只保留一个下载入口。 */
.hero-dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 900px;
  padding: 20px 24px;
  border: 1px solid #d7e1e8;
  border-radius: 12px;
  background: #fff;
}
.hero-dl-copy {
  min-width: 0;
}
/* 选择器要盖过 site.css 的 `body:not(.home) .lead-grid>div:first-child p`（0,3,2） */
body.content-page .page-lead .lead-grid .hero-dl-copy strong {
  display: block;
  margin-bottom: 5px;
  color: #17222b;
  font-size: 17px;
}
body.content-page .page-lead .lead-grid .hero-dl-copy p {
  max-width: 560px;
  margin: 0;
  color: #5b6b7c;
  font-size: 13.5px;
  line-height: 1.65;
}
.hero-dl-cta {
  display: flex;
  flex: none;
  gap: 12px;
}
@media (max-width: 860px) {
  .hero-dl {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .hero-dl-cta {
    width: 100%;
  }
}
