.page-home {
  --deck-glow: 0 0 0 1px rgba(63, 224, 206, .32), 0 14px 34px -18px rgba(63, 224, 206, .55);
  --deck-orange-glow: 0 0 0 1px rgba(255, 138, 61, .3), 0 14px 34px -18px rgba(255, 138, 61, .55);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(30px, 5vw, 62px) 0 clamp(42px, 6.5vw, 84px);
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -16%;
  right: -20%;
  width: min(920px, 94vw);
  height: min(780px, 100vw);
  background: linear-gradient(158deg, rgba(18, 74, 71, .98) 0%, rgba(16, 52, 74, .7) 46%, rgba(6, 14, 26, 0) 76%);
  clip-path: polygon(100% 0, 100% 100%, 0 68%, 26% 0);
  pointer-events: none;
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 7%;
  right: -12%;
  width: min(780px, 86vw);
  height: 2px;
  background: linear-gradient(90deg, rgba(63, 224, 206, 0), rgba(63, 224, 206, .85));
  transform: rotate(-17deg);
  pointer-events: none;
}

.page-home .home-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(22px, 3.4vw, 38px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "copy"
    "deck"
    "media";
}

.page-home .home-hero__copy { grid-area: copy; }

.page-home .home-hero__brand {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
}

.page-home .home-hero__title {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(36px, 6.2vw, 64px);
  line-height: 1.14;
  letter-spacing: .01em;
}

.page-home .home-hero__title span {
  display: inline-block;
  color: var(--teal);
  border-bottom: 3px solid var(--orange);
  padding-bottom: 2px;
}

.page-home .home-hero__lede {
  max-width: 40ch;
  margin: 0 0 28px;
  color: var(--muted);
}

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

.page-home .home-hero__media {
  grid-area: media;
  position: relative;
  margin: 0;
  overflow: hidden;
  border: var(--bw-thick) solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-hard);
}

.page-home .home-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(.92) contrast(1.05);
}

.page-home .home-hero__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), rgba(63, 224, 206, 0) 72%);
}

/* 状态面板 */
.page-home .status-deck {
  grid-area: deck;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.4vw, 30px);
  border: var(--bw-thick) solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(12, 27, 46, .96), rgba(6, 14, 26, .96));
  box-shadow: var(--shadow-hard);
}

.page-home .status-deck__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--line);
}

.page-home .deck-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border: 2px solid rgba(63, 224, 206, .45);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
}

.page-home .deck-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  animation: home-deck-pulse 2.4s ease-in-out infinite;
}

.page-home .status-deck__cycle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--muted);
}

.page-home .status-deck__list {
  display: grid;
  margin: 0;
}

.page-home .status-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 2px dashed var(--line);
}

.page-home .status-row:last-child { border-bottom: 0; }

.page-home .status-row dt {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--muted);
}

.page-home .status-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  text-align: right;
}

.page-home .status-row dd.is-key {
  font-size: 20px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: .06em;
}

.page-home .status-deck__scan {
  position: absolute;
  top: 0;
  left: -45%;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, rgba(63, 224, 206, 0), rgba(63, 224, 206, .1), rgba(63, 224, 206, 0));
  animation: home-deck-scan 7s linear infinite;
  pointer-events: none;
}

@keyframes home-deck-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .32; }
}

@keyframes home-deck-scan {
  0% { left: -45%; }
  100% { left: 110%; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .deck-chip__dot,
  .page-home .status-deck__scan { animation: none; }
}

/* ---------- 章节导航条 ---------- */
.page-home__toc {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 4px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.page-home__toc::-webkit-scrollbar { display: none; }

.page-home__toc .toc__link {
  flex: 0 0 auto;
  padding: 8px 15px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease;
}

.page-home__toc .toc__link:hover,
.page-home__toc .toc__link[aria-current="true"] {
  border-color: var(--teal);
  color: var(--teal);
}

/* ---------- 01 四个入口 ---------- */
.page-home .mod-deck {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

.page-home .mod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 30px);
  border: var(--bw-thick) solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-hard);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.page-home .mod-card:hover {
  border-color: var(--teal);
  box-shadow: var(--deck-glow);
  transform: translateY(-3px);
}

.page-home .mod-card__code {
  align-self: flex-start;
  padding: 3px 9px;
  border: 2px solid rgba(255, 138, 61, .4);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--orange);
}

.page-home .mod-card__kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-home .mod-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.35;
}

.page-home .mod-card__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.82;
  color: var(--muted);
}

.page-home .mod-card__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--amber);
}

.page-home .mod-card__figure { margin: 4px 0 0; }

.page-home .mod-card__figure .figure__media { aspect-ratio: 16 / 9; }

