.page-products {
  --pd-line: rgba(36, 26, 20, 0.18);
  --pd-line-soft: rgba(36, 26, 20, 0.09);
  --pd-card-bg: rgba(255, 255, 255, 0.5);
}

.page-products .breadcrumb {
  margin-top: clamp(14px, 2.4vw, 24px);
}

.page-products .pd-section {
  padding-block: clamp(30px, 5vw, 62px);
}

.page-products .section-head {
  max-width: 62ch;
  margin-bottom: clamp(18px, 3vw, 30px);
}

.page-products .section-title {
  margin: 8px 0 12px;
  font-size: clamp(1.4rem, 1rem + 1.9vw, 2.15rem);
  line-height: 1.35;
}

.page-products .lede {
  font-size: clamp(0.94rem, 0.9rem + 0.2vw, 1.02rem);
  line-height: 1.78;
}

/* ---------- 首屏 ---------- */
.pd-hero {
  padding: clamp(18px, 3vw, 34px) 0 clamp(30px, 5vw, 58px);
}

.pd-hero-grid {
  display: grid;
  gap: clamp(22px, 3.4vw, 40px);
  align-items: start;
}

.pd-hero-copy .eyebrow {
  margin: 0;
}

.pd-hero-copy .display-title {
  margin: 10px 0 16px;
  font-size: clamp(1.75rem, 1.15rem + 3.4vw, 3.05rem);
  line-height: 1.22;
}

.pd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pd-quickfacts {
  list-style: none;
  margin: 22px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed var(--pd-line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.pd-quickfacts li::before {
  content: "▪";
  color: var(--amber);
  margin-right: 6px;
}

.pd-hero-map {
  padding: 16px 14px 12px;
  border-radius: var(--radius-l);
}

.pd-hero-map .eyebrow {
  margin: 0 0 8px;
}

.pd-map-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pd-map-item a {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-m);
  color: var(--brown);
  text-decoration: none;
  border-bottom: 1px solid var(--pd-line-soft);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.pd-map-item:last-child a {
  border-bottom: 0;
}

.pd-map-item a:hover,
.pd-map-item a:focus-visible {
  background: rgba(47, 211, 181, 0.16);
  transform: translateY(-1px);
}

.pd-map-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--amber);
}

.pd-map-text {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- 图片 ---------- */
.pd-figure {
  margin: 0 0 clamp(20px, 3vw, 30px);
}

.pd-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--pd-line);
  box-shadow: var(--shadow-plate);
}

.pd-figure figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--halftone);
}

.pd-figure--strip {
  margin: clamp(22px, 3.4vw, 34px) 0 0;
}

/* ---------- 版本时间轴 ---------- */
.pd-timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 6px 0 6px 24px;
  display: grid;
  gap: 12px;
}

.pd-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--amber), rgba(201, 138, 46, 0.12));
}

.pd-tl-item {
  position: relative;
}

.pd-tl-dot {
  position: absolute;
  left: -24px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--paper);
  border: 2px solid var(--amber);
  box-shadow: 0 0 0 3px rgba(243, 233, 210, 0.9);
}

.pd-tl-card {
  padding: 13px 15px;
  border-radius: var(--radius-m);
}

.pd-tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pd-tl-ver {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.pd-tl-meta {
  margin: 7px 0 0;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
  color: var(--halftone);
}

.pd-tl-details {
  margin-top: 10px;
  border-top: 1px dashed var(--pd-line);
  padding-top: 8px;
}

.pd-tl-details summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.pd-tl-details summary::marker {
  color: var(--amber);
}

.pd-tl-details summary:hover {
  color: var(--brick);
}

.pd-tl-details p {
  margin: 9px 0 0;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--brown);
  max-width: 46ch;
}

/* ---------- 筛选条 ---------- */
.pd-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: var(--radius-m);
  background: rgba(228, 214, 184, 0.42);
  border: 1px solid var(--pd-line-soft);
}

.page-products .filter-btn {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--pd-line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.page-products .filter-btn:hover {
  border-color: var(--mint);
  color: var(--ink);
}

.page-products .filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.page-products .filter-status {
  margin: 0 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.page-products .is-filtered-out {
  display: none !important;
}

/* ---------- 表格 ---------- */
.pd-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--pd-line);
  border-radius: var(--radius-m);
  background: var(--pd-card-bg);
}

