.page-home {
  --hm-hairline: rgba(200, 210, 220, .18);
  --hm-hairline-dark: rgba(11, 22, 34, .2);
  --hm-gap: clamp(18px, 2.2vw, 30px);
  --hm-ink-soft: rgba(11, 22, 34, .72);
}

/* ---------- 左侧章节索引 ---------- */
.page-home .toc-rail {
  display: none;
}

@media (min-width: 1440px) {
  .page-home .toc-rail {
    display: block;
    position: fixed;
    left: max(18px, calc((100vw - var(--container-max)) / 2 - 172px));
    top: calc(var(--header-h) + 108px);
    width: 152px;
    z-index: 20;
  }

  .page-home .toc-rail__label {
    margin: 0 0 12px;
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--mist-200);
  }

  .page-home .toc-rail__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 14px;
    border-left: 2px solid var(--ink-500);
  }

  .page-home .toc-rail__link {
    display: block;
    padding: 7px 0;
    font-size: .82rem;
    line-height: 1.4;
    color: var(--mist-200);
    text-decoration: none;
    transition: color .2s ease;
  }

  .page-home .toc-rail__link:hover,
  .page-home .toc-rail__link.is-current {
    color: var(--glow-amber);
  }

  .page-home .toc-rail__num {
    display: inline-block;
    min-width: 22px;
    font-family: var(--mono);
    font-size: .74rem;
    color: var(--signal-orange);
  }
}

/* ---------- 通用区块排版 ---------- */
.page-home .eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--glow-amber);
}

.page-home .section-title {
  margin: 10px 0 12px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.7vw, 2.25rem);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: .02em;
}

.page-home .section-head {
  max-width: 46rem;
}

.page-home .section-head > p:last-child {
  margin: 0;
  font-size: .98rem;
  line-height: 1.75;
}

.page-home .hm-swap .eyebrow,
.page-home .hm-library .eyebrow,
.page-home .hm-service .eyebrow {
  color: var(--clay-600);
}

.page-home .hm-swap .section-head > p:last-child,
.page-home .hm-service .section-head > p:last-child {
  color: var(--hm-ink-soft);
}

.page-home .hm-note {
  margin: 18px 0 0;
  font-size: .88rem;
  line-height: 1.75;
  color: var(--mist-200);
}

.page-home .hm-swap .hm-note,
.page-home .hm-library .hm-note,
.page-home .hm-service .hm-note {
  color: var(--hm-ink-soft);
}

.page-home .hm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- 首屏拼贴 ---------- */
.page-home .hm-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 7vw, 96px);
  background: var(--ink-900);
  color: var(--white-soft);
}

.page-home .hm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(56% 62% at 10% 6%, rgba(255, 106, 42, .12), transparent 68%),
    radial-gradient(48% 56% at 92% 88%, rgba(95, 179, 161, .1), transparent 70%);
  pointer-events: none;
}

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

.page-home .hm-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hm-gap);
  margin-top: clamp(20px, 3vw, 34px);
}

.page-home .hm-hero__code {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 18px 0 6px;
}

.page-home .hm-hero__num {
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 6rem);
  line-height: .84;
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--signal-orange);
}

.page-home .hm-hero__code-label {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist-200);
}

.page-home .hm-hero h1 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: .02em;
  max-width: 22em;
}

.page-home .hm-hero .lede {
  margin: 0;
  max-width: 34em;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--mist-200);
}

.page-home .hm-path {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .hm-path__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 2px solid var(--ink-500);
  border-left-width: 6px;
  background: var(--ink-700);
}

.page-home .hm-path__item--hot {
  border-left-color: var(--signal-orange);
}

.page-home .hm-path__item--cool {
  border-left-color: var(--celadon);
}

.page-home .hm-path__key {
  font-size: .8rem;
  letter-spacing: .14em;
  color: var(--white-soft);
}

.page-home .hm-path__val {
  font-family: var(--mono);
  font-size: .84rem;
  color: var(--glow-amber);
}

.page-home .hm-hero__art {
  margin: 0;
  border: 2px solid var(--ink-500);
  background: var(--ink-700);
  box-shadow: var(--hard-shadow);
  overflow: hidden;
}

