.page-home {
  --home-gap: clamp(0.85rem, 2vw, 1.3rem);
  --home-radius: 18px;
  display: block;
}

/* ---------- 面包屑上下文 ---------- */
.page-home .crumbs {
  margin-bottom: clamp(1rem, 3vw, 1.8rem);
}

/* ---------- 首屏拼贴 ---------- */
.page-home .home-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(1.4rem, 4vw, 2.6rem) clamp(2rem, 6vw, 4rem);
  background:
    radial-gradient(115% 85% at 10% 0%, rgba(37, 230, 230, .16), transparent 56%),
    radial-gradient(90% 75% at 100% 8%, rgba(255, 122, 26, .13), transparent 62%),
    var(--bg);
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    112deg,
    rgba(37, 230, 230, .055) 0 1px,
    transparent 1px 26px
  );
  pointer-events: none;
}

.page-home .home-hero > .shell {
  position: relative;
  z-index: 1;
}

.page-home .home-hero-stage {
  display: grid;
  gap: var(--home-gap);
  grid-template-columns: minmax(0, 1fr);
}

.page-home .home-hero-lead h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 8.4vw, 3.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0.55rem 0 0;
  text-shadow: 0 0 30px rgba(37, 230, 230, .2);
}

.page-home .home-hero-lede {
  margin: 1rem 0 0;
  max-width: 46ch;
  font-size: clamp(0.98rem, 2.6vw, 1.08rem);
  line-height: 1.78;
  color: var(--text-dim);
}

.page-home .home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: clamp(1.1rem, 3.5vw, 1.7rem);
}

.page-home .home-hero-shot {
  align-self: start;
  box-shadow: var(--shadow-soft);
}

.page-home .home-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--home-gap);
}

.page-home .home-metric {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: clamp(0.9rem, 2.6vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 30, 51, .96), rgba(13, 22, 38, .92));
  overflow: hidden;
}

.page-home .home-metric::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  opacity: .7;
}

.page-home .home-metric-value {
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 700;
  color: var(--cyan-soft);
  letter-spacing: -0.01em;
}

.page-home .home-metric-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.page-home .home-hero-paths {
  border-top: 1px solid var(--line-soft);
  padding-top: clamp(0.85rem, 2.5vw, 1.15rem);
}

.page-home .home-hero-paths .toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-home .home-hero-paths .toc-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}

.page-home .home-hero-paths .toc-link:hover,
.page-home .home-hero-paths .toc-link:focus-visible {
  color: var(--cyan-soft);
  border-color: rgba(37, 230, 230, .55);
  background: rgba(37, 230, 230, .08);
}

/* ---------- 通用章节头 ---------- */
.page-home .home-section-head {
  max-width: 56ch;
  margin-bottom: clamp(1.4rem, 4vw, 2.4rem);
}

.page-home .home-section-head .section-title {
  margin: 0.5rem 0 0;
}

.page-home .home-section-head .section-lede {
  margin-top: 0.85rem;
}

/* ---------- 三步看球 ---------- */
.page-home .home-steps {
  background: linear-gradient(180deg, var(--bg-abyss), var(--bg));
}

.page-home .home-step-list {
  display: grid;
  gap: var(--home-gap);
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: home-step;
}

.page-home .home-step {
  position: relative;
  padding: clamp(1.1rem, 3.2vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(18, 30, 51, .94), rgba(7, 11, 20, .88));
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.page-home .home-step::before {
  content: "";
  position: absolute;
  inset-inline: clamp(1.1rem, 3.2vw, 1.6rem);
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), rgba(37, 230, 230, 0));
}

.page-home .home-step:hover {
  border-color: rgba(37, 230, 230, .45);
  transform: translateY(-3px);
}

.page-home .home-step-index {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.page-home .home-step-title {
  margin: 0.7rem 0 0;
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 4.4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text);
}

.page-home .home-step-text {
  margin: 0.7rem 0 0;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-dim);
}

.page-home .home-step-hint {
  margin: 1rem 0 0;
}

.page-home .home-step-hint .panel-link {
  display: inline-block;
  font-size: 0.86rem;
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 122, 26, .45);
  padding-bottom: 1px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.page-home .home-step-hint .panel-link:hover,
.page-home .home-step-hint .panel-link:focus-visible {
  color: var(--ember);
  border-color: var(--ember);
}

/* ---------- 模块对比 ---------- */
.page-home .home-compare-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 22, 38, .82);
  overflow: hidden;
}

.page-home .home-compare-foot {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.2rem, 3.5vw, 1.8rem);
  padding: clamp(1.1rem, 3.2vw, 1.6rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(37, 230, 230, .1), rgba(255, 122, 26, .08)),
    rgba(18, 30, 51, .92);
}

.page-home .home-compare-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.78;
  color: var(--text);
}

.page-home .home-compare-foot .btn {
  justify-self: start;
}

/* ---------- 通勤场景 ---------- */
.page-home .home-commute {
  background: var(--bg-abyss);
}

