.page-home {
  --home-gutter: clamp(20px, 5vw, 56px);
  color: var(--bone-white);
  background:
    radial-gradient(120% 70% at 88% -12%, rgba(47, 230, 200, 0.11) 0%, rgba(47, 230, 200, 0) 62%),
    linear-gradient(180deg, #0B2018 0%, #0E1011 100%);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.page-home .hero-wrap {
  display: grid;
  gap: 40px;
  padding-block: clamp(32px, 5vw, 68px) clamp(44px, 6vw, 80px);
}

.page-home .hero-kicker {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--signal-cyan);
  margin: 0 0 16px;
}

.page-home .hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 6.4vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0 0 22px;
}

.page-home .hero-lede {
  font-size: 17px;
  line-height: 1.78;
  color: rgba(242, 239, 230, 0.8);
  max-width: 36ch;
  margin: 0 0 26px;
}

.page-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.page-home .hero-figure {
  margin: 0;
  max-width: 520px;
}

/* 记分牌 */
.page-home .hero-board {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 3.4vw, 40px) clamp(20px, 3.2vw, 38px) clamp(26px, 3.4vw, 42px);
  background: var(--glow-gradient);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
}

.page-home .hero-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.55;
}

.page-home .hero-board::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -70px;
  top: -90px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 230, 200, 0.22) 0%, rgba(47, 230, 200, 0) 70%);
  pointer-events: none;
}

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

.page-home .board-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 14px;
}

.page-home .board-score {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-left: -0.04em;
}

.page-home .board-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(80px, 15vw, 172px);
  line-height: 0.78;
  letter-spacing: -0.06em;
  color: var(--signal-cyan);
  display: block;
  margin-bottom: -0.06em;
}

.page-home .board-unit {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.72);
  padding-bottom: 12px;
  max-width: 15ch;
}

.page-home .board-clock {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.page-home .board-clock-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ember-orange);
}

.page-home .board-clock-note {
  font-size: 14px;
  color: rgba(242, 239, 230, 0.76);
}

.page-home .board-bars {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 24px;
}

.page-home .board-bars .bar-axis,
.page-home .viz-chart .viz-base {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.page-home .board-bars .bar-in,
.page-home .viz-chart .bar-in {
  fill: var(--signal-cyan);
}

.page-home .board-bars .bar-out,
.page-home .viz-chart .bar-out {
  fill: var(--ember-orange);
}

.page-home .board-bars rect {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: home-bar-grow 820ms cubic-bezier(0.22, 0.78, 0.26, 1) both;
}

.page-home .board-bars rect:nth-child(2n) {
  animation-delay: 90ms;
}

.page-home .board-bars rect:nth-child(3n) {
  animation-delay: 150ms;
}

.page-home .board-hint {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.72;
  color: rgba(242, 239, 230, 0.74);
}

.page-home .board-hint-key {
  display: inline-block;
  margin-right: 10px;
  padding: 3px 9px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-green);
  background: var(--mist-cyan);
}

/* ---------- 主体两栏 ---------- */
.page-home .home-body {
  display: grid;
  gap: 8px;
  padding-bottom: clamp(48px, 7vw, 96px);
}

.page-home .home-index {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.page-home .home-index::-webkit-scrollbar {
  display: none;
}

.page-home .home-index .section-index-title {
  display: none;
}

.page-home .home-index .section-index-link {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  color: rgba(242, 239, 230, 0.7);
  border: 1px solid transparent;
}

.page-home .home-index .section-index-link[aria-current="true"] {
  color: var(--signal-cyan);
  border-color: rgba(47, 230, 200, 0.4);
}

.page-home .home-stream {
  min-width: 0;
}

.page-home .section {
  padding-block: clamp(46px, 6.5vw, 84px);
}

.page-home .section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(25px, 3.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 24ch;
}

.page-home .section-lede {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(242, 239, 230, 0.76);
  max-width: 58ch;
  margin: 0;
}

.page-home .band {
  position: relative;
}

.page-home .band::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 -18px;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(22, 48, 42, 0.9) 0%, rgba(14, 16, 17, 0.6) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-home .band--dark::before {
  background: linear-gradient(180deg, #0E1011 0%, #16302A 100%);
}

.page-home .band > * {
  position: relative;
  z-index: 1;
}

/* ---------- 今晚 ---------- */
.page-home .tonight-list {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.page-home .tonight-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 4px 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.page-home .tonight-idx {
  grid-row: span 2;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--amber);
  padding-top: 4px;
}

.page-home .tonight-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.page-home .tonight-text {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(242, 239, 230, 0.74);
  max-width: 52ch;
}

/* ---------- 分布图 ---------- */
.page-home .viz {
  margin-top: 36px;
}

.page-home .viz-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.page-home .viz-chart .viz-grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.page-home .viz-chart rect {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: home-bar-grow 900ms cubic-bezier(0.22, 0.78, 0.26, 1) both;
}

.page-home .viz-chart rect:nth-child(2n) {
  animation-delay: 70ms;
}

.page-home .viz-chart rect:nth-child(3n) {
  animation-delay: 140ms;
}

.page-home .viz-axis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate);
  text-align: center;
}

