.page-home {
  --rail-w: 176px;
  --panel-pad: clamp(18px, 2.4vw, 30px);
  position: relative;
  padding-block: clamp(20px, 4vw, 40px) clamp(56px, 8vw, 104px);
  color: var(--mist);
  background:
    radial-gradient(80% 55% at 92% -6%, rgba(108, 77, 255, 0.26), transparent 62%),
    radial-gradient(65% 45% at 0% 58%, rgba(25, 198, 181, 0.16), transparent 70%),
    var(--abyss);
  overflow-x: clip;
}

.page-home a:focus-visible {
  outline: 2px solid var(--teal-soft);
  outline-offset: 3px;
}

.page-home .home-shell {
  width: min(100% - (var(--gutter) * 2), 1320px);
  margin-inline: auto;
}

.page-home .home-hero {
  position: relative;
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  padding-block-start: clamp(12px, 2vw, 24px);
}

/* ---------- 侧边章节轨道 ---------- */
.page-home .hero-rail {
  order: 3;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(11, 42, 69, 0.62);
}

.page-home .hero-rail__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-soft);
}

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

.page-home .hero-rail__link {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--mist);
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.page-home .hero-rail__link:hover,
.page-home .hero-rail__link:focus-visible {
  border-color: var(--teal);
  color: var(--teal-soft);
  background: rgba(25, 198, 181, 0.12);
}

.page-home .hero-rail__note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(244, 247, 249, 0.5);
}

/* ---------- 首屏文字 ---------- */
.page-home .home-crumb {
  margin: 0 0 14px;
}

.page-home .home-crumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(244, 247, 249, 0.5);
}

.page-home .home-crumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-strong);
}

.page-home .home-crumb a {
  color: var(--teal-soft);
  text-decoration: none;
}

.page-home .home-crumb a:hover {
  color: var(--coral);
}

.page-home .hero-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--teal-soft);
}

.page-home .hero-title {
  margin: 14px 0 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(34px, 6.4vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--mist);
}

.page-home .hero-lede {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: var(--fs-body);
  line-height: 1.8;
  color: rgba(244, 247, 249, 0.76);
}

/* ---------- 首屏错层卡片 ---------- */
.page-home .hero-deck {
  display: grid;
  gap: 18px;
}

.page-home .hero-figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--navy);
  box-shadow: var(--hard-md);
}

.page-home .hero-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.page-home .hero-figure__cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--teal-soft);
  background: linear-gradient(to top, rgba(6, 26, 43, 0.95), rgba(6, 26, 43, 0));
}

.page-home .chapter-board {
  list-style: none;
  margin: 0;
  padding: var(--panel-pad);
  display: grid;
  gap: 2px;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--hard-md);
}

.page-home .chapter-board__item + .chapter-board__item {
  border-top: 1px solid var(--line-faint);
}

.page-home .chapter-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 4px;
  color: inherit;
  text-decoration: none;
}

.page-home .chapter-row__num {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.page-home .chapter-row__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.page-home .chapter-row__title {
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 800;
  color: var(--mist);
  transition: color 0.18s ease;
}

.page-home .chapter-row__text {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(244, 247, 249, 0.66);
}

.page-home .chapter-row__go {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--teal);
  transition: color 0.18s ease;
}

.page-home .chapter-row:hover .chapter-row__title,
.page-home .chapter-row:focus-visible .chapter-row__title,
.page-home .chapter-row:hover .chapter-row__go,
.page-home .chapter-row:focus-visible .chapter-row__go {
  color: var(--coral);
}

/* ---------- 章节通用 ---------- */
.page-home .chapter {
  padding-block: clamp(40px, 6vw, 84px);
}

.page-home .chapter + .chapter {
  border-top: 1px solid var(--line-faint);
}

.page-home .chapter-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(22px, 3vw, 34px);
}

.page-home .chapter-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(52px, 9vw, 104px);
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(245, 185, 76, 0.72);
}

.page-home .chapter-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--teal-soft);
}

.page-home .chapter-title {
  margin: 8px 0 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-home .chapter-lead {
  margin: 12px 0 0;
  max-width: 52ch;
  font-size: var(--fs-body);
  line-height: 1.78;
  color: rgba(244, 247, 249, 0.74);
}

/* ---------- 双入口 ---------- */
.page-home .entry-grid {
  display: grid;
  gap: 18px;
}

.page-home .entry-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--panel-pad);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--navy);
  box-shadow: var(--hard-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.page-home .entry-card--a {
  background: linear-gradient(155deg, rgba(108, 77, 255, 0.26), transparent 52%), var(--navy);
}

.page-home .entry-card--b {
  background: linear-gradient(155deg, rgba(25, 198, 181, 0.2), transparent 52%), var(--navy);
}

.page-home .entry-card:hover,
.page-home .entry-card:focus-within {
  border-color: var(--coral);
  box-shadow: var(--hard-md);
  transform: translate(-2px, -2px);
}

.page-home .entry-card__title {
  margin: 0;
  font-size: clamp(19px, 1.9vw, 24px);
  font-weight: 800;
  line-height: 1.3;
}

.page-home .entry-card__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(244, 247, 249, 0.74);
}

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