.pd-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--brown);
}

.pd-table thead th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
  padding: 10px 12px;
}

.pd-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--pd-line-soft);
  vertical-align: top;
  line-height: 1.6;
}

.pd-table tbody tr:nth-child(even) {
  background: rgba(228, 214, 184, 0.5);
}

.pd-table tbody tr:hover {
  background: rgba(47, 211, 181, 0.12);
}

.pd-table .mono {
  font-family: var(--font-mono);
  font-size: 0.79rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pd-state {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.71rem;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pd-state--open {
  color: var(--ink);
  background: rgba(47, 211, 181, 0.24);
  border-color: var(--mint);
}

.pd-state--maint {
  color: var(--brick);
  background: rgba(167, 72, 47, 0.12);
  border-color: rgba(167, 72, 47, 0.45);
}

.pd-state--arch {
  color: var(--halftone);
  background: rgba(140, 138, 122, 0.16);
  border-color: rgba(140, 138, 122, 0.45);
}

.pd-tz {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  border: 1px solid rgba(18, 53, 46, 0.22);
}

.pd-note {
  margin: 14px 0 0;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--ink-soft);
  padding-left: 12px;
  border-left: 3px solid var(--amber);
  max-width: 62ch;
}

.pd-note a {
  color: var(--brick);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 分栏 ---------- */
.pd-split {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

.pd-split .pd-figure {
  margin-bottom: 0;
}

.pd-desktop-copy {
  order: -1;
}

/* ---------- 游戏库 ---------- */
.pd-lib-top {
  margin-bottom: clamp(16px, 2.6vw, 24px);
}

.pd-lib-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.pd-lib-card {
  padding: 14px 16px;
  border-radius: var(--radius-m);
  background: var(--pd-card-bg);
  border: 1px solid var(--pd-line);
  border-left: 4px solid var(--amber);
}

.pd-lib-card h3 {
  margin: 0 0 5px;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.pd-lib-card .meta-mono {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
  color: var(--halftone);
}

.pd-lib-card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--brown);
}

/* ---------- 安装步骤 ---------- */
.pd-steps {
  list-style: none;
  counter-reset: pdstep;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pd-steps li {
  counter-increment: pdstep;
  position: relative;
  padding-left: 46px;
  font-size: 0.89rem;
  line-height: 1.75;
  color: var(--brown);
}

.pd-steps li::before {
  content: counter(pdstep, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--mint);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.pd-steps strong {
  color: var(--ink);
}

.pd-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- 使用记录 ---------- */
.pd-records {
  padding: clamp(16px, 2.6vw, 26px);
  border-radius: var(--radius-l);
}

.pd-records p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--brown);
  max-width: 60ch;
}

.pd-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: clamp(16px, 2.6vw, 24px);
}

.pd-link-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-m);
  background: var(--paper-2);
  border: 1px solid var(--pd-line);
  text-decoration: none;
  color: var(--brown);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.pd-link-card:hover,
.pd-link-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--mint);
}

.pd-link-card .tag {
  justify-self: start;
}

.pd-link-card strong {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
}

.pd-link-card .meta-mono {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
  color: var(--halftone);
}

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .pd-lib-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .pd-timeline {
    gap: 14px;
  }
}

@media (min-width: 880px) {
  .pd-hero-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(26px, 3.6vw, 48px);
  }

  .pd-split {
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.58fr);
  }

  .pd-split--reverse {
    grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr);
  }

  .pd-desktop-copy {
    order: 0;
  }

  .pd-timeline {
    padding-left: 28px;
    gap: 16px;
  }

  .pd-tl-dot {
    left: -28px;
  }

  .pd-tl-card {
    padding: 15px 20px;
  }

  .pd-figure--strip {
    max-width: 78%;
  }
}

@media (min-width: 1040px) {
  .pd-lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-products .pd-map-item a,
  .page-products .pd-link-card,
  .page-products .filter-btn {
    transition: none;
  }

  .page-products .pd-map-item a:hover,
  .page-products .pd-link-card:hover {
    transform: none;
  }
}
