.page-home {
  --home-gut: 20px;
  --home-line: 1px solid var(--mist);
  --home-dash: repeating-linear-gradient(98deg, rgba(124, 145, 140, 0.35) 0 1px, transparent 1px 72px);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  padding-bottom: 40px;
}

.page-home .wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
}

.page-home .section {
  padding: 56px var(--home-gut);
}

.page-home .pin-jump {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 80;
  padding: 10px 16px;
  background: var(--coral);
  color: var(--white);
  font-size: 14px;
  text-decoration: none;
}

.page-home .pin-jump:focus {
  left: 12px;
  top: 12px;
}

.page-home a:focus-visible,
.page-home button:focus-visible,
.page-home summary:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* ---------- 置顶条带 ---------- */
.page-home .pin {
  background: var(--chart-deep);
  background-image: repeating-linear-gradient(98deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 64px);
  border-bottom: 3px solid var(--coral);
  color: var(--white);
}

.page-home .pin__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px var(--home-gut);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.page-home .pin__coord {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--palm);
}

.page-home .pin__note {
  margin: 0;
  flex: 1 1 200px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.page-home .pin__btn {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- 首屏 ---------- */
.page-home .masthead {
  position: relative;
  overflow: hidden;
  background: linear-gradient(158deg, var(--wash-1) 0%, var(--wash-2) 58%, var(--cream) 100%);
  border-bottom: var(--home-line);
}

.page-home .masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--home-dash);
  opacity: 0.5;
  pointer-events: none;
}

.page-home .masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(14, 59, 58, 0.5) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.05;
  pointer-events: none;
}

.page-home .masthead__chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: saturate(0.55);
  pointer-events: none;
}

.page-home .masthead__palm {
  position: absolute;
  right: -6%;
  bottom: 0;
  width: 62%;
  max-width: 470px;
  height: auto;
  opacity: 0.28;
  pointer-events: none;
}

.page-home .masthead__inner {
  position: relative;
  z-index: 2;
  padding: 40px var(--home-gut) 52px;
  max-width: var(--shell);
}

.page-home .masthead__title {
  display: flex;
  flex-direction: column;
  margin: 10px 0 0;
  font-size: clamp(44px, 13vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  font-weight: 900;
  color: var(--chart-deep);
}

.page-home .masthead__sub {
  margin-top: 0.14em;
  font-size: clamp(19px, 5vw, 38px);
  letter-spacing: 0.02em;
  font-weight: 800;
  color: var(--coral-deep);
}

.page-home .masthead__lede {
  margin: 22px 0 0;
  max-width: 30em;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}

.page-home .masthead__ways {
  margin: 20px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--tide);
}

/* ---------- 目录 ---------- */
.page-home .directory {
  background: var(--cream);
}

.page-home .directory__head {
  max-width: 34em;
}

.page-home .directory__head .display {
  font-size: clamp(28px, 6vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 8px 0 14px;
  color: var(--chart-deep);
}

.page-home .directory__head .lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  color: #4a3e38;
}

.page-home .filter-set {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 6px;
}

.page-home .chip {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1;
  padding: 10px 16px;
  border: 1px solid var(--mist);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.page-home .chip[aria-pressed="true"] {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}

.page-home .filter-status {
  margin: 0 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.page-home .dir-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}

.page-home .dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 20px 20px;
  background: var(--white);
  border: var(--home-line);
  border-radius: 2px;
  box-shadow: var(--shadow);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.page-home .dir-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 3px;
  background: var(--coral);
}

.page-home .dir-card:hover {
  transform: translateY(-2px);
}

.page-home .dir-card[hidden] {
  display: none;
}

.page-home .dir-card__coord {
  margin: 4px 0 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--tide);
}

.page-home .dir-card__title {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--chart-deep);
}

.page-home .dir-card__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: #4a3e38;
}

.page-home .dir-card__link {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--coral-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(192, 64, 31, 0.35);
  align-self: flex-start;
  padding-bottom: 2px;
}

.page-home .dir-card__link span {
  margin-left: 6px;
}

.page-home .dir-card__sub {
  font-size: 13px;
  color: var(--tide);
  text-decoration: none;
  align-self: flex-start;
  border-bottom: 1px dashed var(--mist);
}

/* ---------- 坐标路径 ---------- */
.page-home .route {
  position: relative;
  background: var(--chart-deep);
  color: var(--white);
  overflow: hidden;
}

.page-home .route::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.05;
  pointer-events: none;
}

.page-home .route__head {
  position: relative;
  z-index: 1;
  max-width: 32em;
}

.page-home .display--onDark {
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
  color: var(--white);
}

.page-home .route__map {
  position: relative;
  z-index: 1;
  margin: 28px 0 8px;
}

.page-home .route__svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
}

.page-home .route__grid-line {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
  stroke-dasharray: 5 7;
}

.page-home .route__path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: home-draw 1.2s var(--ease) 0.2s forwards;
}

