.page-products {
  --pd-gap: clamp(22px, 3.2vw, 44px);
  --pd-note-bg: linear-gradient(158deg, rgba(24, 34, 52, .98) 0%, rgba(14, 21, 34, .99) 100%);
  --pd-paper-ink: #2B3444;
  background: var(--ink-900);
  color: var(--star);
  overflow-x: hidden;
}

.page-products .pd-unit {
  font-size: .5em;
  margin-left: 2px;
  letter-spacing: 0;
}

/* ---------- 首屏 ---------- */
.page-products .pd-cover {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4.6vw, 52px) 0 clamp(28px, 4.6vw, 58px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 92% at 88% 0%, rgba(232, 163, 61, .24) 0%, rgba(232, 163, 61, 0) 56%),
    radial-gradient(95% 72% at 6% 100%, rgba(28, 143, 196, .26) 0%, rgba(28, 143, 196, 0) 62%),
    linear-gradient(178deg, #101A2B 0%, var(--ink-900) 100%);
}

.page-products .pd-cover::after {
  content: "";
  position: absolute;
  inset: -10px;
  pointer-events: none;
  background-image: radial-gradient(rgba(238, 244, 250, .18) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .4;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 76%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 76%);
  animation: pd-drift 20s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes pd-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-2px, -2px, 0); }
}

.page-products .pd-cover__inner {
  position: relative;
  z-index: 1;
}

.page-products .pd-cover__main {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(18px, 3vw, 34px);
}

.page-products .pd-cover__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 6.4vw, 66px);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 10px 0 0;
  color: var(--star);
}

.page-products .pd-cover__lede {
  margin: 16px 0 0;
  max-width: 60ch;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.8;
  color: rgba(238, 244, 250, .78);
}

.page-products .pd-cover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.page-products .pd-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-products .pd-stats .stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 34, 52, .62);
  border-left: 3px solid var(--gold);
}

.page-products .pd-stats .stat:nth-child(2) { border-left-color: var(--lake); }
.page-products .pd-stats .stat:nth-child(3) { border-left-color: var(--poplar); }
.page-products .pd-stats .stat:nth-child(4) { border-left-color: var(--gold-soft); }

.page-products .pd-stats .stat__value {
  display: block;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1;
  color: var(--gold);
}

.page-products .pd-stats .stat:nth-child(2) .stat__value { color: var(--lake); }
.page-products .pd-stats .stat:nth-child(3) .stat__value { color: var(--poplar); }
.page-products .pd-stats .stat:nth-child(4) .stat__value { color: var(--gold-soft); }

.page-products .pd-stats .stat__label {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(238, 244, 250, .68);
}

.page-products .pd-index {
  margin-top: clamp(22px, 3.4vw, 40px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line-gold);
}

.page-products .pd-index .chapter-index__link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  font-size: 14px;
  color: rgba(238, 244, 250, .82);
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.page-products .pd-index .chapter-index__link:hover,
.page-products .pd-index .chapter-index__link[aria-current="true"] {
  background: rgba(232, 163, 61, .14);
  border-color: var(--line-gold);
  color: var(--gold-soft);
}

.page-products .pd-index .chapter-index__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--gold);
}

/* ---------- 模块通用 ---------- */
.page-products .pd-mod {
  position: relative;
  padding: clamp(38px, 6vw, 78px) 0;
  border-bottom: 1px solid var(--line);
}

.page-products .pd-mod__grid {
  display: grid;
  gap: clamp(20px, 3vw, 42px);
  align-items: start;
}

.page-products .pd-note {
  position: relative;
  padding: clamp(20px, 2.6vw, 30px) clamp(18px, 2.4vw, 28px) clamp(26px, 3vw, 34px);
  background: var(--pd-note-bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 0 100%);
  box-shadow: var(--shadow-card);
}

.page-products .pd-note .section-title {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  margin: 0 0 12px;
}

.page-products .pd-note__text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(238, 244, 250, .76);
}

.page-products .pd-note__link {
  margin-top: 8px;
}

.page-products .pd-seam {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-900);
  background: linear-gradient(96deg, var(--gold) 0%, var(--gold-soft) 100%);
  border-radius: 2px;
}

