/* ============================================
   首页 · 页内专属样式
   作用域：.page-home
   ============================================ */

.page-home {
  --home-block: clamp(56px, 7vw, 104px);
  --home-pad: clamp(16px, 2.2vw, 28px);
}

/* ---------- 面包屑 ---------- */
.page-home__crumb {
  max-width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--rail-h) + 62px) var(--gutter) 12px;
  font-size: 12px;
}

/* ---------- 框景首屏 ---------- */
.page-home .hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--home-block);
}

.page-home .hero-frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  background: var(--panel-deep);
}

.page-home .hero-frame::before,
.page-home .hero-frame::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--neon);
  pointer-events: none;
  z-index: 5;
}

.page-home .hero-frame::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.page-home .hero-frame::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

/* 左侧审核轨道 */
.page-home .hero-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-deep);
}

.page-home .hero-rail__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-home .hero-rail__num {
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--neon);
}

.page-home .hero-rail__meter {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-home .hero-rail__hint,
.page-home .hero-rail__meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.page-home .hero-rail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 右侧舞台 */
.page-home .hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 460px;
  overflow: hidden;
  isolation: isolate;
}

.page-home .hero-stage__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.page-home .hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 9, 7, 0.24) 0%, rgba(7, 9, 7, 0.94) 76%);
}

.page-home .hero-stage__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px 20px 26px;
}

.page-home .hero-stage h1 {
  margin: 0;
  font-size: clamp(1.85rem, 6vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.page-home .hero-stage__lead {
  margin: 0;
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.page-home .hero-stage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-home .hero-stage__board {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(11, 15, 12, 0.88);
}

.page-home .hero-stage__board-num {
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--heat);
}

.page-home .hero-stage__board-label {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 区块间距 ---------- */
.page-home .bands,
.page-home .rail-section,
.page-home .records {
  padding: 0 0 var(--home-block);
}

/* ---------- Bento 板 ---------- */
.page-home .bento {
  display: grid;
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--line);
}

.page-home .bento__cell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 20px;
  background: var(--panel);
  transition: background 0.25s var(--ease), outline-color 0.25s var(--ease);
  outline: 1px solid transparent;
  outline-offset: -1px;
}

.page-home .bento__cell:hover,
.page-home .bento__cell:focus-within {
  outline-color: var(--neon);
}

.page-home .cell__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-home .cell__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.36;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.page-home .cell__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

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

.page-home .link-more {
  display: inline-block;
  font-size: 13px;
  color: var(--neon);
  text-decoration: none;
  border-bottom: 1px solid var(--neon-deep);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}

.page-home .link-more:hover {
  border-bottom-color: var(--neon);
}

.page-home .link-more:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

/* 实测对比列表 */
.page-home .cmp {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
  background: var(--line-soft);
}

.page-home .cmp__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 4px;
  padding: 15px 14px;
  background: var(--panel);
}

.page-home .cmp__idx {
  grid-row: 1 / span 2;
  padding-top: 3px;
  font-size: 12px;
  color: var(--grid);
}

.page-home .cmp__name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}

.page-home .cmp__note {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

/* 印章图 */
.page-home .seal {
  width: 100%;
  max-width: 190px;
  height: auto;
  border: 1px solid var(--line);
}

/* 赛程第二栏条目 */
.page-home .sched-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.page-home .sched-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* 桌面端 Bento 布局 */
@media (min-width: 700px) {
  .page-home .cmp {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .page-home .bento {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "cmp cmp cmp cmp cmp cmp cmp seal seal seal seal seal"
      "cmp cmp cmp cmp cmp cmp cmp sch sch sch sch sch";
  }

  .page-home .bento__cell--compare { grid-area: cmp; }
  .page-home .bento__cell--seal { grid-area: seal; }
  .page-home .bento__cell--sched { grid-area: sch; }

  .page-home .bento__cell {
    padding: 30px 28px;
  }
}

/* ---------- 连看时间轴 ---------- */
.page-home .timeline {
  display: grid;
  gap: 1px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--line);
}

.page-home .timeline__item {
  position: relative;
  background: var(--panel-deep);
}

.page-home .timeline__item::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--line-soft);
}

.page-home .timeline__node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 42px 20px 24px;
  text-decoration: none;
  transition: background 0.25s var(--ease);
}

