/* ================= 首页专属样式（作用域 .page-home） ================= */
.page-home {
  --ph-rail-w: 74px;
  display: block;
  padding-block: clamp(16px, 2.4vw, 32px) clamp(64px, 9vw, 112px);
  overflow-x: clip;
}

.page-home .ph-shell {
  width: 100%;
  max-width: var(--shell-wide);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 40px);
}

.page-home .ph-flow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(52px, 7vw, 104px);
}

/* ---------- 左侧索引刻度 ---------- */
.page-home .ph-rail {
  display: none;
}

.page-home .ph-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-home .ph-rail-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  text-decoration: none;
  color: var(--grey);
  border-left: 2px solid var(--line-faint);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.page-home .ph-rail-link:hover,
.page-home .ph-rail-link:focus-visible {
  color: var(--cyan);
  border-left-color: var(--violet);
}

.page-home .ph-rail-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--violet-soft);
}

.page-home .ph-rail-label {
  writing-mode: vertical-rl;
  font-size: 12px;
  letter-spacing: .16em;
}

/* ---------- 页面上下文 ---------- */
.page-home .ph-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--line);
}

.page-home .ph-context-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--grey);
}

/* ---------- 首屏拼贴 ---------- */
.page-home .ph-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 1.4vw, 20px);
}

.page-home .ph-hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  border: 1.5px solid var(--line);
  background: linear-gradient(152deg, #0B0F1C 0%, #05070E 58%, #120A2E 100%);
  box-shadow: var(--shadow);
}

.page-home .ph-hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .48;
}

.page-home .ph-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 7, 14, .2) 0%, rgba(5, 7, 14, .93) 76%),
    repeating-linear-gradient(0deg, rgba(35, 48, 77, .34) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(35, 48, 77, .22) 0 1px, transparent 1px 46px);
}

.page-home .ph-hero-visual::before {
  content: "";
  position: absolute;
  left: 0;
  right: 22%;
  bottom: 0;
  height: 3px;
  z-index: 3;
  background: linear-gradient(90deg, var(--violet), var(--cyan) 62%, transparent);
}

.page-home .ph-scale {
  position: absolute;
  top: 14px;
  right: 14px;
  width: clamp(96px, 16vw, 240px);
  height: 20px;
  color: var(--line-soft);
  z-index: 3;
}

.page-home .ph-hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(20px, 3vw, 40px);
  max-width: 660px;
}

.page-home .ph-hero-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-home .ph-hero-title {
  margin: 12px 0 14px;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.16;
  letter-spacing: -.012em;
  font-weight: 900;
  color: var(--white);
}

.page-home .ph-hero-lede {
  margin: 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--grey);
}

/* 首屏四个入口块 */
.page-home .ph-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(16px, 1.8vw, 24px);
  min-height: 116px;
  text-decoration: none;
  color: var(--white);
  border: 1.5px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.page-home .ph-entry::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--violet), rgba(53, 230, 224, .35) 60%, transparent);
}

.page-home .ph-entry:hover,
.page-home .ph-entry:focus-visible {
  transform: translate(-2px, -3px);
  border-color: var(--violet);
  box-shadow: var(--shadow-violet);
}

.page-home .ph-entry-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--violet-soft);
}

.page-home .ph-entry-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .01em;
}

.page-home .ph-entry-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--grey);
}

.page-home .ph-entry-meta {
  margin: auto 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--grey);
  opacity: .72;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.page-home .ph-entry:hover .ph-entry-meta,
.page-home .ph-entry:focus-visible .ph-entry-meta {
  color: var(--cyan);
  opacity: 1;
}

/* ---------- 章节通用 ---------- */
.page-home .ph-section {
  min-width: 0;
  position: relative;
}

.page-home .ph-head {
  max-width: 68ch;
  margin-bottom: clamp(20px, 2.6vw, 34px);
}

.page-home .ph-idx {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.page-home .ph-head h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -.008em;
  color: var(--white);
}

.page-home .ph-head-note {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--grey);
}

.page-home .ph-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ---------- 数据仪表板 ---------- */
.page-home .ph-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
}

