.page-home {
  --home-blue-line: rgba(27, 79, 160, 0.30);
  --home-gold-line: rgba(201, 138, 30, 0.42);
  --home-ink-soft: rgba(250, 247, 241, 0.74);
  --home-card-pad: 24px;
}

/* ---------- 封面 ---------- */

.page-home .hero-cover {
  position: relative;
  overflow: hidden;
  padding: 26px 0 56px;
  background: var(--paper-0);
}

.page-home .hero-cover__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-home .hero-cover__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.13;
  filter: grayscale(0.4) contrast(1.06);
}

.page-home .hero-cover__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(158deg, rgba(250, 247, 241, 0.62) 0%, rgba(250, 247, 241, 0.94) 58%, var(--paper-0) 100%),
    radial-gradient(120% 80% at 88% 12%, rgba(27, 79, 160, 0.12), transparent 62%);
}

.page-home .hero-cover__inner {
  position: relative;
  z-index: 1;
}

.page-home .hero-cover__grid {
  display: grid;
  gap: 30px;
  margin-top: 26px;
}

.page-home .hero-cover__kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--azure-600);
}

.page-home .hero-cover__title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 8.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

.page-home .hero-cover__lead {
  max-width: 42ch;
  margin: 0;
  color: var(--ink-700);
}

.page-home .hero-cover__aside {
  align-self: end;
}

.page-home .hero-cover__aside .t-label {
  margin: 0 0 12px;
  color: var(--gray-400);
  letter-spacing: 0.1em;
}

.page-home .hero-cover__tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-home .hero-cover__tags .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.page-home .hero-cover__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.page-home .hero-cover__note {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--gray-400);
}

/* ---------- 章节标题 ---------- */

.page-home .section-head {
  max-width: 62ch;
  margin-bottom: 34px;
}

.page-home .section-head__title {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 4.8vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}

.page-home .section-head__lead {
  margin: 0;
  color: var(--ink-700);
}

.page-home .section--ink .section-head__title {
  color: var(--paper-0);
}

.page-home .section--ink .section-head__lead {
  color: var(--home-ink-soft);
}

/* ---------- 双入口 ---------- */

.page-home .entry-pair {
  display: grid;
  gap: 26px;
}

.page-home .entry-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: var(--home-card-pad) 20px calc(var(--home-card-pad) + 4px);
  border-radius: var(--r-card);
}

.page-home .entry-card--home {
  background: var(--paper-0);
  border: 1px solid var(--home-blue-line);
  box-shadow: var(--shadow-soft);
}

.page-home .entry-card--biz {
  border: 1px solid var(--home-gold-line);
}

.page-home .entry-card .tag {
  align-self: flex-start;
  margin: 0;
}

.page-home .entry-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(21px, 2.8vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.page-home .entry-card--home .entry-card__title {
  color: var(--ink-900);
}

.page-home .entry-card--biz .entry-card__title {
  color: var(--paper-0);
}

.page-home .entry-card__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.78;
}

.page-home .entry-card--home .entry-card__text {
  color: var(--ink-700);
}

.page-home .entry-card--biz .entry-card__text {
  color: var(--home-ink-soft);
}

.page-home .entry-card__fig {
  margin: 4px 0 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.page-home .entry-card--biz .entry-card__fig {
  border-color: var(--line-ink);
}

.page-home .entry-card__fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .entry-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.page-home .entry-card__list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.65;
}

.page-home .entry-card--home .entry-card__list li {
  color: var(--ink-700);
}

.page-home .entry-card--biz .entry-card__list li {
  color: var(--home-ink-soft);
}

.page-home .entry-card__list li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--azure-600);
}

.page-home .entry-card--biz .entry-card__list li::before {
  background: var(--gold-500);
}

.page-home .entry-card__link {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- 版本对照 ---------- */

.page-home .diff-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper-0);
  font-size: 15px;
}

.page-home .diff-table th,
.page-home .diff-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.65;
}

.page-home .diff-table thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  background: rgba(213, 226, 247, 0.45);
  border-bottom: 1px solid var(--line-strong);
}

.page-home .diff-table tbody th[scope="row"] {
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
}

.page-home .diff-table tbody td:last-child {
  background: rgba(213, 226, 247, 0.28);
  color: var(--ink-900);
}

.page-home .diff__more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 24px 0 0;
}

.page-home .diff__hint {
  font-size: 13px;
}

/* ---------- 分类索引墙 ---------- */

.page-home .cats-grid {
  display: grid;
  gap: 34px;
}

.page-home .cat-wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.page-home .cat-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(250, 247, 241, 0.7);
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), background-color 240ms var(--ease);
}

.page-home .cat-chip:hover {
  transform: translateY(-2px);
  border-color: var(--azure-600);
  background: rgba(213, 226, 247, 0.42);
}

.page-home .cat-chip__code {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--azure-600);
}