.page-home .entry-list li {
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(244, 247, 249, 0.7);
}

.page-home .entry-list li::before {
  content: "▸";
  color: var(--teal);
}

.page-home .entry-card .btn {
  align-self: flex-start;
  margin-top: 4px;
}

.page-home .entry-texture {
  position: relative;
  margin: 24px 0 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--hard-sm);
}

.page-home .entry-texture img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.page-home .entry-texture__cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(to top, rgba(6, 26, 43, 0.96), rgba(6, 26, 43, 0));
}

/* ---------- 移动端版本归档 ---------- */
.page-home .version-grid {
  display: grid;
  gap: 24px;
}

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

.page-home .version-item {
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
}

.page-home .version-item__key {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.page-home .version-item__text {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(244, 247, 249, 0.74);
}

.page-home .version-note {
  margin: 18px 0 0;
  font-size: 13px;
  color: rgba(244, 247, 249, 0.6);
}

.page-home .version-main .btn {
  margin-top: 16px;
}

.page-home .version-figure {
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--hard-md);
  background: var(--navy);
}

.page-home .version-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- 新用户专区 ---------- */
.page-home .starter-panel {
  display: grid;
  gap: 24px;
  padding: clamp(20px, 3vw, 34px);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--hard-md);
  background:
    linear-gradient(140deg, rgba(108, 77, 255, 0.28), rgba(25, 198, 181, 0.14) 55%, transparent 88%),
    var(--navy);
}

.page-home .starter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.page-home .starter-paths {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .starter-paths li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(244, 247, 249, 0.8);
}

.page-home .starter-paths li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.page-home .starter-main .btn {
  margin-top: 18px;
}

.page-home .starter-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-home .stat {
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(6, 26, 43, 0.62);
}

.page-home .stat__num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  color: var(--gold);
}

.page-home .stat__label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(244, 247, 249, 0.66);
}

/* ---------- 服务与联络 ---------- */
.page-home .service-grid {
  display: grid;
  gap: 22px;
}

.page-home .service-figure {
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--hard-sm);
  background: var(--navy);
}

.page-home .service-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.page-home .service-panel {
  padding: var(--panel-pad);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
}

.page-home .service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.page-home .service-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0;
}

.page-home .service-row + .service-row {
  border-top: 1px solid var(--line-faint);
}

.page-home .service-row__key {
  font-size: 14px;
  color: rgba(244, 247, 249, 0.72);
}

.page-home .service-row__val {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--teal-soft);
}

.page-home .service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.page-home .link-more {
  font-size: 14px;
  color: var(--teal-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.page-home .link-more:hover,
.page-home .link-more:focus-visible {
  color: var(--coral);
  border-color: var(--coral);
}

/* ---------- 断点 ---------- */
@media (min-width: 720px) {
  .page-home .hero-deck {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }

  .page-home .chapter-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 22px;
  }

  .page-home .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
  }

  .page-home .entry-card--b {
    margin-top: 28px;
  }

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

@media (min-width: 960px) {
  .page-home .home-hero {
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    grid-template-areas:
      "rail intro"
      "rail deck";
    column-gap: clamp(24px, 3vw, 44px);
    align-items: start;
  }

  .page-home .home-hero::before {
    content: "";
    position: absolute;
    left: 18%;
    top: 30%;
    width: min(42%, 400px);
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(25, 198, 181, 0.5), transparent);
    transform: rotate(-14deg);
    transform-origin: left center;
    pointer-events: none;
  }

  .page-home .hero-rail {
    grid-area: rail;
    order: 0;
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }

  .page-home .hero-rail__list {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .page-home .hero-rail__link {
    display: block;
  }

  .page-home .hero-intro {
    grid-area: intro;
  }

  .page-home .hero-deck {
    grid-area: deck;
  }

  .page-home .version-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    align-items: center;
    gap: clamp(24px, 4vw, 48px);
  }

  .page-home .starter-panel {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 32px;
  }

  .page-home .service-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: stretch;
    gap: 24px;
  }

  .page-home .service-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
