.page-products {
  --px-rail: 264px;
  --px-rail-gap: 34px;
  padding-bottom: 72px;
}

/* ---------- 面包屑 ---------- */
.page-products .crumb {
  margin: 20px 0 14px;
}

/* ---------- 首屏 ---------- */
.page-products .lib-hero {
  position: relative;
  margin-bottom: 30px;
  padding: 4px 0 22px;
  border-bottom: 1px solid rgba(14, 21, 18, 0.22);
  background: linear-gradient(104deg, transparent 0 60%, rgba(179, 39, 45, 0.09) 60% 100%);
}

.page-products .lib-hero .eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--red);
}

.page-products .lib-hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.page-products .lib-hero .lede {
  max-width: 60ch;
  margin: 0 0 22px;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink);
}

.page-products .hero-scale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-num);
  font-size: 13px;
}

.page-products .hero-scale .scale-label {
  padding-right: 10px;
  margin-right: 4px;
  border-right: 2px solid var(--gold);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--slate);
}

.page-products .hero-scale .scale-item {
  padding: 4px 11px;
  color: var(--slate);
  background: rgba(18, 58, 50, 0.08);
  border-bottom: 2px solid rgba(18, 58, 50, 0.18);
}

.page-products .hero-scale .scale-item.is-current {
  color: var(--green-deep);
  background: var(--gold);
  font-weight: 700;
  border-bottom-color: var(--red);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
}

/* ---------- 两列骨架 ---------- */
.page-products .lib-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
}

.page-products .lib-rail,
.page-products .lib-body {
  min-width: 0;
}

.page-products .lib-rail-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-products .rail-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--slate);
}

.page-products .rail-title--second {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed rgba(14, 21, 18, 0.25);
}

.page-products .rail-list {
  list-style: none;
  margin: 0;
  padding: 0 0 4px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.page-products .rail-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(14, 21, 18, 0.28);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.page-products .rail-list a:hover,
.page-products .rail-list a:focus-visible {
  background: var(--gold);
  transform: translateY(-2px);
}

.page-products .rail-list a:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--gold-hi);
}

.page-products .rail-code {
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--red);
  min-width: 26px;
}

.page-products .chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-products .chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--paper);
  background: var(--slate);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.page-products .chip:hover,
.page-products .chip:focus-visible {
  transform: translateY(-2px);
  background: var(--green);
}

.page-products .chip:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold-hi);
}

.page-products .chip.is-active {
  color: var(--green-deep);
  background: var(--cyan);
}

/* ---------- 卡片基础 ---------- */
.page-products .map-card,
.page-products .module {
  position: relative;
  margin: 0 0 26px;
  padding: 24px 20px 22px;
  background: var(--card);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.page-products .module-figure {
  margin: 0 0 18px;
  overflow: hidden;
  background: rgba(18, 58, 50, 0.1);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

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

.page-products .module-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.page-products .module-head-text {
  min-width: 0;
}

.page-products .module-code {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 26px;
  padding: 0 9px;
  background: var(--green);
  color: var(--gold);
  font-family: var(--font-num);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.page-products .module-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(20px, 4.4vw, 26px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.page-products .module-sub {
  margin: 6px 0 0;
  font-family: var(--font-num);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--slate);
}

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

.page-products .module-lede {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}

.page-products .module-lede--tight {
  margin-bottom: 10px;
  font-size: 15px;
}

/* ---------- 模块地图 ---------- */
.page-products .map-card {
  background: var(--green);
  box-shadow: inset 0 0 0 1.5px var(--green-deep);
}

.page-products .map-title {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(21px, 4.6vw, 28px);
  line-height: 1.25;
  color: var(--paper);
}

.page-products .map-lede {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.85;
  color: rgba(243, 231, 206, 0.86);
}

.page-products .map-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.page-products .map-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "prefix name"
    "prefix desc"
    "prefix meta";
  gap: 3px 12px;
  align-items: baseline;
  padding: 12px 14px;
  text-decoration: none;
  background: rgba(243, 231, 206, 0.07);
  border-left: 3px solid var(--gold);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.page-products .map-link:hover,
.page-products .map-link:focus-visible {
  background: rgba(242, 208, 122, 0.16);
  transform: translateX(4px);
}

.page-products .map-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold-hi);
}

.page-products .map-prefix {
  grid-area: prefix;
  font-family: var(--font-num);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.page-products .map-name {
  grid-area: name;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16.5px;
  color: var(--paper);
}

.page-products .map-desc {
  grid-area: desc;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(243, 231, 206, 0.78);
}

.page-products .map-meta {
  grid-area: meta;
  margin-top: 4px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cyan);
}

/* ---------- 事实清单 ---------- */
.page-products .fact-list {
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-products .fact {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: rgba(18, 58, 50, 0.055);
  border-left: 3px solid var(--gold);
}

.page-products .fact dt {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--green);
}

.page-products .fact dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

/* ---------- 折叠面板 ---------- */
.page-products .panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(14, 21, 18, 0.2);
}

.page-products .panel-head {
  margin: 0;
}

.page-products .panel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  cursor: pointer;
  background: var(--green);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.page-products .panel-trigger::before {
  content: "+";
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--gold);
}

.page-products .panel-trigger[aria-expanded="true"]::before {
  content: "–";
}

.page-products .panel-trigger:hover {
  background: var(--green-deep);
  transform: translateY(-2px);
}

.page-products .panel-trigger:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold-hi);
}

.page-products .panel-body {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(18, 58, 50, 0.05);
  border-left: 3px solid var(--cyan);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
}

.page-products .panel-body p {
  margin: 0;
}

