.page-home {
  --home-line: rgba(11, 27, 43, .14);
  --home-line-strong: rgba(11, 27, 43, .26);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.page-home img {
  max-width: 100%;
  height: auto;
}

.page-home a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.page-home .home-hero a:focus-visible,
.page-home .home-chapter--dark a:focus-visible,
.page-home .home-closing a:focus-visible {
  outline-color: var(--gold-soft);
}

/* ---------- 首屏框景 ---------- */
.page-home .home-hero {
  position: relative;
  padding: clamp(16px, 2.6vw, 30px) 0 clamp(30px, 5vw, 64px);
  background:
    radial-gradient(90% 70% at 88% 4%, rgba(110, 156, 139, .22), transparent 62%),
    linear-gradient(158deg, #0B1B2B 0%, #102741 55%, #17324D 100%);
  color: var(--paper);
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(246, 240, 228, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 240, 228, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 78%);
}

.page-home .home-hero__frame {
  position: relative;
  border: 1px solid var(--line-dark);
  padding: clamp(16px, 3vw, 38px);
}

.page-home .home-hero__frame::before,
.page-home .home-hero__frame::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--gold);
  z-index: 1;
}

.page-home .home-hero__frame::before {
  top: -1px;
  left: -1px;
}

.page-home .home-hero__frame::after {
  bottom: -1px;
  right: -1px;
}

.page-home .home-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

.page-home .home-hero .breadcrumb {
  color: rgba(246, 240, 228, .62);
}

.page-home .home-hero .breadcrumb-sep {
  color: var(--gold-soft);
}

.page-home .home-hero .breadcrumb [aria-current] {
  color: var(--gold-soft);
}

.page-home .home-hero__version {
  margin: 0;
  color: rgba(246, 240, 228, .5);
}

.page-home .home-hero__grid {
  display: grid;
  gap: clamp(20px, 3.4vw, 38px);
  padding-top: clamp(20px, 3.4vw, 38px);
}

.page-home .home-hero h1 {
  margin: .45em 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.4vw, 3.9rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--white);
  max-width: 20ch;
}

.page-home .home-hero .eyebrow {
  color: var(--gold-soft);
}

.page-home .home-hero .lede {
  margin: 16px 0 0;
  max-width: 48ch;
  font-size: clamp(.98rem, 1.4vw, 1.12rem);
  line-height: 1.8;
  color: rgba(246, 240, 228, .76);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3vw, 30px);
}

.page-home .home-hero .tag {
  border-color: rgba(227, 199, 102, .5);
  color: var(--gold-soft);
}

/* 设备服务卡片 */
.page-home .device-card {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(24px, 3.6vw, 40px);
  border: 1px solid var(--line-dark);
  background: rgba(11, 27, 43, .5);
  color: var(--paper);
  text-decoration: none;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}

.page-home .device-card:hover,
.page-home .device-card:focus-visible {
  border-color: var(--gold-soft);
  background: rgba(23, 50, 77, .72);
}

.page-home .device-card__media {
  display: block;
  overflow: hidden;
}

.page-home .device-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.page-home .device-card:hover .device-card__media img {
  transform: scale(1.04);
}

.page-home .device-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(16px, 2.4vw, 24px);
}

.page-home .device-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--white);
}

.page-home .device-card__text {
  font-size: .88rem;
  line-height: 1.7;
  color: rgba(246, 240, 228, .72);
}

.page-home .device-card__more {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--gold-soft);
}

/* 帮助标签流 */
.page-home .help-rail {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-dark);
  background: linear-gradient(180deg, rgba(23, 50, 77, .82), rgba(11, 27, 43, .92));
  padding: clamp(16px, 2.4vw, 24px);
}

.page-home .help-rail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-dark);
}

.page-home .help-rail__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .98rem;
  color: var(--white);
}

.page-home .help-rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-home .help-rail__item {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid rgba(246, 240, 228, .12);
  text-decoration: none;
  color: var(--paper);
}

.page-home .help-rail__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.page-home .help-rail__num {
  flex: none;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--gold-soft);
}

.page-home .help-rail__name {
  font-weight: 700;
  font-size: .95rem;
  transition: color .2s var(--ease);
}

.page-home .help-rail__arrow {
  margin-left: auto;
  font-size: .8rem;
  color: rgba(246, 240, 228, .4);
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.page-home .help-rail__desc {
  display: block;
  margin-top: 6px;
  padding-left: 26px;
  font-size: .82rem;
  line-height: 1.65;
  color: rgba(246, 240, 228, .62);
}

.page-home .help-rail__item:hover .help-rail__name,
.page-home .help-rail__item:focus-visible .help-rail__name,
.page-home .help-rail__item:hover .help-rail__arrow {
  color: var(--gold-soft);
}

.page-home .help-rail__item:hover .help-rail__arrow {
  transform: translateX(3px);
}

.page-home .help-rail__figure {
  margin: 16px 0 0;
  height: 128px;
  border: 1px solid var(--line-dark);
  overflow: hidden;
}

.page-home .help-rail__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .help-rail__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 14px;
}