.page-products .pd-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
}

.page-products .pd-note__figure {
  margin: 18px 0 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(28, 143, 196, .28), rgba(14, 21, 34, .9));
  max-width: 240px;
}

.page-products .pd-note__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(1.05);
}

.page-products .pd-note__figure--wide {
  max-width: none;
}

.page-products .pd-note__figure--wide img {
  aspect-ratio: 16 / 9;
}

/* ---------- 表格区 ---------- */
.page-products .pd-stage {
  position: relative;
  min-width: 0;
}

.page-products .pd-media {
  margin: 0 0 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(28, 143, 196, .34), rgba(232, 163, 61, .22) 60%, rgba(14, 21, 34, .95));
}

.page-products .pd-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  opacity: .92;
}

.page-products .pd-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.page-products .pd-filter {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  font-size: 13px;
}

.page-products .pd-filter__k {
  padding: 5px 10px;
  background: rgba(232, 163, 61, .18);
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
}

.page-products .pd-filter__v {
  padding: 5px 12px;
  color: var(--star);
  background: rgba(24, 34, 52, .9);
}

.page-products .pd-filter__join {
  color: var(--lake);
  font-family: var(--font-mono);
  font-weight: 700;
}

.page-products .table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101829;
  -webkit-overflow-scrolling: touch;
}

.page-products .data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 14px;
}

.page-products .data-table caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--gold-soft);
  background: rgba(232, 163, 61, .1);
  border-bottom: 1px solid var(--line-gold);
}

.page-products .data-table th,
.page-products .data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}

.page-products .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #182234;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-soft);
  border-bottom: 1px solid var(--line-gold);
}

.page-products .data-table thead th:first-child {
  left: 0;
  z-index: 4;
}

.page-products .data-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #141D2D;
  font-weight: 600;
  color: var(--star);
}

.page-products .data-table tbody td {
  color: rgba(238, 244, 250, .8);
}

.page-products .data-table tbody tr:hover td,
.page-products .data-table tbody tr:hover th {
  background: rgba(28, 143, 196, .12);
}

.page-products .data-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--star);
}

.page-products .data-table tbody tr.is-pinned th {
  background: rgba(232, 163, 61, .14);
}

.page-products .data-table tbody tr.is-pinned td {
  background: rgba(232, 163, 61, .07);
}

.page-products .pd-delta {
  position: relative;
  padding-right: 20px !important;
  font-family: var(--font-mono);
  font-size: 13px;
}

.page-products .pd-delta::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: currentColor;
  opacity: .85;
}

.page-products .pd-delta--up { color: var(--pom); }
.page-products .pd-delta--down { color: var(--poplar); }
.page-products .pd-delta--flat { color: rgba(238, 244, 250, .48); }

.page-products .pd-stage__note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(238, 244, 250, .6);
}

/* ---------- 纸色模块 ---------- */
.page-products .pd-mod--paper {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  color: var(--pd-paper-ink);
  overflow: hidden;
}

.page-products .pd-bg-figure {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
  pointer-events: none;
}

.page-products .pd-bg-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .2;
}

.page-products .pd-mod--paper .wrap {
  position: relative;
  z-index: 1;
}

.page-products .pd-mod--paper .section-title {
  color: var(--pd-paper-ink);
}

.page-products .pd-note--paper {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(43, 52, 68, .18);
  border-left-color: var(--lake);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 0 100%);
}

.page-products .pd-note--paper .pd-note__text {
  color: rgba(43, 52, 68, .82);
}

.page-products .pd-mod--paper .pd-stage__note {
  color: rgba(43, 52, 68, .66);
}

/* ---------- 主客场对比 ---------- */
.page-products .pd-stage--compare {
  display: grid;
  gap: 20px;
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(24, 34, 52, .96), rgba(11, 17, 27, .98));
}