/* ---------- 表格 ---------- */
.page-products .table-title {
  margin: 22px 0 6px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.4;
  color: var(--green);
}

.page-products .table-wrap {
  margin: 6px 0 16px;
  overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgba(14, 21, 18, 0.22);
}

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

.page-products .data-table caption {
  padding: 10px 12px;
  text-align: left;
  background: var(--green);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.04em;
}

.page-products .data-table th,
.page-products .data-table td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(14, 21, 18, 0.16);
}

.page-products .data-table thead th {
  background: var(--green-deep);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.page-products .data-table tbody tr:nth-child(even) {
  background: rgba(243, 231, 206, 0.7);
}

.page-products .data-table tbody th {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--green);
  white-space: nowrap;
}

.page-products .data-table .num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* ---------- 难度条 ---------- */
.page-products .drill-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 9px;
}

.page-products .drill-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-template-areas:
    "lv name time"
    "lv bar count";
  align-items: center;
  gap: 5px 12px;
  padding: 10px 12px;
  background: var(--paper);
  border-left: 3px solid var(--slate);
  transition: transform 180ms var(--ease);
}

.page-products .drill-row:hover {
  transform: translateX(3px);
}

.page-products .drill-lv {
  grid-area: lv;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 14px;
  color: var(--green);
}

.page-products .drill-name {
  grid-area: name;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
}

.page-products .drill-bar {
  grid-area: bar;
  display: block;
  width: 100%;
  height: 8px;
}

.page-products .drill-bar rect {
  fill: var(--slate);
}

.page-products .drill-row:nth-child(1) .drill-bar rect,
.page-products .drill-row:nth-child(2) .drill-bar rect {
  fill: var(--cyan);
}

.page-products .drill-row:nth-child(3) .drill-bar rect,
.page-products .drill-row:nth-child(4) .drill-bar rect {
  fill: var(--gold);
}

.page-products .drill-row:nth-child(5) .drill-bar rect,
.page-products .drill-row:nth-child(6) .drill-bar rect {
  fill: var(--red);
}

.page-products .drill-count {
  grid-area: count;
  font-family: var(--font-num);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

.page-products .drill-time {
  grid-area: time;
  font-family: var(--font-num);
  font-size: 12.5px;
  color: var(--slate);
  white-space: nowrap;
}

.page-products .module-note {
  margin: 0 0 10px;
  padding-left: 12px;
  border-left: 2px solid rgba(18, 58, 50, 0.32);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.8;
  color: var(--slate);
}

.page-products .module-note--warn {
  margin-bottom: 0;
  border-left-color: var(--red);
  color: var(--ink);
}

/* ---------- 检索入口 ---------- */
.page-products .module--search {
  background: var(--card);
}

.page-products .entry-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.page-products .entry {
  padding: 16px 16px 18px;
  background: var(--paper);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  box-shadow: inset 0 4px 0 0 var(--green), inset 0 0 0 1px rgba(14, 21, 18, 0.2);
  transition: transform 180ms var(--ease);
}

.page-products .entry:hover {
  transform: translateY(-3px);
}

.page-products .entry-step {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}

.page-products .entry h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.4;
}

.page-products .entry h3 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid rgba(63, 214, 200, 0.7);
}

.page-products .entry h3 a:hover,
.page-products .entry h3 a:focus-visible {
  color: var(--green);
  border-bottom-color: var(--red);
}

.page-products .entry h3 a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.page-products .entry p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
}

.page-products .cross-links {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px dashed rgba(14, 21, 18, 0.28);
  display: grid;
  gap: 4px;
}

.page-products .cross-links a {
  display: block;
  padding: 9px 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid rgba(63, 214, 200, 0.6);
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.page-products .cross-links a:hover,
.page-products .cross-links a:focus-visible {
  color: var(--green);
  border-bottom-color: var(--red);
}

.page-products .cross-links a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---------- 平板与桌面 ---------- */
@media (min-width: 640px) {
  .page-products .map-link {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-areas:
      "prefix name meta"
      "prefix desc meta";
    align-items: center;
  }

  .page-products .map-meta {
    margin-top: 0;
    text-align: right;
  }

  .page-products .fact {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 14px;
    align-items: baseline;
  }

  .page-products .cross-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 24px;
  }
}

@media (min-width: 760px) {
  .page-products .entry-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .page-products .lib-layout {
    grid-template-columns: minmax(0, var(--px-rail)) minmax(0, 1fr);
    gap: var(--px-rail-gap);
    align-items: start;
  }

  .page-products .lib-rail-inner {
    position: sticky;
    top: 96px;
  }

  .page-products .rail-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    overflow: visible;
  }

  .page-products .rail-list a {
    padding: 9px 14px;
  }

  .page-products .map-card,
  .page-products .module {
    padding: 28px 28px 26px;
  }

  .page-products .lib-body > *:nth-child(odd) {
    margin-right: 26px;
  }

  .page-products .lib-body > *:nth-child(even) {
    margin-left: 26px;
  }

  .page-products .module-head {
    gap: 14px;
  }
}

@media (min-width: 1220px) {
  .page-products {
    --px-rail: 288px;
  }

  .page-products .lib-hero {
    padding-right: 40px;
  }
}

/* ---------- 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-products .rail-list a,
  .page-products .chip,
  .page-products .map-link,
  .page-products .panel-trigger,
  .page-products .drill-row,
  .page-products .entry,
  .page-products .cross-links a {
    transition: none;
  }

  .page-products .rail-list a:hover,
  .page-products .chip:hover,
  .page-products .map-link:hover,
  .page-products .panel-trigger:hover,
  .page-products .drill-row:hover,
  .page-products .entry:hover {
    transform: none;
  }
}
