.page-home {
  --violet-soft: #A98BFF;
  --home-line: rgba(42, 47, 61, 0.92);
  --home-mesh: linear-gradient(rgba(42, 47, 61, 0.55) 1px, transparent 1px),
               linear-gradient(90deg, rgba(42, 47, 61, 0.55) 1px, transparent 1px);
  --home-noise: repeating-linear-gradient(-45deg, rgba(244, 247, 255, 0.03) 0 1px, transparent 1px 9px);
  display: block;
  background: var(--ink);
  color: var(--white);
  overflow-x: hidden;
}

/* ============================= 首屏 ============================= */
.page-home .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
  padding: clamp(104px, 16vh, 184px) 0 clamp(64px, 10vh, 120px);
}

.page-home .hero__media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.page-home .hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.page-home .hero__slant {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg,
      rgba(122, 59, 255, 0.58) 0%,
      rgba(122, 59, 255, 0.2) 36%,
      rgba(35, 230, 216, 0.18) 60%,
      rgba(5, 6, 11, 0) 84%);
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 34% 100%);
}

.page-home .hero__mesh {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--home-mesh);
  background-size: 96px 96px;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 72%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 72%, transparent);
}

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

.page-home .breadcrumb {
  margin: 0 0 calc(var(--unit) * 3);
}

.page-home .hero__title {
  margin: 0;
  max-width: 20em;
}

.page-home .hero__title-zh {
  display: block;
  font-family: var(--font-cn);
  font-weight: 900;
  font-size: var(--fs-1);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--white);
}

.page-home .hero__title-en {
  display: block;
  margin: clamp(10px, 1.4vw, 18px) 0 0 clamp(0px, 8vw, 140px);
  font-family: var(--font-en);
  font-size: clamp(11px, 1.1vw, 16px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.page-home .hero__lede {
  margin: clamp(24px, 4vw, 42px) 0 0;
  max-width: 42ch;
  color: var(--grey);
  font-size: var(--fs-body);
  line-height: 1.8;
}

.page-home .hero__lede strong {
  color: var(--white);
  font-weight: 600;
}

.page-home .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--unit) * 2);
  margin-top: calc(var(--unit) * 5);
}

.page-home .hero__meter {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 1px;
  max-width: 780px;
  background: var(--home-line);
  border: 1px solid var(--home-line);
  border-radius: var(--radius);
}

.page-home .hero__meter > div {
  background: rgba(5, 6, 11, 0.84);
  padding: calc(var(--unit) * 2) calc(var(--unit) * 2.5);
}

.page-home .hero__meter dt {
  font-family: var(--font-mono);
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

.page-home .hero__meter dd {
  margin: calc(var(--unit) * 1) 0 0;
  font-size: var(--fs-3);
  font-weight: 700;
  color: var(--white);
}

.page-home .hero__meter dd .mono {
  color: var(--cyan);
}

.page-home .hero__meter::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 2px;
  background: var(--grad);
  animation: home-meter-scan 8s linear infinite;
}

@keyframes home-meter-scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

/* ============================= 章节带 ============================= */
.page-home .band {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0;
}

/* ============================= 导览区 ============================= */
.page-home .guide__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: end;
}

.page-home .guide__intro .lede {
  margin-top: calc(var(--unit) * 3);
  max-width: 46ch;
  color: var(--grey);
  line-height: 1.8;
}

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

.page-home .guide__figure .media-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transform: rotate(-2.2deg);
}

.page-home .guide__list {
  list-style: none;
  margin: clamp(40px, 6vw, 76px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.page-home .guide__card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: calc(var(--unit) * 1.5);
  padding: calc(var(--unit) * 4) calc(var(--unit) * 3) calc(var(--unit) * 3);
  background: var(--hold);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 220ms var(--ease);
}

.page-home .guide__card:hover,
.page-home .guide__card:focus-within {
  border-color: rgba(35, 230, 216, 0.5);
}

.page-home .guide__scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad);
  transform: translateX(-101%);
  transition: transform 620ms var(--ease);
}

