.page-products {
  --tp-card: rgba(246, 241, 231, .05);
  --tp-edge: rgba(216, 180, 90, .3);
  --tp-edge-soft: rgba(201, 214, 209, .14);
  --tp-gap: clamp(16px, 3vw, 28px);
  color: var(--warm);
}

.page-products .tp-section {
  padding-block: clamp(38px, 6.5vw, 80px);
}

.page-products .tp-hero {
  position: relative;
  padding-top: clamp(26px, 4.5vw, 54px);
  padding-bottom: clamp(32px, 5.5vw, 68px);
  overflow: hidden;
}

.page-products .tp-hero::before {
  content: "";
  position: absolute;
  top: -48px;
  right: -80px;
  width: min(56vw, 430px);
  height: 230px;
  background: linear-gradient(135deg, rgba(255, 90, 54, .22), rgba(255, 90, 54, 0) 64%);
  border-radius: var(--r-xl);
  transform: skewY(-8deg);
  pointer-events: none;
  z-index: 0;
}

.page-products .tp-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: .45;
}

.page-products .tp-hero > * {
  position: relative;
  z-index: 1;
}

.page-products .tp-hero h1 {
  margin: 0;
  max-width: 17ch;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 7.4vw, 78px);
  line-height: 1.04;
  letter-spacing: -.022em;
  color: var(--warm);
}

.page-products .tp-hero .lede {
  margin: clamp(14px, 2.4vw, 22px) 0 0;
  max-width: 62ch;
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.3vw, 19px);
  line-height: 1.85;
  color: var(--mint);
}

.page-products .tp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3.4vw, 34px);
}

/* ---------- 区块通用标题 ---------- */

.page-products .tp-head {
  max-width: 68ch;
}

.page-products .tp-head-lede {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(15px, 2.1vw, 18px);
  line-height: 1.82;
  color: var(--mint);
}

/* ---------- 工具总览 ---------- */

.page-products .tp-index-body {
  display: grid;
  gap: var(--tp-gap);
  margin-top: clamp(22px, 4vw, 38px);
}

.page-products .tp-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--tp-edge);
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--ink-raise), var(--ink-night));
}

.page-products .tp-visual img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.page-products .tp-visual--wide {
  border-radius: var(--r-xl);
}

.page-products .tp-visual--wide img {
  aspect-ratio: 16 / 9;
}

.page-products .tp-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.page-products .tp-node {
  position: relative;
  padding-left: 54px;
  padding-bottom: 12px;
}

.page-products .tp-node::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 10px;
  bottom: -10px;
  width: 1px;
  background: var(--tp-edge);
}

.page-products .tp-node:last-child {
  padding-bottom: 0;
}

.page-products .tp-node:last-child::before {
  display: none;
}

.page-products .tp-node-num {
  position: absolute;
  left: 0;
  top: 2px;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--tp-edge);
  background: var(--ink-raise);
  color: var(--gold-neon);
  font-size: 12px;
  line-height: 1;
  z-index: 1;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.page-products .tp-node-link {
  display: block;
  padding: 13px 17px;
  border: 1px solid var(--tp-edge-soft);
  border-radius: var(--r-md);
  background: var(--tp-card);
  color: inherit;
  text-decoration: none;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}

.page-products .tp-node-link:hover,
.page-products .tp-node-link:focus-visible {
  border-color: var(--gold-neon);
  background: rgba(242, 204, 107, .07);
  transform: translateY(-2px);
}

.page-products .tp-node-link:hover ~ .tp-node-num,
.page-products .tp-node:focus-within .tp-node-num {
  border-color: var(--gold-neon);
  background: rgba(242, 204, 107, .12);
}

.page-products .tp-node-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(17px, 2.5vw, 20px);
  letter-spacing: -.01em;
  color: var(--warm);
}

.page-products .tp-node-desc {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--mint);
}

/* ---------- 模块通用 ---------- */

