/* 各页局部：首页区块 / 功能 / 下载 / 指南 / 文章 / 博客 / 更新日志 / FAQ / 关于 / 404 */

/* ---------- 首页：阅读体验 ---------- */
.reading {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 88px;
  align-items: center;
}

.reading__copy {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.reading__title {
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
}

.reading__text {
  font-size: var(--fs-body);
  color: var(--ink-muted);
}

.reading__media {
  display: flex;
  justify-content: center;
}

/* 截图为整屏长图（约 9:19.5），整张铺开会把区块撑到 870px、文案两侧各空 200px。
   统一裁成 2:3 左右的「窗口」，底部 76px 渐隐 —— 避免切口正好落在文字行中间。 */
.reading__phone {
  width: 272px;
  aspect-ratio: 272 / 392;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.12);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 72px), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 72px), rgba(0, 0, 0, 0) 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.reading__phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

@media (max-width: 1024px) {
  .reading {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-8);
  }

  .reading__phone {
    width: 232px;
  }
}

/* ---------- 首页：三步 ---------- */
.step {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: 28px;
  border-radius: var(--r-card);
  background: var(--bg-soft);
}

.step__num {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-mark);
  font-variant-numeric: tabular-nums;
}

.step__title {
  font-size: 18px;
  font-weight: 600;
}

.step__text {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

/* ---------- 首页：社区 ---------- */
.community-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}

.community-card:hover {
  box-shadow: inset 0 0 0 1px var(--brand-mark), var(--shadow-lift);
  color: var(--ink);
}

.community-card__title {
  font-size: 17px;
  font-weight: 600;
}

.community-card__text {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

.community-card__more {
  margin-top: auto;
  padding-top: var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--brand);
}

/* ---------- 首页：FAQ 双栏 ---------- */
.faq-block {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}

.faq-block__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
}

.faq-block__title {
  font-size: var(--fs-h3);
}

.faq-block__text {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

@media (max-width: 1024px) {
  .faq-block {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-7);
  }
}

/* ---------- 功能页：交替图文 ---------- */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
  gap: 120px;
  align-items: center;
}

.feature-row--flip .feature-row__copy {
  grid-column: 2;
  grid-row: 1;
}

.feature-row--flip .feature-row__media {
  grid-column: 1;
  grid-row: 1;
}

.feature-row__copy {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.feature-row__title {
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.feature-row__text {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* 图文区里的按钮组（下载书源 / 导入教程） */
.feature-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-block-start: var(--sp-1);
}

.feature-row__media {
  display: flex;
  justify-content: center;
}

.feature-row__shot {
  width: 300px;
  aspect-ratio: 300 / 440;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 76px), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 76px), rgba(0, 0, 0, 0) 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.feature-row__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

@media (max-width: 1024px) {
  .feature-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-7);
  }

  .feature-row--flip .feature-row__copy,
  .feature-row--flip .feature-row__media {
    grid-column: auto;
    grid-row: auto;
  }

  .feature-row__shot {
    width: 240px;
  }
}

/* ---------- 对比表 ---------- */
.table-wrap {
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}

.table thead th {
  padding: 16px 28px;
  background: var(--bg-soft);
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--ink-muted);
  text-align: start;
  white-space: nowrap;
}

.table tbody td {
  padding: 18px 28px;
  border-block-start: 1px solid var(--line-soft);
  font-size: var(--fs-xs);
  color: var(--ink-body);
  vertical-align: top;
}

.table tbody th {
  padding: 18px 28px;
  border-block-start: 1px solid var(--line-soft);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink);
  text-align: start;
  white-space: nowrap;
}

.table .is-ours {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 640px) {
  .table thead th,
  .table tbody td,
  .table tbody th {
    padding: 12px 14px;
    font-size: var(--fs-2xs);
  }

  .table thead th {
    font-size: 11px;
  }
}

/* ---------- 下载页：版本表 ---------- */
.ver-table {
  width: 100%;
  border-collapse: collapse;
}