.page-home .guide__card:hover .guide__scan,
.page-home .guide__card:focus-within .guide__scan {
  transform: translateX(0);
}

.page-home .guide__code {
  margin: 0;
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  color: var(--violet-soft);
}

.page-home .guide__name {
  margin: 0;
  font-family: var(--font-cn);
  font-weight: 900;
  font-size: var(--fs-4);
  letter-spacing: -0.01em;
  color: var(--white);
}

.page-home .guide__desc {
  margin: 0;
  font-size: var(--fs-5);
  line-height: 1.75;
  color: var(--grey);
}

.page-home .guide__for {
  margin: 0;
  font-size: var(--fs-6);
  letter-spacing: 0.1em;
  color: rgba(174, 184, 204, 0.75);
}

.page-home .guide__link {
  margin-top: auto;
  padding-top: calc(var(--unit) * 2);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
}

.page-home .guide__link:hover {
  color: var(--white);
}

/* ============================= 首次访问路径 ============================= */
.page-home .route__lede {
  margin: calc(var(--unit) * 3) 0 0;
  max-width: 44ch;
  color: var(--grey);
  line-height: 1.8;
}

.page-home .route__tree {
  list-style: none;
  margin: clamp(40px, 6vw, 68px) 0 0;
  padding: 0;
  max-width: 900px;
}

.page-home .route__node {
  position: relative;
  padding: 0 0 calc(var(--unit) * 5) calc(var(--unit) * 5);
  border-left: 1px solid var(--line);
}

.page-home .route__node:last-child {
  padding-bottom: 0;
  border-left-color: rgba(42, 47, 61, 0.35);
}

.page-home .route__dot {
  position: absolute;
  left: -6px;
  top: 8px;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  border-radius: var(--pill);
  background: var(--ink);
  border: 2px solid var(--cyan);
}

.page-home .route__step {
  margin: 0;
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  color: var(--violet-soft);
}

.page-home .route__name {
  margin: calc(var(--unit) * 1.5) 0 calc(var(--unit) * 1.5);
  font-family: var(--font-cn);
  font-weight: 900;
  font-size: var(--fs-4);
  letter-spacing: -0.01em;
  color: var(--white);
}

.page-home .route__text {
  margin: 0;
  max-width: 42ch;
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--grey);
}

.page-home .route__text a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

.page-home .route__flag {
  display: inline-block;
  margin: calc(var(--unit) * 2) 0 0;
  padding: calc(var(--unit) * 0.5) calc(var(--unit) * 1.5);
  font-size: var(--fs-6);
  letter-spacing: 0.12em;
  color: var(--amber);
  border: 1px solid rgba(255, 138, 43, 0.4);
  border-radius: var(--pill);
}

.page-home .route__node--key {
  border-left-color: rgba(255, 138, 43, 0.55);
}

.page-home .route__node--key .route__dot {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 138, 43, 0.14);
}

/* ============================= 栏目与档位总览（浅色分区） ============================= */
.page-home .band--overview {
  background: var(--paper);
  color: var(--ink-text);
}

.page-home .band--overview .eyebrow {
  color: var(--violet);
}

.page-home .band--overview .section-title__zh {
  color: var(--ink-text);
}

.page-home .band--overview .section-title__en {
  color: var(--violet);
}

.page-home .overview__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

.page-home .overview__intro .lede {
  margin: calc(var(--unit) * 3) 0 0;
  max-width: 44ch;
  color: #48506A;
  line-height: 1.8;
}

.page-home .cat__list {
  list-style: none;
  margin: calc(var(--unit) * 5) 0 0;
  padding: 0;
}

.page-home .cat__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: calc(var(--unit) * 1.5);
  padding: calc(var(--unit) * 2.25) 0;
  border-top: 1px solid rgba(20, 24, 33, 0.14);
}

.page-home .cat__item:last-child {
  border-bottom: 1px solid rgba(20, 24, 33, 0.14);
}