.page-home .ph-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(16px, 1.8vw, 24px);
  border: 1.5px solid var(--line);
  background: linear-gradient(165deg, var(--ink-3) 0%, var(--ink-2) 42%, var(--ink) 100%);
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.page-home .ph-metric:hover {
  transform: translate(-2px, -3px);
  box-shadow: var(--shadow-violet);
}

.page-home .ph-metric-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey);
}

.page-home .ph-metric-value {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--white);
  transition: color var(--dur) var(--ease);
}

.page-home .ph-metric:hover .ph-metric-value {
  color: var(--cyan);
}

.page-home .ph-metric-value--text {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
}

.page-home .ph-metric-unit {
  font-size: .42em;
  color: var(--grey);
  letter-spacing: .04em;
}

.page-home .ph-metric-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.72;
  color: var(--grey);
}

/* ---------- 网点查询（窄栏） ---------- */
.page-home .ph-query {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 44px);
  align-items: center;
}

.page-home .ph-query-copy {
  max-width: 46ch;
}

.page-home .ph-query-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.26;
  font-weight: 800;
  color: var(--white);
}

.page-home .ph-query-copy p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.88;
  color: var(--grey);
}

.page-home .ph-query-media {
  margin: 0;
  border: 1.5px solid var(--line);
  background: var(--ink-2);
  box-shadow: var(--shadow);
}

.page-home .ph-query-media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  opacity: .86;
}

.page-home .ph-query-caption {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--grey);
  border-top: 1.5px solid var(--line);
}

/* ---------- 省区分布 ---------- */
.page-home .ph-province-band {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: clamp(18px, 2.2vw, 28px);
}

.page-home .ph-province-band img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  opacity: .74;
}

.page-home .ph-province-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 7, 14, .92) 0%, rgba(5, 7, 14, .2) 55%, rgba(5, 7, 14, .8) 100%),
    repeating-linear-gradient(90deg, rgba(35, 48, 77, .3) 0 1px, transparent 1px 60px);
}

.page-home .ph-regions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.2vw, 16px);
}

.page-home .ph-region {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 120px;
  padding: clamp(14px, 1.6vw, 20px);
  text-decoration: none;
  color: var(--white);
  border: 1.5px solid var(--line-soft);
  background: var(--ink-2);
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.page-home .ph-region--xl { flex: 7 1 190px; }
.page-home .ph-region--lg { flex: 5 1 170px; }
.page-home .ph-region--sm { flex: 3 1 145px; }

.page-home .ph-region:hover,
.page-home .ph-region:focus-visible {
  border-color: var(--cyan);
  background: var(--ink-3);
  transform: translateY(-2px);
}

.page-home .ph-region-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--violet-soft);
}

.page-home .ph-region-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
}

.page-home .ph-region-count {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
}

.page-home .ph-region-count span {
  font-size: 20px;
  letter-spacing: -.01em;
}

.page-home .ph-region-tags {
  margin: auto 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--grey);
  letter-spacing: .06em;
}

.page-home .ph-regions-note {
  flex: 1 1 100%;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--grey);
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

/* ---------- 赛季刻度 ---------- */
.page-home .ph-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.page-home .ph-stage {
  position: relative;
  padding: 20px 0 20px 24px;
  border-left: 1.5px solid var(--line);
}

.page-home .ph-stage::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 26px;
  width: 10px;
  height: 10px;
  background: var(--ink);
  border: 1.5px solid var(--line);
}

.page-home .ph-stage.is-done::before {
  background: var(--violet);
  border-color: var(--violet-soft);
}

.page-home .ph-stage.is-live::before {
  background: var(--gold);
  border-color: var(--gold);
}

.page-home .ph-stage-idx {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--violet-soft);
}

.page-home .ph-stage-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
}

.page-home .ph-stage-desc {
  margin: 0 0 10px;
  max-width: 40ch;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--grey);
}

.page-home .ph-stage-state {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--grey);
}

.page-home .ph-stage.is-live .ph-stage-state {
  color: var(--gold);
}