.ver-table th {
  padding: 0 0 12px;
  font-size: var(--fs-3xs);
  font-weight: 500;
  color: var(--ink-muted);
  text-align: start;
}

.ver-table td {
  padding: 18px 0;
  border-block-start: 1px solid var(--line-soft);
  font-size: var(--fs-xs);
  color: var(--ink-body);
  vertical-align: middle;
}

.ver-table .col-ver {
  width: 156px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ver-table .col-ver .pill {
  margin-inline-start: 8px;
  vertical-align: 1px;
}

.ver-table .col-date {
  width: 120px;
  font-variant-numeric: tabular-nums;
}

.ver-table .col-act {
  width: 88px;
  text-align: end;
  white-space: nowrap;
}

.ver-table .is-note {
  color: var(--brand);
  font-weight: 600;
}

@media (max-width: 640px) {
  /* 390 宽放不下四列：日期让位，只留版本 / 更新说明 / 操作 */
  .ver-table .col-date,
  .ver-table .hide-sm {
    display: none;
  }

  .ver-table .col-ver {
    width: 76px;
  }

  /* 窄屏标题单元格挤不下「最新」标记，交给版本号本身说明 */
  .ver-table .col-ver .pill {
    display: none;
  }
}

/* ---------- 指南列表 ---------- */
.guide-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.side-nav__link {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

.side-nav__link:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.side-nav__link[aria-current="page"] {
  background: var(--brand-surface);
  color: var(--brand);
  font-weight: 600;
}

.guide-groups {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.guide-group__title {
  font-size: 17px;
  font-weight: 600;
}

/* 分组标题右侧的操作按钮（数据源 → 下载书源） */
.guide-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.guide-group__list {
  display: flex;
  flex-direction: column;
  margin-top: var(--sp-2);
}

.guide-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-block: var(--sp-4);
  border-block-end: 1px solid var(--line-soft);
  color: var(--ink);
}

.guide-item:hover {
  color: var(--ink);
}

.guide-item__title {
  font-size: var(--fs-body);
  font-weight: 500;
}

.guide-item:hover .guide-item__title {
  color: var(--brand);
}

.guide-item__text {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

/* 待补充的条目：不给链接，用灰字说明，避免假控件 */
.guide-item--todo {
  cursor: default;
}

.guide-item--todo .guide-item__title {
  color: var(--ink-muted);
}

.guide-item--todo:hover .guide-item__title {
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  .side-nav__link {
    box-shadow: inset 0 0 0 1px var(--line);
  }
}

/* ---------- 文章页 ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 200px;
  gap: 80px;
  align-items: start;
}

.article-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}

.article-head__title {
  font-size: var(--fs-h1);
  letter-spacing: -0.02em;
}

.article-head__meta {
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 100px;
}

.toc__title {
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
}

.toc__link {
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
  padding-inline-start: 12px;
  border-inline-start: 2px solid transparent;
}

.toc__link:hover,
.toc__link[aria-current="true"] {
  border-inline-start-color: var(--brand);
  color: var(--brand);
}

.toc__help {
  padding: var(--sp-4);
  border-radius: var(--r-btn);
  background: var(--bg-soft);
  font-size: var(--fs-3xs);
  color: var(--ink-muted);
}

.toc__help strong {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-2xs);
  color: var(--ink);
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-block-start: 1px solid var(--line-soft);
}

.prev-next__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prev-next__item--next {
  text-align: end;
}

.prev-next__label {
  font-size: var(--fs-3xs);
  color: var(--ink-muted);
}

.prev-next__title {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
}

.prev-next__item:hover .prev-next__title {
  color: var(--brand);
}

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-8);
  }

  .toc {
    position: static;
    order: -1;
  }
}

/* ---------- 博客 ---------- */
.featured {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 48px;
  border-radius: var(--r-lg);
  background: var(--dark);
  color: #fff;
}

.featured__copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 620px;
}

.featured__title {
  font-size: var(--fs-h5);
  color: #fff;
}

.featured__text {
  font-size: var(--fs-xs);
  color: var(--ink-invert-body);
}

.featured__meta {
  font-size: var(--fs-3xs);
  color: var(--ink-invert-muted);
  font-variant-numeric: tabular-nums;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 26px 24px;
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}

.post-card:hover {
  box-shadow: inset 0 0 0 1px var(--brand-mark), var(--shadow-lift);
  color: var(--ink);
}

.post-card__tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
}

.post-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.post-card:hover .post-card__title {
  color: var(--brand);
}

.post-card__text {
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
}

.post-card__meta {
  margin-top: auto;
  padding-top: var(--sp-3);
  font-size: var(--fs-3xs);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.post-card--todo:hover {
  box-shadow: inset 0 0 0 1px var(--line);
}

.post-card--todo:hover .post-card__title {
  color: var(--ink);
}

.pager-note {
  margin-top: var(--sp-7);
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .featured {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-6);
    padding: 32px 28px;
  }
}

/* ---------- 博客单篇 ---------- */
.post-single {
  max-width: 740px;
  margin-inline: auto;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand);
  font-size: var(--fs-3xs);
  font-weight: 600;
}

