/* ==========================================================================
   pages.css — 内页局部样式：文章卡 / 目录 / 侧栏 / 下载 / 问答 / 版本 / 关于
   ========================================================================== */

/* --------------------------------------------------------------------------
   文章卡（阅读设置 / 使用教程 / 关于）
   -------------------------------------------------------------------------- */
.article {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: 32px 36px;
  border-radius: var(--r-card);
  background: var(--surface);
}

.article__title {
  font-size: var(--fs-h1-article);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.article__rule {
  height: 1px;
  background: var(--line-soft);
}

.article__p {
  color: var(--text-body);
  font-size: var(--fs-body);
  line-height: 1.9;
}

.article__p a {
  color: var(--brand-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 文章内小节标题：红字带编号 */
.h2 {
  margin-top: var(--sp-2);
  color: var(--brand);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.h3 {
  color: var(--text);
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.5;
}

/* 文章结尾的上下篇 */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: space-between;
  margin-top: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.pager a {
  color: var(--brand-ink);
}

@media (max-width: 640px) {
  .article {
    padding: 22px 20px;
  }
}

/* --------------------------------------------------------------------------
   章节目录（左侧）
   -------------------------------------------------------------------------- */
.toc {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px 18px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.toc__title {
  color: var(--brand-ink);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.toc__link {
  color: var(--text-body);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.toc__link:hover,
.toc__link[aria-current="true"] {
  color: var(--brand-ink);
  font-weight: 500;
}

@media (max-width: 1180px) {
  .with-toc .toc {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   右侧辅助栏卡
   -------------------------------------------------------------------------- */
.aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside-card {
  padding: 20px 18px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.aside-card__title {
  color: var(--brand-ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.6;
}

.aside-card__text {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.8;
}

.aside-card__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

/* 目录里另起一段（版本日志入口这种） */
.aside-card__links--sep {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.aside-card__links a,
.aside-card__links span {
  color: var(--text-body);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.aside-card__links a:hover {
  color: var(--brand-ink);
}

/* 深色声明卡 */
.aside-card--dark {
  background: var(--footer);
  box-shadow: none;
}

.aside-card--dark .aside-card__title {
  color: var(--text-invert);
}

.aside-card--dark .aside-card__text {
  color: #b9bec7;
}

/* --------------------------------------------------------------------------
   题材页：筛选条 + 结果条
   -------------------------------------------------------------------------- */
.filterbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.filterbar__label {
  margin-inline-end: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.filterbar > .link-more {
  margin-inline-start: auto;
}

.resultbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: 16px;
  margin-bottom: var(--sp-5);
  background: var(--surface);
}

.resultbar__count {
  font-size: var(--fs-lead);
  font-weight: 700;
}

.resultbar__sort {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

/* 筛选后为空时的兜底提示 */
.empty {
  padding: 40px 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-align: center;
}

/* --------------------------------------------------------------------------
   下载页
   -------------------------------------------------------------------------- */
.dl-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 48px;
  align-items: start;
  padding-block: 40px 46px;
}

.dl-title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.dl-sub {
  margin-top: 14px;
  color: var(--text-body);
  font-size: var(--fs-lead);
  line-height: 1.7;
}

.dl-spec {
  display: flex;
  margin-top: 26px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.dl-spec__cell {
  flex: 1 1 0;
  min-width: 0;
  padding: 20px 26px;
}

.dl-spec__cell + .dl-spec__cell {
  border-left: 1px solid var(--line);
}

.dl-spec__key {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.dl-spec__val {
  margin-top: 7px;
  font-family: var(--font-num);
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.dl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.dl-note {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.8;
}

.dl-trust {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  color: var(--text-body);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.dl-trust::before {
  content: "";
  flex: none;
  width: 3px;
  border-radius: 2px;
  background: var(--brand-mark);
}

/* 扫码卡 */
.dl-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: 24px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.dl-qr {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.dl-qr__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.dl-qr__text {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.75;
}

/* 平台卡 */
.platform {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 24px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.platform__tag {
  color: var(--brand-ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.platform__tag--mute {
  color: var(--text-muted);
}

.platform__title {
  font-size: 16px;
  font-weight: 700;
}

.platform__desc {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.85;
}

.platform__go {
  margin-top: 2px;
  color: var(--brand-ink);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.platform__go:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 安装步骤 */
.step-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.step-card__no {
  color: var(--brand-ink);
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
}

.step-card__title {
  font-size: var(--fs-lead);
  font-weight: 700;
}

.step-card__text {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.85;
}

/* 须知两栏 */
.notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: var(--sp-4);
  align-items: start;
}

.notes__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: 24px 26px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.notes__item h3 {
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.6;
}

.notes__item p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.85;
}

.perm {
  padding: 24px 26px;
  border-radius: var(--r-card);
  background: var(--brand-surface);
}

.perm h3 {
  color: var(--brand-ink);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.perm__list {
  margin-top: 10px;
  color: #8a1b22;
  font-size: var(--fs-sm);
  line-height: 1.8;
}

.perm__note {
  margin-top: 12px;
  color: #8a1b22;
  font-size: var(--fs-xs);
  line-height: 1.85;
}

.perm .btn {
  margin-top: 14px;
}

.perm .copy-btn + .perm__note {
  margin-top: 10px;
}

/* 标题降成辅助信息的场景（CURRENT VERSION、站点信息） */
.is-mute {
  color: var(--text-muted);
}

.is-eyebrow {
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* 文章卡放宽版：关于页这类纯文字长页（内边距仍与 --w-article 对齐） */
.article--roomy {
  padding: 34px 36px;
}

@media (max-width: 1080px) {
  .dl-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 28px 36px;
  }
  .notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .dl-spec {
    flex-wrap: wrap;
  }
  .dl-spec__cell {
    flex: 1 1 50%;
    padding: 16px 18px;
  }
  .dl-spec__cell:nth-child(odd) {
    border-left: 0;
  }
  .dl-spec__cell:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .dl-actions .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   常见问题
   -------------------------------------------------------------------------- */
.faq-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}

.faq-group {
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.faq-group + .faq-group {
  margin-top: var(--sp-4);
}

.faq-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 20px 26px 8px;
}

.faq-group__name {
  font-size: 16px;
  font-weight: 700;
}

.faq-group__count {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

@media (max-width: 860px) {
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .qa > summary {
    padding: 16px 20px;
  }
  .qa__body {
    padding: 0 20px 16px;
  }
  .faq-group__head {
    padding: 18px 20px 6px;
  }
}

/* 搜索命中 / 未命中的提示 */
/* --------------------------------------------------------------------------
   版本日志
   -------------------------------------------------------------------------- */
.cl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--sp-6);
  align-items: start;
}

.cl-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: 22px 26px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.cl-item + .cl-item {
  margin-top: 14px;
}

.cl-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.cl-item__ver {
  font-family: var(--font-num);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
}

.cl-item__date {
  margin-inline-start: auto;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-family: var(--font-num);
}

.cl-item__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-body);
  font-size: var(--fs-sm);
  line-height: 2;
}

.cl-item__list li {
  padding-inline-start: 14px;
  position: relative;
}

.cl-item__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c8ccd4;
}

.cl-item__known {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.8;
}

.cl-now__ver {
  margin-top: 2px;
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.cl-now__date {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.cl-now__pack {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-body);
  font-size: var(--fs-sm);
}

.cl-now .btn {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .cl-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   关于页
   -------------------------------------------------------------------------- */
.ab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--w-aside);
  gap: var(--sp-6);
  align-items: start;
}

.ab-sec + .ab-sec {
  margin-top: var(--sp-6);
}

.ab-sec h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.ab-sec p {
  margin-top: 9px;
  color: var(--text-body);
  font-size: var(--fs-body);
  line-height: 1.9;
}

.ab-flow {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.ab-flow__row {
  display: flex;
  gap: 14px;
  padding: 10px 0;
}

.ab-flow__idx {
  flex: none;
  width: 24px;
  color: var(--brand-ink);
  font-family: var(--font-num);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.ab-flow__text {
  color: var(--text-body);
  font-size: var(--fs-sm);
  line-height: 1.85;
}

.ab-kv {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.ab-kv__row {
  display: flex;
  gap: 10px;
  font-size: var(--fs-sm);
}

.ab-kv__key {
  flex: none;
  width: 3.2em;
  color: var(--text-muted);
}

.ab-kv__val {
  min-width: 0;
  color: var(--text);
  word-break: break-word;
}

.mailto {
  color: var(--brand-ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  word-break: break-all;
}

.mailto:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copy-btn {
  align-self: flex-start;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-body);
  font-size: var(--fs-xs);
}

.copy-btn:hover {
  background: var(--surface-2);
}

@media (max-width: 900px) {
  .ab-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