.page-home .hm-hero__art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.page-home .hm-entry {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: clamp(18px, 2.2vw, 26px);
  border: 2px solid var(--ink-500);
  background: var(--ink-700);
  color: var(--white-soft);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.page-home .hm-entry:hover,
.page-home .hm-entry:focus-visible {
  transform: translateY(-2px);
  border-color: var(--glow-amber);
  box-shadow: var(--hard-shadow);
}

.page-home .hm-entry__tag {
  align-self: flex-start;
}

.page-home .hm-entry__title {
  font-family: var(--display);
  font-size: clamp(1.22rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: .02em;
}

.page-home .hm-entry__path {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--glow-amber);
}

.page-home .hm-entry__meta {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--mist-200);
}

.page-home .hm-entry__go {
  margin-top: auto;
  padding-top: 10px;
  font-size: .86rem;
  color: var(--signal-orange);
}

.page-home .hm-entry--cool .hm-entry__go {
  color: var(--celadon);
}

@media (min-width: 980px) {
  .page-home .hm-hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-home .hm-hero__lead {
    grid-column: span 7;
  }

  .page-home .hm-hero__art {
    grid-column: span 5;
  }

  .page-home .hm-entry--hot {
    grid-column: span 6;
  }

  .page-home .hm-entry--cool {
    grid-column: span 6;
  }
}

/* ---------- 换设备三步 ---------- */
.page-home .hm-swap {
  padding: var(--stack) 0;
  background: var(--paper-100);
  color: var(--ink-900);
}

.page-home .hm-swap__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hm-gap);
  margin-top: clamp(26px, 4vw, 44px);
}

.page-home .hm-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink-900);
}

.page-home .hm-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  padding: 18px 0;
  border-bottom: 2px solid var(--ink-900);
}

.page-home .hm-step__num {
  grid-row: span 2;
  font-family: var(--mono);
  font-size: .9rem;
  letter-spacing: .08em;
  color: var(--clay-600);
}

.page-home .hm-step__title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.4;
}

.page-home .hm-step__text {
  margin: 0;
  font-size: .94rem;
  line-height: 1.75;
  color: var(--hm-ink-soft);
}

.page-home .hm-swap__art {
  margin: 0;
  border: 2px solid var(--ink-900);
  background: var(--paper-300);
  box-shadow: 7px 7px 0 rgba(11, 22, 34, .26);
  overflow: hidden;
}

.page-home .hm-swap__art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (min-width: 900px) {
  .page-home .hm-swap__grid {
    grid-template-columns: 7fr 5fr;
    align-items: start;
    gap: clamp(24px, 3.4vw, 52px);
  }
}

/* ---------- 四项服务 ---------- */
.page-home .hm-modules {
  padding: var(--stack) 0;
  background: var(--ink-900);
  color: var(--white-soft);
}

.page-home .hm-modlist {
  list-style: none;
  margin: clamp(26px, 4vw, 44px) 0 0;
  padding: 0;
  border-top: 2px solid var(--ink-500);
}

.page-home .hm-mod {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--ink-500);
}

.page-home .hm-mod__num {
  font-family: var(--mono);
  font-size: .86rem;
  letter-spacing: .08em;
  color: var(--signal-orange);
}

.page-home .hm-mod__title {
  margin: 0 0 5px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
}

.page-home .hm-mod__text {
  margin: 0;
  font-size: .93rem;
  line-height: 1.75;
  color: var(--mist-200);
}

.page-home .hm-mod__path {
  display: none;
}

.page-home .hm-mod__link {
  grid-column: 2;
  justify-self: start;
  font-size: .88rem;
  color: var(--celadon);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}

.page-home .hm-mod__link:hover,
.page-home .hm-mod__link:focus-visible {
  color: var(--glow-amber);
  border-bottom-color: currentColor;
}

@media (min-width: 880px) {
  .page-home .hm-mod {
    grid-template-columns: 60px minmax(0, 1fr) 150px 152px;
    align-items: center;
    gap: 8px 22px;
  }

  .page-home .hm-mod__path {
    display: block;
    font-family: var(--mono);
    font-size: .78rem;
    letter-spacing: .06em;
    color: var(--glow-amber);
  }

  .page-home .hm-mod__link {
    grid-column: auto;
    justify-self: end;
  }
}