.page-home .route__dot {
  fill: var(--palm);
}

.page-home .route__dot--anchor {
  fill: var(--coral);
}

@keyframes home-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.page-home .route__steps {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.page-home .route__step {
  padding: 16px 0 16px 16px;
  border-left: 2px solid rgba(232, 185, 59, 0.6);
}

.page-home .route__step-num {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--palm);
}

.page-home .route__step-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--white);
}

.page-home .route__step-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
}

.page-home .route__qa {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.page-home .qa {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.page-home .qa__summary {
  padding: 16px 30px 16px 0;
  position: relative;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  list-style: none;
}

.page-home .qa__summary::-webkit-details-marker {
  display: none;
}

.page-home .qa__summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--coral);
}

.page-home .qa[open] .qa__summary::after {
  content: "−";
}

.page-home .qa__body {
  padding: 0 0 18px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.76);
}

/* ---------- 设备切换 ---------- */
.page-home .switch {
  background: var(--cream);
}

.page-home .switch__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.page-home .display--sm {
  font-size: clamp(26px, 5.4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 8px 0 20px;
  color: var(--chart-deep);
}

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

.page-home .steps__item {
  position: relative;
  padding-left: 54px;
}

.page-home .steps__num {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--palm);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.page-home .steps__title {
  margin: 2px 0 6px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--chart-deep);
}

.page-home .steps__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: #4a3e38;
}

.page-home .switch__note {
  margin: 22px 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--coral);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.75;
  color: #4a3e38;
}

.page-home .switch__btn {
  display: inline-block;
  text-decoration: none;
}

.page-home .switch__figure {
  margin: 0;
}

.page-home .switch__figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border: var(--home-line);
  border-radius: 2px;
  background: var(--wash-2);
}

.page-home .switch__cap {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

/* ---------- 版本与文档 ---------- */
.page-home .docs {
  background: linear-gradient(180deg, var(--wash-2), var(--wash-1));
}

.page-home .docs__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 26px 20px;
  background: var(--paper);
  border: var(--home-line);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.page-home .docs__body .prose {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.85;
  color: #4a3e38;
  max-width: 34em;
}

.page-home .docs__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.page-home .docs__links .btn {
  text-decoration: none;
}

.page-home .docs__figure {
  margin: 0;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%);
}

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

/* ---------- 出口 ---------- */
.page-home .exit {
  background: var(--cream);
  padding-bottom: 96px;
  border-top: 1px dashed var(--mist);
}

.page-home .exit__lead {
  margin: 0 0 24px;
  max-width: 36em;
  font-size: 16px;
  line-height: 1.85;
  color: #4a3e38;
}

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

.page-home .exit__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: var(--home-line);
  border-left: 3px solid var(--coral);
  border-radius: 2px;
  background: var(--white);
  color: var(--chart-deep);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.page-home .exit__link span {
  color: var(--coral-deep);
}

.page-home .exit__link:hover {
  background: var(--wash-1);
}

/* ---------- 中等屏 ---------- */
@media (min-width: 768px) {
  .page-home {
    --home-gut: 32px;
  }

  .page-home .section {
    padding: 68px var(--home-gut);
  }

  .page-home .masthead__inner {
    padding: 60px var(--home-gut) 72px;
  }

  .page-home .masthead__palm {
    width: 46%;
    opacity: 0.34;
  }

  .page-home .dir-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .page-home .route__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }

  .page-home .route__step {
    border-left: none;
    border-top: 2px solid rgba(232, 185, 59, 0.6);
    padding: 16px 0 0;
  }

  .page-home .docs__panel {
    padding: 34px 30px;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 30px;
  }

  .page-home .exit__list {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .exit__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ---------- 宽屏错位 ---------- */
@media (min-width: 1024px) {
  .page-home {
    --home-gut: 64px;
  }

  .page-home .section {
    padding: 76px var(--home-gut);
  }

  .page-home .switch__grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
  }

  .page-home .dir-grid {
    gap: 28px 32px;
    padding-right: 48px;
  }

  .page-home .dir-card:nth-child(2) {
    transform: translate(24px, 24px);
  }

  .page-home .dir-card:nth-child(2):hover {
    transform: translate(24px, 22px);
  }

  .page-home .dir-card:nth-child(4) {
    transform: translate(48px, 24px);
  }

  .page-home .dir-card:nth-child(4):hover {
    transform: translate(48px, 22px);
  }

  .page-home .directory__head {
    max-width: 40em;
  }

  .page-home .masthead__lede {
    font-size: 18px;
  }

  .page-home .exit {
    padding-bottom: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .route__path {
    animation: none;
    stroke-dashoffset: 0;
  }

  .page-home .dir-card,
  .page-home .exit__link,
  .page-home .chip {
    transition: none;
  }

  .page-home .dir-card:hover {
    transform: none;
  }

  .page-home .dir-card:nth-child(2):hover,
  .page-home .dir-card:nth-child(4):hover {
    transform: translate(24px, 24px);
  }
}
