/* ===== 首页 · page-home ===== */
.page-home {
  --rail-w: 176px;
  --card-gap: 12px;
  background: var(--ink);
  color: var(--text);
  overflow-x: hidden;
}

.page-home .hero,
.page-home .home-sec {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

/* ---------- 首屏 ---------- */
.page-home .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink-deep);
  padding: clamp(52px, 7vw, 104px) var(--gutter) clamp(48px, 6vw, 88px);
}

.page-home .hero::before,
.page-home .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-home .hero::before {
  z-index: -2;
  background: linear-gradient(158deg, #FBF7EE 0%, var(--paper) 58%, var(--paper-shade) 100%);
  clip-path: polygon(0 0, 61% 0, 43% 100%, 0 100%);
}

.page-home .hero::after {
  z-index: -1;
  background: linear-gradient(180deg, var(--cyan), var(--blue) 52%, var(--orange));
  clip-path: polygon(61% 0, 62.4% 0, 44.4% 100%, 43% 100%);
  opacity: .9;
}

.page-home .hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .35;
  pointer-events: none;
}

.page-home .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 44px);
  max-width: var(--shell);
  margin: 0 auto;
}

.page-home .hero-copy {
  max-width: 580px;
}

.page-home .hero-kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 10px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--paper-muted);
  border: 1px solid var(--hair-paper);
  border-radius: var(--radius);
}

.page-home .hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5.2vw, 52px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: var(--paper-ink);
}

.page-home .hero-lead {
  margin: 0 0 26px;
  max-width: 46ch;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  color: #3C4360;
}

.page-home .hero-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .hero-acts .btn--ghost {
  color: var(--paper-ink);
  border-color: var(--hair-paper);
}

/* ---------- 首屏状态面板 ---------- */
.page-home .status-card {
  background: rgba(23, 31, 61, .94);
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 20px 50px rgba(3, 6, 18, .5);
}

.page-home .sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.page-home .sc-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: transparent;
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}

.page-home .sc-copy:hover {
  border-color: var(--orange);
  background: rgba(255, 107, 44, .08);
}

.page-home .sc-copy-label {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}

.page-home .sc-copy-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
}

.page-home .sc-copy-hint {
  font-size: 11px;
  color: var(--green);
}

.page-home .status-shot {
  margin: 0 0 14px;
}

.page-home .status-shot img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.page-home .sc-rows {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-home .sc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  background: var(--panel-soft);
}

.page-home .sc-row dt {
  font-size: 12px;
  color: var(--muted);
}

.page-home .sc-row dd {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  text-align: right;
}

.page-home .sc-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--hair);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  transition: color .3s var(--ease);
}

.page-home .status-card:hover .sc-note,
.page-home .status-card:focus-within .sc-note {
  color: var(--text);
}

/* ---------- 过渡数据带 ---------- */
.page-home .flow-band {
  position: relative;
  background: var(--ink-deep);
  line-height: 0;
}

.page-home .flow-band img {
  display: block;
  width: 100%;
  height: auto;
}

.page-home .flow-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--ink-deep), rgba(7, 12, 27, 0) 14%, rgba(7, 12, 27, 0) 86%, var(--ink-deep));
}

/* ---------- 主体栅格与左侧索引 ---------- */
.page-home .home-frame {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
}

.page-home .rail {
  display: none;
}

.page-home .home-col {
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  min-width: 0;
}

/* ---------- 章节面板 ---------- */
.page-home .home-sec {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 34px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 16px 44px rgba(3, 6, 18, .3);
}

.page-home .home-sec--slim {
  background: linear-gradient(120deg, var(--panel-soft), var(--panel) 70%);
  border-left: 2px solid var(--orange);
}

.page-home .sec-num {
  display: block;
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
}

.page-home .home-sec h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 31px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--text);
}

.page-home .home-lead {
  margin: 0 0 22px;
  max-width: 64ch;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--muted);
}

/* ---------- 两条入口 ---------- */
.page-home .entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--card-gap);
}

.page-home .entry-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: clamp(16px, 2.4vw, 24px);
  background: var(--panel-soft);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.page-home .entry-card--ink {
  background: linear-gradient(150deg, rgba(53, 214, 232, .10), rgba(23, 31, 61, .95) 55%);
  border-color: var(--hair-strong);
}

.page-home .entry-media {
  margin: 0;
  width: min(210px, 58%);
}

.page-home .entry-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.page-home .entry-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}

.page-home .entry-text {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--muted);
}

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

.page-home .entry-facts li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
  font-size: 13.5px;
  color: var(--muted);
}

.page-home .entry-facts .mono {
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  white-space: nowrap;
}

.page-home .entry-note {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---------- 索引网格 ---------- */
.page-home .filters {
  margin-bottom: 16px;
}

.page-home .idx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr));
  gap: var(--card-gap);
}

.page-home .idx-card {
  display: grid;
  gap: 6px;
  padding: 14px 15px 16px;
  background: var(--panel-soft);
  border: 1px solid var(--hair);
  border-left: 2px solid var(--hair-strong);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.page-home .idx-card:nth-child(3n+1) { border-left-color: var(--orange); }
.page-home .idx-card:nth-child(3n+2) { border-left-color: var(--cyan); }
.page-home .idx-card:nth-child(3n+3) { border-left-color: var(--blue); }

.page-home .idx-card:hover,
.page-home .idx-card:focus-visible {
  transform: translateY(-2px);
  border-top-color: var(--hair-strong);
  border-right-color: var(--hair-strong);
  border-bottom-color: var(--hair-strong);
}

.page-home .idx-id {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}

.page-home .idx-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.page-home .idx-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.page-home .idx-meta {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(152, 162, 192, .78);
}

.page-home .index-figure {
  margin: 18px 0 0;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-home .index-figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- 换设备步骤 ---------- */
.page-home .switch-steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .switch-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: rgba(18, 26, 54, .62);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.page-home .step-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-ink);
  background: var(--orange);
  border-radius: var(--radius);
}

.page-home .switch-body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.page-home .switch-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 帮助 ---------- */
.page-home .help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--card-gap);
}

.page-home .help-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px 18px;
  background: var(--panel-soft);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.page-home .help-card:hover,
.page-home .help-card:focus-visible {
  border-color: var(--hair-strong);
  transform: translateY(-2px);
}

.page-home .help-num {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--cyan);
}

.page-home .help-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.page-home .help-desc {
  font-size: 13px;
  line-height: 1.72;
  color: var(--muted);
  word-break: break-word;
}

/* ---------- 响应式 ---------- */
@media (max-width: 999px) {
  .page-home .hero {
    background: var(--paper);
  }
  .page-home .hero::before,
  .page-home .hero::after,
  .page-home .hero-veil {
    display: none;
  }
  .page-home .hero-lead {
    color: #3C4360;
  }
}

@media (min-width: 620px) {
  .page-home .help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .page-home .entry-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

@media (min-width: 1000px) {
  .page-home .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 392px);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
  }
}

@media (min-width: 1080px) {
  .page-home .home-frame {
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    align-items: start;
    gap: clamp(24px, 3vw, 44px);
  }
  .page-home .rail {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 26px);
    padding-left: 14px;
    border-left: 1px solid var(--hair);
  }
  .page-home .rail-id {
    display: inline-block;
    width: 20px;
    font-size: 10.5px;
    color: rgba(152, 162, 192, .7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .idx-card,
  .page-home .help-card,
  .page-home .sc-copy,
  .page-home .sc-note {
    transition: none;
  }
  .page-home .idx-card:hover,
  .page-home .help-card:hover {
    transform: none;
  }
}