.avatar--lg {
  width: 44px;
  height: 44px;
  font-size: var(--fs-body);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-7);
}

.post-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-7);
  padding-top: var(--sp-6);
  border-block-start: 1px solid var(--line-soft);
}

.post-author__who {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.post-author__name {
  font-size: var(--fs-xs);
  font-weight: 600;
}

.post-author__bio {
  font-size: var(--fs-3xs);
  color: var(--ink-muted);
}


/* ---------- 更新日志 ---------- */
.log-group + .log-group {
  margin-top: var(--sp-7);
}

.log-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
}

.log-group__ver {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.log-group__date {
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* 版本摘要：一句话说清这次更新干了什么 */
.log-group__lead {
  margin-block: 2px 14px;
  font-size: var(--fs-xs);
  color: var(--ink-body);
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  font-size: var(--fs-xs);
  color: var(--ink-body);
}

.log-tag {
  flex: 0 0 auto;
  font-size: var(--fs-3xs);
  font-weight: 600;
  line-height: 1.9;
}

.log-tag--new {
  color: var(--brand);
}

.log-tag--fix {
  color: #b4470f;
}

.log-tag--opt {
  color: #3f6212;
}

/* ---------- FAQ 页 ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  align-items: start;
}

.help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  padding: var(--sp-8);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
}

.help-card__title {
  font-size: 20px;
  font-weight: 600;
}

.help-card__text {
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-card {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-6);
  }
}

/* ---------- 关于页 ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 620px) 380px;
  gap: 80px;
  align-items: start;
}

.intro__copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.intro__title {
  font-size: var(--fs-h5);
}

.intro__text {
  font-size: var(--fs-sm);
  color: var(--ink-body);
}

.facts {
  padding: 30px 26px;
  border-radius: var(--r-card);
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.facts__title {
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
}

.facts__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: 13px;
  font-size: var(--fs-2xs);
}

.facts__row + .facts__row {
  border-block-start: 1px solid var(--line);
}

.facts__row dt {
  color: var(--ink-muted);
}

.facts__row dd {
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 1024px) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-7);
  }
}

/* ---------- 404 ---------- */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  min-height: 620px;
  padding-block: var(--sec-y);
  background: var(--bg-soft);
  text-align: center;
}

.not-found__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
}

.not-found__code {
  font-size: 120px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #c9d8f0;
  font-variant-numeric: tabular-nums;
}

.not-found__title {
  font-size: var(--fs-h4);
}

.not-found__text {
  max-width: 620px;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

.not-found__btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-1);
}

.not-found__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-6);
  font-size: var(--fs-xs);
}

@media (max-width: 640px) {
  .not-found {
    min-height: 480px;
  }

  .not-found__code {
    font-size: 84px;
  }

  .not-found__btns {
    width: 100%;
    flex-direction: column;
  }

  .not-found__btns .btn {
    width: 100%;
  }
}
