/* 配套选型页 /match-components/ 的 PHY 配套表（2026-11-06）：只在英文站英文页加载（problem_guide/page.html 按 $guidePhyTable 判断）。
   桌面是 5 列表格；≤760 每行变成一张卡片、单元格前面用 data-label 写列名，整页不出横向滚动。颜色变量来自 problem-guide.css 的 .pg-page；.pg-page p / ul 把内外边距清零，说明句和脚注要带 .pg-page 前缀才压得过 */
.pg-phy {
  background: #fff;
}

.pg-page .pg-phy-note {
  margin-top: 16px !important;
  padding: 12px 16px;
  border-left: 4px solid var(--pg-red);
  border-radius: 4px;
  background: var(--pg-bg);
  color: var(--pg-ink);
  font-size: 14px;
  line-height: 1.6;
}

.pg-phy-note a {
  font-weight: 600;
  white-space: nowrap;
}

.pg-phy-wrap {
  margin-top: 24px;
  border: 1px solid var(--pg-line);
  border-radius: 12px;
  overflow: hidden;
}

.pg-phy-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.5;
}

.pg-phy-table th,
.pg-phy-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pg-line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pg-phy-table th {
  background: var(--pg-bg);
  color: var(--pg-ink);
  font-size: 13px;
  font-weight: 700;
}

.pg-phy-table th:nth-child(1) { width: 20%; }
.pg-phy-table th:nth-child(2) { width: 13%; }
.pg-phy-table th:nth-child(3) { width: 19%; }
.pg-phy-table th:nth-child(4) { width: 22%; }
.pg-phy-table th:nth-child(5) { width: 26%; }

.pg-phy-table tbody tr:last-child td {
  border-bottom: 0;
}

.pg-phy-table tbody tr:hover td {
  background: #fafbfc;
}

.pg-phy-parts li,
.pg-phy-refs li {
  padding: 1px 0;
}

.pg-phy-parts a {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
}

.pg-phy-type {
  display: block;
  margin-top: 4px;
  color: var(--pg-muted);
  font-size: 12px;
}

.pg-phy-speed {
  color: var(--pg-ink);
  white-space: nowrap;
}

.pg-phy-muted {
  color: var(--pg-muted);
}

.pg-page .pg-phy-foot {
  margin-top: 16px !important;
  color: var(--pg-muted);
  font-size: 13px;
  line-height: 1.6;
}

.pg-phy-foot li + li {
  margin-top: 4px;
}

@media (max-width: 760px) {
  .pg-phy-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .pg-phy-table,
  .pg-phy-table tbody,
  .pg-phy-table tr,
  .pg-phy-table td {
    display: block;
    width: 100%;
  }

  .pg-phy-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .pg-phy-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--pg-line);
    border-radius: 12px;
    overflow: hidden;
  }

  .pg-phy-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 14px;
  }

  .pg-phy-table td::before {
    content: attr(data-label);
    color: var(--pg-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
  }

  .pg-phy-table tbody tr:last-child td {
    border-bottom: 1px solid var(--pg-line);
  }

  .pg-phy-table tbody tr td:last-child {
    border-bottom: 0;
  }

  .pg-phy-type {
    grid-column: 2;
  }
}