.page-home .cat__code {
  font-size: var(--fs-4);
  font-weight: 700;
  line-height: 1.2;
  color: var(--violet);
}

.page-home .cat__item h3 {
  margin: 0 0 calc(var(--unit) * 0.5);
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: var(--fs-5);
  color: var(--ink-text);
}

.page-home .cat__item p {
  margin: 0;
  font-size: var(--fs-5);
  line-height: 1.75;
  color: #4A5266;
}

.page-home .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #FFFFFF;
  border: 1px solid rgba(20, 24, 33, 0.14);
  border-radius: var(--radius);
}

.page-home .overview__table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
}

.page-home .overview__table caption {
  caption-side: top;
  padding: calc(var(--unit) * 2) calc(var(--unit) * 2) calc(var(--unit) * 1);
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6B7488;
}

.page-home .overview__table th,
.page-home .overview__table td {
  padding: calc(var(--unit) * 1.75) calc(var(--unit) * 2);
  text-align: left;
  font-size: var(--fs-5);
  line-height: 1.6;
  border-bottom: 1px solid rgba(20, 24, 33, 0.1);
  vertical-align: top;
}

.page-home .overview__table thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-6);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5A6379;
  background: rgba(122, 59, 255, 0.07);
  border-bottom-color: rgba(20, 24, 33, 0.16);
}

.page-home .overview__table tbody th {
  font-weight: 700;
  color: var(--ink-text);
  white-space: nowrap;
}

.page-home .overview__table tbody td {
  color: #3E4658;
}

.page-home .overview__table tbody td.mono {
  color: var(--violet);
  font-weight: 600;
  white-space: nowrap;
}

.page-home .overview__table tbody tr:last-child th,
.page-home .overview__table tbody tr:last-child td {
  border-bottom: none;
}

.page-home .table-note {
  margin: calc(var(--unit) * 2) 0 0;
  font-size: var(--fs-5);
  line-height: 1.75;
  color: #4A5266;
}

.page-home .table-note a {
  color: var(--violet);
  text-underline-offset: 3px;
}

/* ============================= 更新栏 ============================= */
.page-home .band--log {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.page-home .log__bg {
  position: absolute;
  inset: auto 0 0 0;
  height: 64%;
  z-index: 0;
  pointer-events: none;
}

.page-home .log__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}

.page-home .band--log .container {
  position: relative;
  z-index: 1;
}

.page-home .log__head {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--unit) * 3);
  align-items: flex-end;
  justify-content: space-between;
}

.page-home .log__pulse {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--unit));
  margin: 0;
  padding: calc(var(--unit)) calc(var(--unit) * 2);
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(255, 138, 43, 0.36);
  border-radius: var(--pill);
}

.page-home .log__pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--pill);
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 138, 43, 0.16);
}

.page-home .log__rail {
  list-style: none;
  margin: clamp(44px, 6vw, 72px) 0 0;
  padding: calc(var(--unit) * 5) 0 calc(var(--unit) * 2);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(248px, 1fr);
  gap: var(--gap);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  border-top: 1px solid var(--line);
}