.page-products .pd-bar {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.page-products .pd-bar:last-child {
  border-bottom: 0;
}

.page-products .pd-bar__name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.page-products .pd-bar__line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.page-products .pd-bar__label {
  font-size: 12px;
  color: rgba(238, 244, 250, .62);
}

.page-products .pd-bar__track {
  display: block;
  height: 10px;
  border-radius: 6px;
  background: rgba(238, 244, 250, .08);
  overflow: hidden;
}

.page-products .pd-bar__fill {
  display: block;
  height: 100%;
  width: var(--w, 50%);
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

.page-products .pd-bar__fill--away {
  background: linear-gradient(90deg, var(--lake-deep), var(--lake));
}

.page-products .pd-bar__val {
  text-align: right;
  font-size: 15px;
  color: var(--star);
}

.page-products .pd-bar__diff {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

.page-products .pd-bar__diff--up { color: var(--poplar); }
.page-products .pd-bar__diff--down { color: var(--pom); }

.page-products .pd-ring {
  position: relative;
  width: min(220px, 60vw);
  margin: 6px auto 0;
  aspect-ratio: 1;
}

.page-products .pd-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.page-products .pd-ring__track {
  fill: none;
  stroke: rgba(238, 244, 250, .1);
  stroke-width: 10;
}

.page-products .pd-ring__value {
  fill: none;
  stroke: var(--gold);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 187 302;
}

.page-products .pd-ring__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.page-products .pd-ring__num {
  font-size: 30px;
  color: var(--star);
}

.page-products .pd-ring__label {
  font-size: 12px;
  color: rgba(238, 244, 250, .66);
}

/* ---------- 接口模块 ---------- */
.page-products .pd-mod--api {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(28, 143, 196, .2) 0%, rgba(28, 143, 196, 0) 60%),
    var(--ink-900);
}

.page-products .pd-strip {
  margin: 0 0 clamp(22px, 3vw, 34px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(28, 143, 196, .3), rgba(14, 21, 34, .98));
}

.page-products .pd-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  opacity: .85;
}

.page-products .pd-api {
  display: grid;
  gap: clamp(20px, 3vw, 38px);
  align-items: start;
}

.page-products .pd-api__text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(238, 244, 250, .76);
}

.page-products .pd-api__list {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-products .pd-api__item {
  padding: 14px 16px;
  background: #121B2B;
}

.page-products .pd-api__item dt {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 4px;
}

.page-products .pd-api__item dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(238, 244, 250, .72);
}

.page-products .pd-api__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: clamp(20px, 3vw, 32px);
  padding: 18px 20px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, .08);
}

.page-products .pd-api__foot p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(238, 244, 250, .84);
  max-width: 60ch;
}

/* ---------- 版本模块 ---------- */
.page-products .pd-mod--version {
  background:
    radial-gradient(70% 60% at 0% 100%, rgba(232, 163, 61, .16) 0%, rgba(232, 163, 61, 0) 62%),
    linear-gradient(180deg, var(--ink-900) 0%, #0A0F18 100%);
}

.page-products .pd-version__text {
  margin: 10px 0 0;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(238, 244, 250, .74);
}

.page-products .pd-version__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: clamp(20px, 3vw, 34px);
}

.page-products .pd-version__card {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--lake);
  border-radius: var(--radius);
  background: rgba(24, 34, 52, .76);
}

.page-products .pd-version__card:nth-child(2) { border-top-color: var(--gold); }
.page-products .pd-version__card:nth-child(3) { border-top-color: var(--poplar); }
.page-products .pd-version__card:nth-child(4) { border-top-color: var(--pom); }

.page-products .pd-version__num {
  margin: 6px 0 10px;
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.page-products .pd-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(22px, 3.4vw, 40px);
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(232, 163, 61, .14), rgba(28, 143, 196, .14));
}

.page-products .pd-cta__text {
  margin: 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(238, 244, 250, .86);
}

.page-products .pd-cta__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 桌面 ---------- */
@media (min-width: 760px) {
  .page-products .pd-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-products .pd-index {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-products .pd-api__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-products .pd-version__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .page-products .pd-cover__main {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }

  .page-products .pd-index {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .page-products .pd-mod__grid {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: clamp(28px, 3.4vw, 52px);
  }

  .page-products .pd-stage--compare {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 28px;
  }

  .page-products .pd-api {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .page-products .pd-version__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-products .pd-note__figure {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-products .pd-cover::after {
    animation: none;
  }

  .page-products .pd-index .chapter-index__link {
    transition: none;
  }
}

.page-products {
  --w: 1rem;
}