.page-home .timeline__node:hover {
  background: var(--panel);
}

.page-home .timeline__node:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: -2px;
}

.page-home .timeline__dot {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 1;
  width: 12px;
  height: 12px;
  background: var(--panel-deep);
  border: 2px solid var(--neon);
  transition: background 0.25s var(--ease);
}

.page-home .timeline__node:hover .timeline__dot {
  background: var(--neon);
}

.page-home .timeline__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--cream);
}

.page-home .timeline__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

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

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

/* ---------- 记录字段与状态 ---------- */
.page-home .records__layout {
  display: grid;
  gap: 32px;
}

.page-home .fields {
  display: grid;
  gap: 1px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--line-soft);
}

.page-home .fields__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 5px;
  padding: 16px 14px;
  background: var(--panel-deep);
}

.page-home .fields__key {
  grid-column: 1;
  grid-row: 1;
  font-size: 12px;
  color: var(--grid);
}

.page-home .fields__name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
}

.page-home .fields__note {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

/* 状态切换板 */
.page-home .statusboard {
  position: relative;
  margin-top: 24px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  background: var(--panel-deep);
}

.page-home .statusboard__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.page-home .statusboard__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.page-home .statusboard__tabs label {
  cursor: pointer;
  user-select: none;
}

.page-home .statusboard__panels {
  margin-top: 20px;
}

.page-home .statusboard__panel {
  display: none;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.page-home .statusboard__panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--cream);
}

.page-home .statusboard__panel p {
  margin: 0;
}

.page-home #hb-passed:checked ~ .statusboard__panels .statusboard__panel--passed,
.page-home #hb-review:checked ~ .statusboard__panels .statusboard__panel--review,
.page-home #hb-pending:checked ~ .statusboard__panels .statusboard__panel--pending,
.page-home #hb-archived:checked ~ .statusboard__panels .statusboard__panel--archived {
  display: block;
}

.page-home #hb-passed:checked ~ .statusboard__tabs label[for="hb-passed"],
.page-home #hb-review:checked ~ .statusboard__tabs label[for="hb-review"],
.page-home #hb-pending:checked ~ .statusboard__tabs label[for="hb-pending"],
.page-home #hb-archived:checked ~ .statusboard__tabs label[for="hb-archived"] {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}

.page-home #hb-passed:focus-visible ~ .statusboard__tabs label[for="hb-passed"],
.page-home #hb-review:focus-visible ~ .statusboard__tabs label[for="hb-review"],
.page-home #hb-pending:focus-visible ~ .statusboard__tabs label[for="hb-pending"],
.page-home #hb-archived:focus-visible ~ .statusboard__tabs label[for="hb-archived"] {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

/* 咨询卡 */
.page-home .consult-card {
  margin-top: 24px;
  color: var(--ink);
}

.page-home .consult-card__title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
}

.page-home .consult-card__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
}

.page-home .contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.page-home .contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-home .contact-list .mono {
  font-size: 14px;
  color: var(--ink);
  word-break: break-all;
}

.page-home .consult-card__tail {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink);
}

.page-home .consult-card .link-more {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* 桌面端双列 */
@media (min-width: 1024px) {
  .page-home .hero-frame {
    grid-template-columns: 272px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .page-home .hero-rail {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding: 32px 24px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .page-home .hero-stage {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 540px;
  }

  .page-home .hero-stage__body {
    padding: 56px 44px 32px;
  }

  .page-home .hero-stage__board {
    padding: 16px 44px;
  }

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

  .page-home .records__aside {
    position: sticky;
    top: calc(var(--rail-h) + 24px);
  }

  .page-home .statusboard,
  .page-home .consult-card {
    margin-top: 0;
  }

  .page-home .consult-card {
    margin-top: 24px;
  }

  .page-home .fields {
    margin-top: 28px;
  }
}

/* ---------- 减少动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-home .bento__cell,
  .page-home .timeline__node,
  .page-home .timeline__dot,
  .page-home .link-more {
    transition: none;
  }

  .page-home .timeline__node:hover {
    background: var(--panel-deep);
  }

  .page-home .timeline__node:hover .timeline__dot {
    background: var(--panel-deep);
  }
}