.page-home .viz-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 18px 0 0;
  font-size: 13px;
  color: rgba(242, 239, 230, 0.74);
}

.page-home .viz-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: -12px;
}

.page-home .viz-dot--in {
  background: var(--signal-cyan);
}

.page-home .viz-dot--out {
  background: var(--ember-orange);
}

.page-home .viz-note {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate);
  margin-left: auto;
}

.page-home .gateways {
  display: grid;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--line-strong);
}

.page-home .gateway {
  display: block;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.page-home .gateway-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
}

.page-home .gateway-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--signal-cyan);
}

.page-home .gateway--ember .gateway-title {
  color: var(--ember-orange);
}

.page-home .gateway-text {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(242, 239, 230, 0.74);
  max-width: 46ch;
}

/* ---------- 历史 ---------- */
.page-home .history-layout {
  margin-top: 34px;
}

.page-home .history-figure {
  margin: 0 0 30px;
}

.page-home .history-rail {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.page-home .history-node {
  flex: 0 0 240px;
  scroll-snap-align: start;
  padding: 18px 20px 22px;
  border-left: 1px solid var(--line);
}

.page-home .history-node:first-child {
  border-left: 0;
  padding-left: 0;
}

.page-home .history-idx {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 12px;
}

.page-home .history-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.page-home .history-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.72;
  color: rgba(242, 239, 230, 0.7);
}

/* ---------- 三步 ---------- */
.page-home .path-grid {
  display: grid;
  gap: 32px;
  margin-top: 34px;
  align-items: start;
}

.page-home .path-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pathstep;
}

.page-home .path-step {
  position: relative;
  padding: 0 0 26px 34px;
  border-left: 1px solid var(--line);
}

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

.page-home .path-step::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  background: var(--mist-cyan);
  border-radius: 50%;
}

.page-home .path-step:last-child::before {
  background: var(--amber);
}

.page-home .path-num {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--slate);
  margin-bottom: 8px;
}

.page-home .path-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
}

.page-home .path-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.78;
  color: rgba(242, 239, 230, 0.75);
  max-width: 46ch;
}

.page-home .path-figure {
  margin: 0;
  max-width: 320px;
}

.page-home .path-foot {
  margin: 30px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(242, 239, 230, 0.7);
}

.page-home .path-foot a {
  color: var(--signal-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 收束 ---------- */
.page-home .home-close {
  border-top: 1px solid var(--line);
}

.page-home .close-grid {
  display: grid;
  gap: 30px;
}

.page-home .close-figure {
  margin: 0;
}

.page-home .close-copy .section-title {
  max-width: 20ch;
}

.page-home .close-text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.82;
  color: rgba(242, 239, 230, 0.76);
  max-width: 56ch;
}

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

/* ---------- 窄屏以上的排布 ---------- */
@media (min-width: 720px) {
  .page-home .tonight-item {
    grid-template-columns: 46px minmax(0, 0.9fr) minmax(0, 1.4fr);
    align-items: baseline;
  }

  .page-home .tonight-idx {
    grid-row: auto;
  }

  .page-home .tonight-title {
    margin: 0;
  }

  .page-home .tonight-text {
    margin: 0;
  }

  .page-home .path-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
  }

  .page-home .close-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 44px;
    align-items: center;
  }

  .page-home .gateways {
    grid-template-columns: 1fr 1fr;
    gap: 0 44px;
  }
}

@media (min-width: 960px) {
  .page-home .hero-wrap {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 4vw, 64px);
    align-items: start;
  }

  .page-home .hero-figure {
    margin-top: 6px;
  }

  .page-home .history-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 40px;
    align-items: start;
  }

  .page-home .history-figure {
    margin: 0;
  }
}

@media (min-width: 1080px) {
  .page-home .home-body {
    grid-template-columns: 172px minmax(0, 1fr);
    gap: clamp(36px, 4vw, 64px);
    align-items: start;
  }

  .page-home .home-index {
    display: block;
    position: sticky;
    top: calc(var(--header-offset) + 20px);
    overflow: visible;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--line);
  }

  .page-home .home-index .section-index-title {
    display: block;
    padding-left: 16px;
    margin: 0 0 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--slate);
  }

  .page-home .home-index .section-index-link {
    display: block;
    padding: 9px 0 9px 16px;
    border: 0;
    border-left: 2px solid transparent;
    margin-left: -1px;
    font-size: 14px;
    white-space: normal;
  }

  .page-home .home-index .section-index-link[aria-current="true"] {
    color: var(--signal-cyan);
    border-left-color: var(--signal-cyan);
  }

  .page-home .band::before {
    inset: 0 -34px;
  }

  .page-home .viz-axis {
    font-size: 12px;
  }
}

@media (min-width: 1280px) {
  .page-home .path-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
  }

  .page-home .path-figure {
    max-width: 320px;
    justify-self: end;
  }
}

@keyframes home-bar-grow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .board-bars rect,
  .page-home .viz-chart rect {
    animation: none;
  }
}
</main>