.page-home .mod-card__figure .figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .mod-card__link {
  align-self: flex-start;
  margin-top: auto;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  transition: border-color .2s ease;
}

.page-home .mod-card__link::after { content: " →"; }

.page-home .mod-card__link:hover { border-bottom-color: var(--teal); }

/* ---------- 02 版本与校验 ---------- */
.page-home .page-home__versions {
  background-image: linear-gradient(162deg, rgba(51, 38, 94, .98) 0%, rgba(30, 24, 62, .92) 52%, rgba(6, 14, 26, 1) 100%);
}

.page-home .ver-layout {
  display: grid;
  gap: clamp(24px, 3.2vw, 38px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.page-home .ver-layout__figure { margin: 0; }

.page-home .ver-layout__figure .figure__media { aspect-ratio: 3 / 2; }

.page-home .ver-layout__figure .figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .ver-track {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-home .ver-item {
  position: relative;
  padding: 0 0 26px 30px;
  border-left: 2px solid rgba(233, 239, 247, .2);
}

.page-home .ver-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.page-home .ver-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--teal);
  border-radius: 50%;
  background: #1e183e;
}

.page-home .ver-item__tag {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--amber);
}

.page-home .ver-item h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.4;
}

.page-home .ver-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .home-stats {
  margin-top: clamp(32px, 4vw, 52px);
  border-top: 2px solid rgba(233, 239, 247, .18);
  border-left: 2px solid rgba(233, 239, 247, .18);
}

.page-home .home-stats .stat { border-color: rgba(233, 239, 247, .18); }

.page-home .ver-note {
  margin: clamp(22px, 2.8vw, 32px) 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .ver-note a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 2px solid rgba(63, 224, 206, .35);
}

.page-home .ver-note a:hover { border-bottom-color: var(--teal); }

/* ---------- 03 三步自查 ---------- */
.page-home .path-layout {
  display: grid;
  gap: clamp(26px, 3.4vw, 42px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.page-home .path-layout__steps { min-width: 0; }

.page-home .path-layout__figure { margin: 0; }

.page-home .path-layout__figure .figure__media { aspect-ratio: 2 / 1; }

.page-home .path-layout__figure .figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .path-layout__steps .step__num { color: var(--orange); }

/* ---------- 04 官方站与专线 ---------- */
.page-home .page-home__service {
  background-image: linear-gradient(160deg, rgba(18, 74, 71, .96) 0%, rgba(11, 45, 52, .9) 58%, rgba(6, 14, 26, 1) 100%);
}

.page-home .service-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

.page-home .service-block {
  padding: clamp(20px, 2.4vw, 28px);
  border: var(--bw-thick) solid rgba(233, 239, 247, .16);
  border-radius: var(--radius);
  background: rgba(6, 14, 26, .55);
}

.page-home .service-block__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.4;
}

.page-home .service-block p {
  margin: 0;
  font-size: 15px;
  line-height: 1.82;
  color: var(--muted);
}

.page-home .service-block__hint {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--amber);
}

.page-home .contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.page-home .contact-list__row {
  display: grid;
  gap: 4px;
}

.page-home .contact-list__row dt {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-home .contact-list__row dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}

.page-home .contact-list__row dd.mono { color: var(--teal); }

/* ---------- 05 新手速查 ---------- */
.page-home .starter-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.page-home .starter-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px;
  border: var(--bw-thick) solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .42);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.page-home .starter-card:hover {
  border-color: var(--orange);
  box-shadow: var(--deck-orange-glow);
  transform: translateY(-3px);
}

.page-home .starter-card__code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--orange);
}

.page-home .starter-card__q {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.55;
}

.page-home .starter-card__go {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-home .starter-card__go::after { content: " →"; }

.page-home .starter-card:hover .starter-card__go { color: var(--teal); }

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .page-home .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 820px) {
  .page-home .mod-deck {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
  }

  .page-home .mod-card--a { grid-column: 1 / 7; }
  .page-home .mod-card--b { grid-column: 7 / 13; margin-top: 42px; }
  .page-home .mod-card--c { grid-column: 1 / 6; }
  .page-home .mod-card--d { grid-column: 6 / 13; margin-top: -26px; }
}

@media (min-width: 900px) {
  .page-home .home-hero__grid {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    grid-template-areas:
      "copy deck"
      "media deck";
    column-gap: clamp(30px, 4vw, 66px);
    align-items: start;
  }

  .page-home .ver-layout {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  }

  .page-home .path-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  }
}

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

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

  .page-home .service-block--a { grid-column: span 5; }
  .page-home .service-block--b { grid-column: span 7; }
  .page-home .service-block--c { grid-column: span 7; }
  .page-home .service-block--d { grid-column: span 5; }

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