.page-home .ph-season-foot {
  margin-top: clamp(24px, 3vw, 36px);
  padding: clamp(18px, 2vw, 26px);
  border: 1.5px solid var(--line);
  border-left: 3px solid var(--violet);
  background: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.page-home .ph-season-foot p {
  margin: 0;
  max-width: 52ch;
  font-size: 14.5px;
  line-height: 1.82;
  color: var(--grey);
}

/* ---------- 更新节奏 ---------- */
.page-home .ph-rhythm-band {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: clamp(22px, 3vw, 36px);
}

.page-home .ph-rhythm-band img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  opacity: .8;
}

.page-home .ph-rhythm-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 14, .1) 0%, rgba(5, 7, 14, .78) 100%);
}

.page-home .ph-rhythm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-top: 1.5px solid var(--line);
}

.page-home .ph-rhythm-item {
  padding: clamp(16px, 1.8vw, 22px) 0;
  border-bottom: 1.5px solid var(--line);
}

.page-home .ph-rhythm-key {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--cyan);
}

.page-home .ph-rhythm-val {
  margin: 0;
  max-width: 62ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--grey);
}

.page-home .ph-boundary {
  margin-top: clamp(24px, 3vw, 36px);
  padding-left: clamp(14px, 1.6vw, 22px);
  border-left: 3px solid var(--magenta);
}

.page-home .ph-boundary p {
  margin: 0;
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.9;
  color: var(--grey);
}

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

  .page-home .ph-rhythm-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(24px, 3vw, 48px);
  }

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

  .page-home .ph-stage {
    border-left: none;
    border-top: 1.5px solid var(--line);
    padding: 30px clamp(12px, 1.4vw, 22px) 0 0;
  }

  .page-home .ph-stage::before {
    left: 0;
    top: -6px;
  }
}

@media (min-width: 900px) {
  .page-home .ph-hero-visual {
    min-height: 340px;
  }

  .page-home .ph-hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-home .ph-hero-visual { grid-column: 1 / -1; }
  .page-home .ph-entry--race { grid-column: 1 / span 7; }
  .page-home .ph-entry--store { grid-column: 8 / span 5; }
  .page-home .ph-entry--plan { grid-column: 1 / span 5; }
  .page-home .ph-entry--report { grid-column: 6 / span 7; }

  .page-home .ph-query {
    grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  }
}

@media (min-width: 1024px) {
  .page-home .ph-shell {
    grid-template-columns: var(--ph-rail-w) minmax(0, 1fr);
    align-items: start;
  }

  .page-home .ph-rail {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 28px);
    max-height: calc(100vh - var(--header-h) - 56px);
    overflow: hidden;
  }

  .page-home .ph-hero-visual {
    grid-column: 1 / span 7;
    grid-row: 1 / span 3;
    min-height: 100%;
  }

  .page-home .ph-entry--race { grid-column: 8 / span 5; grid-row: 1; }
  .page-home .ph-entry--store { grid-column: 8 / span 3; grid-row: 2; }
  .page-home .ph-entry--plan { grid-column: 11 / span 2; grid-row: 2; }
  .page-home .ph-entry--report { grid-column: 8 / span 5; grid-row: 3; }

  .page-home .ph-metrics {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-home .ph-metric--a { grid-column: span 4; }
  .page-home .ph-metric--b { grid-column: span 3; }
  .page-home .ph-metric--c { grid-column: span 5; }
  .page-home .ph-metric--d { grid-column: span 3; }
  .page-home .ph-metric--e { grid-column: span 5; }
  .page-home .ph-metric--f { grid-column: span 4; }

  .page-home .ph-province-band img {
    aspect-ratio: 21 / 7;
  }
}

/* ---------- 动效退化 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-home .ph-entry,
  .page-home .ph-metric,
  .page-home .ph-region,
  .page-home .ph-entry-meta,
  .page-home .ph-metric-value,
  .page-home .ph-rail-link {
    transition: none;
  }

  .page-home .ph-entry:hover,
  .page-home .ph-entry:focus-visible,
  .page-home .ph-metric:hover,
  .page-home .ph-region:hover,
  .page-home .ph-region:focus-visible {
    transform: none;
  }
}