.page-home .help-rail__foot p {
  margin: 0;
  font-size: .8rem;
  color: rgba(246, 240, 228, .62);
}

.page-home .help-rail__count {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--gold-soft);
}

.page-home .help-rail__link {
  font-size: .82rem;
  color: var(--gold-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(227, 199, 102, .5);
  padding-bottom: 2px;
}

/* ---------- 章节通用 ---------- */
.page-home .home-chapter {
  padding: clamp(40px, 6.4vw, 88px) 0;
}

.page-home .home-chapter--paper {
  background: var(--paper);
}

.page-home .home-chapter--paper2 {
  background: var(--paper-2);
}

.page-home .home-chapter--dark {
  background: var(--ink);
  color: var(--paper);
}

.page-home .chapter-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(12px, 2vw, 26px);
  align-items: start;
  border-top: 1px solid var(--home-line);
  padding-top: 16px;
}

.page-home .chapter-num {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--gold-deep);
}

.page-home .chapter-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 3.2vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: -.015em;
}

.page-home .chapter-lede {
  margin: 14px 0 0;
  max-width: 62ch;
  font-size: .98rem;
  line-height: 1.8;
  color: var(--slate);
}

.page-home .home-chapter--dark .chapter-head,
.page-home .home-closing .chapter-head {
  border-top-color: var(--line-dark);
}

.page-home .home-chapter--dark .chapter-num,
.page-home .home-closing .chapter-num {
  color: var(--gold-soft);
}

.page-home .home-chapter--dark .chapter-title,
.page-home .home-closing .chapter-title {
  color: var(--white);
}

.page-home .home-chapter--dark .chapter-lede,
.page-home .home-closing .chapter-lede {
  color: rgba(246, 240, 228, .74);
}

/* ---------- 设备场景列表 ---------- */
.page-home .device-list {
  list-style: none;
  margin: clamp(22px, 3.6vw, 38px) 0 0;
  padding: 0;
  border-top: 1px solid var(--home-line);
}

.page-home .device-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  padding: 16px 8px 16px 0;
  border-bottom: 1px solid var(--home-line);
  text-decoration: none;
  color: var(--ink);
  transition: padding-left .25s var(--ease), background .25s var(--ease);
}

.page-home .device-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .25s var(--ease);
}

.page-home .device-row:hover,
.page-home .device-row:focus-visible {
  background: rgba(201, 162, 39, .07);
  padding-left: 12px;
}

.page-home .device-row:hover::before,
.page-home .device-row:focus-visible::before {
  transform: scaleY(1);
}

.page-home .device-row__no {
  font-family: var(--font-mono);
  font-size: .76rem;
  padding-top: 5px;
  color: var(--gold-deep);
}

.page-home .device-row__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
}

.page-home .device-row__scene {
  grid-column: 2;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--slate);
}

.page-home .device-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  margin: 18px 0 0;
  font-size: .9rem;
  color: var(--slate);
}

.page-home .device-note strong {
  font-family: var(--font-mono);
  color: var(--ink);
}

.page-home .device-note a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 106, 18, .4);
  padding-bottom: 2px;
}

/* ---------- 栏目索引条 ---------- */
.page-home .index-rail {
  position: relative;
  margin-top: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line-dark);
  background: #0B1B2B;
  overflow: hidden;
}

.page-home .index-rail__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .26;
  pointer-events: none;
}

.page-home .index-scale {
  position: relative;
  display: block;
  width: 100%;
  height: 18px;
}

.page-home .index-rail__track {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.page-home .index-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 148px;
  padding: 18px 16px 20px;
  border-right: 1px solid var(--line-dark);
  text-decoration: none;
  color: var(--paper);
  scroll-snap-align: start;
  transition: background .25s var(--ease);
}

.page-home .index-item:hover,
.page-home .index-item:focus-visible {
  background: rgba(201, 162, 39, .14);
}

.page-home .index-item__no {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  color: var(--gold-soft);
}

.page-home .index-item__name {
  font-weight: 700;
  font-size: .95rem;
}

.page-home .index-item__tag {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  color: var(--coral);
}

/* ---------- 常用入口 ---------- */
.page-home .entry-grid {
  display: grid;
  gap: 14px;
  margin-top: clamp(24px, 4vw, 40px);
}