.page-products .tp-module {
  display: grid;
  gap: var(--tp-gap);
  align-items: center;
}

.page-products .tp-module-copy p {
  margin: 14px 0 0;
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.82;
  color: var(--mint);
}

.page-products .tp-module-media {
  min-width: 0;
}

.page-products .tp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.page-products .tp-pills li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--tp-edge-soft);
  background: rgba(11, 20, 18, .55);
  color: var(--mint);
}

.page-products .tp-pills li.chip-blue {
  border-color: rgba(74, 168, 255, .4);
  color: var(--blue);
}

.page-products .tp-pills li.chip-gold {
  border-color: rgba(216, 180, 90, .42);
  color: var(--gold-neon);
}

.page-products .tp-pills li.chip-orange {
  border-color: rgba(255, 90, 54, .45);
  color: var(--orange);
}

.page-products .tp-copyline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 22px;
  padding: 11px 18px;
  border: 1px dashed var(--tp-edge);
  border-radius: var(--r-pill);
  background: rgba(11, 20, 18, .6);
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.page-products .tp-copyline:hover,
.page-products .tp-copyline:focus-within {
  border-color: var(--gold-neon);
  background: rgba(242, 204, 107, .08);
}

.page-products .tp-copyline .copy-key {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mint);
}

.page-products .tp-copyline .copy-val {
  font-size: 14px;
  color: var(--gold-neon);
}

.page-products .tp-copyline .copy-hint {
  font-size: 12px;
  color: rgba(201, 214, 209, .6);
}

.page-products .tp-elsewhere {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--tp-edge-soft);
  font-size: 15px;
  line-height: 1.9;
  color: var(--mint);
}

.page-products .tp-elsewhere a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 168, 255, .45);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}

.page-products .tp-elsewhere a:hover,
.page-products .tp-elsewhere a:focus-visible {
  color: var(--gold-neon);
  border-bottom-color: var(--gold-neon);
}

/* ---------- 小屏看球手机示意 ---------- */

.page-products .tp-phone {
  position: relative;
  width: min(290px, 84%);
  margin-inline: auto;
  padding: 14px 12px 18px;
  border: 1px solid var(--tp-edge);
  border-radius: 36px;
  background: var(--ink-night);
  box-shadow: var(--shadow-lift);
}

.page-products .tp-phone::after {
  content: "";
  position: absolute;
  inset: -18px -22px;
  border-radius: 52px;
  background: radial-gradient(circle at 50% 22%, rgba(74, 168, 255, .12), rgba(74, 168, 255, 0) 66%);
  pointer-events: none;
  z-index: -1;
}

.page-products .tp-phone-notch {
  display: block;
  width: 68px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: var(--r-pill);
  background: rgba(201, 214, 209, .28);
}

.page-products .tp-phone-screen {
  overflow: hidden;
  border: 1px solid var(--tp-edge-soft);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--ink-raise), var(--ink-deep));
}

.page-products .tp-phone-screen img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ---------- 平板与桌面 ---------- */

@media (min-width: 720px) {
  .page-products .tp-index-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
    align-items: start;
  }
}

@media (min-width: 960px) {
  .page-products .tp-module {
    grid-template-columns: minmax(0, 1fr) minmax(0, .86fr);
    gap: clamp(30px, 5vw, 68px);
  }

  .page-products .tp-module--flip > .tp-module-copy {
    order: 2;
  }

  .page-products .tp-module--flip > .tp-module-media {
    order: 1;
  }

  .page-products .tp-node {
    padding-left: 62px;
    padding-bottom: 14px;
  }

  .page-products .tp-phone {
    width: min(310px, 76%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-products .tp-node-link,
  .page-products .tp-node-num,
  .page-products .tp-copyline,
  .page-products .tp-elsewhere a {
    transition: none;
  }

  .page-products .tp-node-link:hover,
  .page-products .tp-node-link:focus-visible {
    transform: none;
  }
}