.page-home .home-commute-grid {
  display: grid;
  gap: clamp(1.2rem, 3.5vw, 2.2rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.page-home .home-commute-shot {
  box-shadow: var(--shadow-soft);
}

.page-home .home-commute-list {
  display: grid;
  gap: 0.95rem;
  margin: clamp(1.2rem, 3.5vw, 1.8rem) 0 0;
  padding: 0;
  list-style: none;
}

.page-home .home-commute-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--line-soft);
}

.page-home .home-commute-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.page-home .home-commute-item .status-dot {
  margin-top: 0.5rem;
}

.page-home .home-commute-item strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.page-home .home-commute-item p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--text-dim);
}

/* ---------- 数据面板 ---------- */
.page-home .home-panel-shot {
  margin-bottom: clamp(1.1rem, 3.2vw, 1.7rem);
}

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

.page-home .home-bento-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: clamp(0.95rem, 2.8vw, 1.35rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 30, 51, .95), rgba(13, 22, 38, .9));
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.page-home .home-bento-cell:hover {
  border-color: rgba(122, 247, 247, .42);
  transform: translateY(-2px);
}

.page-home .home-bento-cell--hist {
  grid-column: span 2;
}

.page-home .home-bento-cell--form {
  grid-column: span 2;
}

.page-home .home-bento-cell .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.page-home .home-bento-cell .panel-title {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.page-home .home-bento-cell .panel-text {
  font-size: 0.88rem;
  line-height: 1.72;
  color: var(--text-dim);
}

.page-home .home-hist-visual {
  display: grid;
  gap: 0.45rem;
  margin: 0.35rem 0 0.2rem;
}

.page-home .home-hist-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(28, 58, 74, .75);
  position: relative;
  overflow: hidden;
}

.page-home .home-hist-bar::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: 999px;
}

.page-home .home-hist-bar--a::after {
  width: 72%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-soft));
}

.page-home .home-hist-bar--b::after {
  width: 54%;
  background: linear-gradient(90deg, var(--ember), var(--orange));
}

.page-home .home-hist-bar--c::after {
  width: 38%;
  background: linear-gradient(90deg, rgba(255, 122, 26, .9), rgba(255, 122, 26, .25));
}

.page-home .home-hist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.page-home .home-hist-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.page-home .home-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.page-home .home-swatch--cyan { background: var(--cyan); }
.page-home .home-swatch--ember { background: var(--ember); }
.page-home .home-swatch--orange { background: var(--orange); }

/* ---------- 底部脉络 ---------- */
.page-home .home-vein {
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(37, 230, 230, .08), transparent 60%),
    var(--bg-abyss);
}

.page-home .home-vein-figure {
  position: relative;
  margin-bottom: clamp(1.3rem, 4vw, 2rem);
}

.page-home .home-vein-svg {
  display: block;
  width: 100%;
  height: clamp(56px, 10vw, 110px);
  margin-bottom: -1.2rem;
}

.page-home .home-vein-shot {
  box-shadow: var(--shadow-soft);
}

.page-home .home-vein-links {
  display: grid;
  gap: var(--home-gap);
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-home .home-vein-card {
  display: grid;
  gap: 0.4rem;
  height: 100%;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 22, 38, .82);
  text-decoration: none;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}

.page-home .home-vein-card:hover,
.page-home .home-vein-card:focus-visible {
  border-color: rgba(37, 230, 230, .55);
  background: rgba(18, 30, 51, .95);
  transform: translateY(-3px);
}

.page-home .home-vein-idx {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--orange);
}

.page-home .home-vein-name {
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.page-home .home-vein-desc {
  font-size: 0.86rem;
  line-height: 1.72;
  color: var(--text-dim);
}

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

  .page-home .home-compare-foot {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .page-home .home-compare-foot .btn {
    justify-self: end;
  }
}

@media (min-width: 860px) {
  .page-home .home-hero-stage {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
    grid-template-areas:
      "lead shot"
      "metrics shot"
      "paths paths";
    align-items: start;
  }

  .page-home .home-hero-lead { grid-area: lead; }
  .page-home .home-hero-shot { grid-area: shot; }
  .page-home .home-hero-metrics { grid-area: metrics; }
  .page-home .home-hero-paths { grid-area: paths; }

  .page-home .home-step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .home-commute-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

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

  .page-home .home-bento-cell--hist {
    grid-column: span 2;
    grid-row: span 2;
  }

  .page-home .home-bento-cell--form {
    grid-column: span 4;
  }

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

@media (min-width: 1100px) {
  .page-home .home-hero-stage {
    column-gap: clamp(1.4rem, 3vw, 2.2rem);
  }

  .page-home .home-hero-shot .media-frame-caption {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-step,
  .page-home .home-bento-cell,
  .page-home .home-vein-card {
    transition: none;
  }

  .page-home .home-step:hover,
  .page-home .home-bento-cell:hover,
  .page-home .home-vein-card:hover {
    transform: none;
  }
}