.page-home .cat-chip__name {
  font-size: 14px;
  color: var(--ink-900);
}

.page-home .cats-figure {
  margin: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  align-self: start;
}

.page-home .cats-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 更新节奏 ---------- */

.page-home .rhythm-band {
  display: grid;
  gap: 16px;
}

.page-home .rhythm-beat {
  position: relative;
  padding: 24px 20px 26px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  overflow: hidden;
}

.page-home .rhythm-beat--week {
  background: linear-gradient(170deg, rgba(213, 226, 247, 0.72) 0%, rgba(250, 247, 241, 0.94) 78%);
  border-color: var(--home-blue-line);
}

.page-home .rhythm-beat--year {
  background: linear-gradient(170deg, rgba(240, 228, 210, 0.86) 0%, rgba(250, 247, 241, 0.94) 78%);
  border-color: var(--home-gold-line);
}

.page-home .rhythm-beat__code {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.page-home .rhythm-beat--week .rhythm-beat__code {
  color: var(--azure-600);
}

.page-home .rhythm-beat--year .rhythm-beat__code {
  color: var(--gold-500);
}

.page-home .rhythm-beat__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink-900);
}

.page-home .rhythm-beat__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.78;
  color: var(--ink-700);
}

.page-home .rhythm-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.page-home .rhythm-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-700);
}

.page-home .rhythm-list li .t-mono {
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold-500);
}

.page-home .rhythm-list strong {
  color: var(--ink-900);
  font-weight: 700;
}

/* ---------- 四步上手 ---------- */

.page-home .step-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.page-home .step-card {
  padding: 22px 20px 24px;
  border: 1px solid var(--line-ink);
  border-radius: var(--r-card);
  background: rgba(250, 247, 241, 0.045);
  transition: border-color 260ms var(--ease), background-color 260ms var(--ease), transform 260ms var(--ease);
}

.page-home .step-card:hover {
  border-color: var(--home-gold-line);
  background: rgba(250, 247, 241, 0.075);
  transform: translateY(-2px);
}

.page-home .step-card__num {
  display: inline-block;
  margin-bottom: 14px;
  padding-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-500);
  border-bottom: 1px solid var(--line-gold);
}

.page-home .step-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.36;
  color: var(--paper-0);
}

.page-home .step-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.72;
  color: var(--home-ink-soft);
}

.page-home .steps-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line-ink);
}

.page-home .steps-cta__alt {
  font-size: 14px;
  color: var(--home-ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-gold);
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}

.page-home .steps-cta__alt:hover {
  color: var(--paper-0);
  border-color: var(--gold-500);
}

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

@media (min-width: 640px) {
  .page-home {
    --home-card-pad: 30px;
  }

  .page-home .hero-cover {
    padding: 34px 0 72px;
  }

  .page-home .entry-card {
    padding: var(--home-card-pad) 28px calc(var(--home-card-pad) + 6px);
  }

  .page-home .rhythm-beat {
    padding: 28px 26px 30px;
  }

  .page-home .step-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .page-home .rhythm-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 720px) {
  .page-home .hero-cover__note {
    margin-left: auto;
  }

  .page-home .diff-table th,
  .page-home .diff-table td {
    padding: 16px 20px;
  }
}

@media (min-width: 900px) {
  .page-home .hero-cover__grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: end;
    gap: 56px;
    margin-top: 38px;
  }

  .page-home .entry-pair {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0 28px;
  }

  .page-home .entry-card--home {
    grid-column: 1 / span 6;
  }

  .page-home .entry-card--biz {
    grid-column: 7 / -1;
    margin-top: 78px;
  }
}

@media (min-width: 960px) {
  .page-home .cats-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 54px;
    align-items: start;
  }

  .page-home .step-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home .step-card {
    padding: 26px 22px 30px;
  }
}

@media (min-width: 1040px) {
  .page-home .hero-cover {
    padding: 44px 0 92px;
  }

  .page-home .cat-wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .page-home .diff-table,
  .page-home .diff-table tbody,
  .page-home .diff-table tr,
  .page-home .diff-table th,
  .page-home .diff-table td {
    display: block;
    width: 100%;
  }

  .page-home .diff-table thead {
    display: none;
  }

  .page-home .diff-table tbody tr {
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }

  .page-home .diff-table tbody th[scope="row"] {
    padding: 0 0 10px;
    border: 0;
    white-space: normal;
    font-size: 16px;
  }

  .page-home .diff-table tbody td {
    padding: 3px 0;
    border: 0;
    background: none;
    font-size: 14px;
  }

  .page-home .diff-table tbody td:last-child {
    background: none;
  }

  .page-home .diff-table tbody td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 5.6em;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--gray-400);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .cat-chip,
  .page-home .step-card,
  .page-home .steps-cta__alt {
    transition: none;
  }

  .page-home .cat-chip:hover,
  .page-home .step-card:hover {
    transform: none;
  }
}