/* ---------- 资料库近况 ---------- */
.page-home .hm-library {
  padding: var(--stack) 0;
  background: var(--paper-100);
  color: var(--ink-900);
}

.page-home .hm-library__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hm-gap);
}

.page-home .hm-library__art {
  margin: 0;
  border: 2px solid var(--ink-900);
  background: var(--paper-300);
  box-shadow: 7px 7px 0 rgba(11, 22, 34, .22);
  overflow: hidden;
}

.page-home .hm-library__art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home .hm-library__body .prose {
  margin: 0;
  max-width: 38em;
  font-size: .98rem;
  line-height: 1.8;
  color: var(--hm-ink-soft);
}

.page-home .hm-facts {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink-900);
  border-left: 2px solid var(--ink-900);
}

.page-home .hm-facts li {
  padding: 14px 16px;
  border-right: 2px solid var(--ink-900);
  border-bottom: 2px solid var(--ink-900);
}

.page-home .hm-facts__num {
  display: block;
  font-family: var(--mono);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--clay-600);
}

.page-home .hm-facts__label {
  display: block;
  margin-top: 4px;
  font-size: .86rem;
  color: var(--hm-ink-soft);
}

@media (min-width: 900px) {
  .page-home .hm-library__grid {
    grid-template-columns: 5fr 7fr;
    align-items: start;
    gap: clamp(24px, 3.4vw, 52px);
  }
}

/* ---------- 版本与栏目 ---------- */
.page-home .hm-version {
  padding: var(--stack) 0;
  background: var(--ink-900);
  color: var(--white-soft);
}

.page-home .hm-version__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hm-gap);
}

.page-home .hm-version__body p {
  margin: 0 0 14px;
  max-width: 42em;
  font-size: .97rem;
  line-height: 1.8;
  color: var(--mist-200);
}

.page-home .hm-version__art {
  margin: 0;
  border: 2px solid var(--ink-500);
  background: var(--ink-700);
  box-shadow: var(--hard-shadow);
  overflow: hidden;
}

.page-home .hm-version__art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (min-width: 900px) {
  .page-home .hm-version__grid {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: clamp(24px, 3.4vw, 52px);
  }
}

/* ---------- 服务时间与属地 ---------- */
.page-home .hm-service {
  padding: var(--stack) 0 calc(var(--stack) * .66);
  background: var(--paper-100);
  color: var(--ink-900);
}

.page-home .hm-service__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hm-gap);
  margin-top: clamp(24px, 3vw, 40px);
}

.page-home .hm-service__card {
  padding: 20px;
  border: 2px solid var(--ink-900);
  background: var(--paper-300);
}

.page-home .hm-service__key {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay-600);
}

.page-home .hm-service__val {
  margin: 0;
  font-family: var(--mono);
  font-size: .95rem;
  line-height: 1.6;
  word-break: break-word;
}

.page-home .hm-service__hint {
  margin: 0 0 10px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--hm-ink-soft);
}

.page-home .copy-btn {
  margin-top: 12px;
  padding: 7px 14px;
  font-family: var(--sans);
  font-size: .8rem;
  border: 2px solid var(--ink-900);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-900);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.page-home .copy-btn:hover,
.page-home .copy-btn:focus-visible {
  background: var(--ink-900);
  color: var(--paper-100);
}

.page-home .copy-btn.is-done {
  background: var(--celadon);
  border-color: var(--celadon);
  color: var(--ink-900);
}

@media (min-width: 780px) {
  .page-home .hm-service__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 返回顶部 ---------- */
.page-home .to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 45;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink-500);
  border-radius: var(--radius);
  background: var(--ink-700);
  color: var(--paper-100);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease, border-color .2s ease;
}

.page-home .to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.page-home .to-top:hover,
.page-home .to-top:focus-visible {
  border-color: var(--glow-amber);
  color: var(--glow-amber);
}

.page-home .to-top__icon {
  display: block;
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-home .hm-entry,
  .page-home .hm-mod__link,
  .page-home .copy-btn,
  .page-home .to-top,
  .page-home .toc-rail__link {
    transition: none;
  }

  .page-home .hm-entry:hover {
    transform: none;
  }
}