.page-home .log__item {
  position: relative;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: calc(var(--unit) * 1.25);
  padding: calc(var(--unit) * 3) calc(var(--unit) * 2.5);
  background: rgba(20, 10, 46, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 220ms var(--ease), background 220ms var(--ease);
}

.page-home .log__item:hover,
.page-home .log__item:focus-within {
  border-color: rgba(35, 230, 216, 0.45);
  background: rgba(20, 10, 46, 0.92);
}

.page-home .log__node {
  position: absolute;
  top: calc(var(--unit) * -5.75);
  left: calc(var(--unit) * 2.5);
  width: 9px;
  height: 9px;
  box-sizing: border-box;
  border-radius: var(--pill);
  background: var(--ink);
  border: 1px solid var(--cyan);
}

.page-home .log__code {
  margin: 0;
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  color: var(--violet-soft);
}

.page-home .log__tag {
  align-self: flex-start;
  margin: 0;
  opacity: 0.5;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.page-home .log__item:hover .log__tag,
.page-home .log__item:focus-within .log__tag {
  opacity: 1;
  transform: translateY(-2px);
}

.page-home .log__item h3 {
  margin: 0;
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: var(--fs-5);
  line-height: 1.5;
  color: var(--white);
}

.page-home .log__item p:last-child {
  margin: 0;
  font-size: var(--fs-5);
  line-height: 1.75;
  color: var(--grey);
}

.page-home .log__foot {
  margin: calc(var(--unit) * 5) 0 0;
}

.page-home .log__foot a {
  font-family: var(--font-mono);
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
}

.page-home .log__foot a:hover {
  color: var(--white);
}

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

.page-home .close__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

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

.page-home .close__figure .media-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-home .close__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-top: calc(var(--unit) * 4);
}

.page-home .close__card {
  display: block;
  padding: calc(var(--unit) * 3);
  background: var(--hold);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 220ms var(--ease), transform 220ms var(--ease);
}

.page-home .close__card:hover,
.page-home .close__card:focus-visible {
  border-color: rgba(35, 230, 216, 0.5);
  transform: translateY(-3px);
}

.page-home .close__card p:first-child {
  margin: 0;
  font-size: var(--fs-5);
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.page-home .close__card p:last-child {
  margin: calc(var(--unit) * 1) 0 0;
  font-size: var(--fs-5);
  line-height: 1.75;
  color: var(--grey);
}

.page-home .close__contact {
  margin-top: calc(var(--unit) * 5);
  padding-top: calc(var(--unit) * 3);
  border-top: 1px solid var(--line);
}

.page-home .close__contact > p {
  margin: 0;
  color: var(--white);
}

.page-home .close__contact-key {
  margin-top: calc(var(--unit) * 2) !important;
  font-family: var(--font-mono);
  font-size: var(--fs-6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey) !important;
}

.page-home .close__contact > p:first-child {
  margin-top: 0 !important;
}

.page-home .close__contact-note {
  margin-top: calc(var(--unit) * 2.5) !important;
  font-size: var(--fs-5);
  line-height: 1.75;
  color: var(--grey) !important;
}

.page-home .close__aside {
  margin: calc(var(--unit) * 4) 0 0;
  font-size: var(--fs-5);
  line-height: 1.8;
  color: var(--grey);
}

.page-home .close__aside a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

/* ============================= 进入动效 ============================= */
.page-home .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

.page-home .reveal.is-inview {
  opacity: 1;
  transform: none;
}

.page-home .guide__list .guide__card:nth-child(2) { transition-delay: 80ms; }
.page-home .guide__list .guide__card:nth-child(3) { transition-delay: 160ms; }
.page-home .guide__list .guide__card:nth-child(4) { transition-delay: 240ms; }

/* ============================= 焦点可见 ============================= */
.page-home a:focus-visible,
.page-home button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--ink);
}

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

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

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

@media (min-width: 900px) {
  .page-home .guide__head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  }

  .page-home .guide__figure .media-frame {
    transform: rotate(-2.6deg) translateY(-8px);
  }
}

@media (min-width: 960px) {
  .page-home .overview__head {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .page-home .close__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .page-home .close__figure {
    align-self: end;
    margin-bottom: calc(var(--unit) * 4);
  }
}

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

  .page-home .guide__card:nth-child(2) {
    margin-top: 24px;
  }

  .page-home .guide__card:nth-child(3) {
    margin-top: 48px;
  }

  .page-home .guide__card:nth-child(4) {
    margin-top: 24px;
  }

  .page-home .hero__meter {
    max-width: 880px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero__meter::after {
    animation: none;
    opacity: 0.4;
  }

  .page-home .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .page-home .guide__scan {
    transition: none;
    transform: translateX(0);
    opacity: 0.5;
  }

  .page-home .close__card,
  .page-home .guide__card,
  .page-home .log__item,
  .page-home .log__tag {
    transition: none;
  }

  .page-home .close__card:hover,
  .page-home .close__card:focus-visible {
    transform: none;
  }
}