.page-home .entry-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(18px, 2.6vw, 24px);
  min-height: 172px;
  background: var(--white);
  border: 1px solid var(--home-line);
  text-decoration: none;
  color: inherit;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}

.page-home .entry-card:hover,
.page-home .entry-card:focus-visible {
  border-color: var(--gold);
  background: #FFFEFA;
}

.page-home .entry-card__code {
  display: block;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  color: var(--gold-deep);
}

.page-home .entry-card__title {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}

.page-home .entry-card__text {
  display: block;
  margin-top: 8px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--slate);
}

.page-home .entry-card__go {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--home-line);
  font-size: .82rem;
  color: var(--ink);
  transition: color .25s var(--ease);
}

.page-home .entry-card:hover .entry-card__go {
  color: var(--gold-deep);
}

/* ---------- 更新节奏 ---------- */
.page-home .timeline {
  list-style: none;
  margin: clamp(22px, 3.4vw, 36px) 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.page-home .timeline__item {
  border-top: 1px solid var(--home-line-strong);
  padding-top: 14px;
}

.page-home .timeline__when {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.page-home .timeline__title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}

.page-home .timeline__text {
  margin: 6px 0 0;
  font-size: .88rem;
  line-height: 1.72;
  color: var(--slate);
}

.page-home .chapter-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(20px, 3vw, 28px);
  font-size: .88rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
}

.page-home .chapter-more:focus-visible,
.page-home .chapter-more:hover {
  color: var(--gold-deep);
}

/* ---------- 数字带 ---------- */
.page-home .stat-band {
  background: var(--ink-2);
  color: var(--paper);
  padding: clamp(26px, 4vw, 48px) 0;
}

.page-home .stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 16px;
}

.page-home .stat-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: -.01em;
  color: var(--gold-soft);
}

.page-home .stat-label {
  display: block;
  margin-top: 6px;
  font-size: .8rem;
  line-height: 1.6;
  color: rgba(246, 240, 228, .68);
}

/* ---------- 收束带 ---------- */
.page-home .home-closing {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(40px, 6vw, 84px) 0 clamp(44px, 6vw, 90px);
  overflow: hidden;
}

.page-home .home-closing__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .2;
  pointer-events: none;
}

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

.page-home .closing-grid {
  display: grid;
  gap: 14px;
  margin-top: clamp(22px, 3.4vw, 36px);
}

.page-home .closing-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line-dark);
  background: rgba(23, 50, 77, .55);
  text-decoration: none;
  color: var(--paper);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}

.page-home .closing-card:hover,
.page-home .closing-card:focus-visible {
  border-color: var(--gold-soft);
  background: rgba(23, 50, 77, .85);
}

.page-home .closing-card__label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  color: var(--gold-soft);
}

.page-home .closing-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.page-home .closing-card__text {
  font-size: .9rem;
  line-height: 1.72;
  color: rgba(246, 240, 228, .72);
}

.page-home .closing-card__go {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--gold-soft);
}

.page-home .closing-note {
  margin: 22px 0 0;
  font-size: .86rem;
  line-height: 1.8;
  color: rgba(246, 240, 228, .6);
}

.page-home .closing-note a {
  color: var(--gold-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(227, 199, 102, .45);
}

/* ---------- 断点 ---------- */
@media (min-width: 620px) {
  .page-home .device-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }

  .page-home .help-rail__figure {
    height: 150px;
  }
}

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

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

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

@media (min-width: 820px) {
  .page-home .device-row {
    grid-template-columns: auto minmax(0, 8rem) minmax(0, 1fr);
    align-items: baseline;
    gap: 14px;
  }

  .page-home .device-row__scene {
    grid-column: 3;
  }

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

  .page-home .entry-card:nth-child(1) {
    grid-column: span 4;
  }

  .page-home .entry-card:nth-child(2) {
    grid-column: span 2;
  }

  .page-home .entry-card:nth-child(3) {
    grid-column: span 2;
  }

  .page-home .entry-card:nth-child(4) {
    grid-column: span 4;
  }
}

@media (min-width: 960px) {
  .page-home .home-hero__grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
  }

  .page-home .help-rail__desc {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .3s var(--ease), opacity .3s var(--ease), margin-top .3s var(--ease);
  }

  .page-home .help-rail__item:hover .help-rail__desc,
  .page-home .help-rail__item:focus-visible .help-rail__desc,
  .page-home .help-rail__item:focus-within .help-rail__desc {
    max-height: 5em;
    margin-top: 6px;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home * {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }

  .page-home .device-card:hover .device-card__media img {
    transform: none;
  }
}
