/* ============================================================
   排版密度 B 档（中）：只动竖排节奏
   - 字号 / 字重 / 横向宽度 / 图片尺寸 均不改
   - 行距下限 1.45（正文基准 1.55 × .91 = 1.41，按约定夹到 1.45）
   - 表格单元格行高不动
   - 比例开关：--dn-scale，A=0.96，B=0.91
   ============================================================ */
:root{ --dn-scale: .91; }

/* 1) Elementor 容器：上下内边距、上下外边距按比例收
      （Elementor 用 --padding-top/--margin-top 驱动 block 轴）
      注意：不要用 row-gap 覆盖容器 gap——主题卡片网格用的是 gap 单值
      （行/列同值），单独写 row-gap 会把行距压成 0、列距保留，造成网格错位。 */
.e-con{
  --padding-block-start: calc(var(--padding-top, 10px) * var(--dn-scale));
  --padding-block-end:   calc(var(--padding-bottom, 10px) * var(--dn-scale));
  --margin-block-start:  calc(var(--margin-top, 0px) * var(--dn-scale));
  --margin-block-end:    calc(var(--margin-bottom, 0px) * var(--dn-scale));
}

/* 2) 正文字高：1.55 → 1.45（1.45 下限） */
main p,
main li{ line-height: 1.45 !important; }

/* 原本 1.65–1.85 的长文/导语：按同档收到 1.50–1.68 */
.hdi6l .hdi6l-editorial p,
.hdi6l .hdi6l-sec-head p,
.hdi6l .hdi6l-faq-left p,
.footer p,
.footer li,
.kb-body p,
.kb-cta p,
.legal-doc p,
.anpcb-hub-hero-sub,
.anpcb-cat-hero p,
.anpcb-hub-lead{ line-height: 1.55 !important; }
.anpcb-cat-card p,
.anpcb-cat-adv-item p{ line-height: 1.50 !important; }

/* 3) 段落间距（主题里写死的 margin 同步 -9%） */
.anpcb-hub-hero-sub{ margin-top: 16.4px !important; }
.anpcb-hub-hero-btns{ margin-top: 23.7px !important; }
.anpcb-hub .anpcb-hub-stat-lbl p{ margin-top: 5.5px !important; }
.anpcb-hub .anpcb-hub-why-lbl p{ margin-top: 7.3px !important; }
.anpcb-cat-pbody p{ margin-top: 4.6px !important; }
.hdi6l .hdi6l-editorial p{ margin-top: 18.2px !important; }
.hdi6l .hdi6l-sec-head p{ margin-top: 8.2px !important; }
.hdi6l .hdi6l-quote-card p{ margin-top: 5.5px !important; }
.hdi6l .hdi6l-faq-left p{ margin-top: 10.9px !important; }
.kb-body p{ margin-bottom: 12.7px !important; }
.kb-card p{ margin-bottom: 9.1px !important; }
.legal-doc p{ margin-bottom: 10.9px !important; }

/* 4) 页头 → 首屏、页脚上方过渡：页脚自身上下留白 -9% */
.footer{ padding-top: 40px !important; padding-bottom: 31px !important; }
.footer-bottom-wrap{ padding-top: 14.6px !important; padding-bottom: 14.6px !important; }
@media (max-width: 767px){
  .footer{ padding-top: 32.8px !important; padding-bottom: 29.1px !important; }
}

/* 6) 表格：单元格上下内边距、行内行距同步 -9%，单元格最小高 32px
      （只动竖向；table-layout/fixed 列宽与横向滚动容器不变） */
main table.master th,
main table.master td,
main .hdi6l-table th,
main .hdi6l-table td,
main .imp-table th,
main .imp-table td{ padding-top: 9.1px !important; padding-bottom: 9.1px !important; height: 32px; }
main .mat-ro4-table th,
main .mat-ro4-table td{ padding-top: 7.3px !important; padding-bottom: 7.3px !important; height: 32px; }
main .mat-list-table th,
main .mat-list-table td{ padding-top: 8.2px !important; padding-bottom: 8.2px !important; height: 32px; }

main table.master th,
main table.master td{ line-height: 1.37 !important; }
main .hdi6l-table th,
main .hdi6l-table td{ line-height: 1.41 !important; }
main .mat-ro4-table th,
main .mat-ro4-table td{ line-height: 1.37 !important; }
main .mat-list-table th,
main .mat-list-table td{ line-height: 1.46 !important; }
main .imp-table th,
main .imp-table td{ line-height: 1.25 !important; } /* 原 1.3 已偏紧，按同档会到 1.18，取 1.25 防贴边 */

/* 5) 主题里写死的 section / 卡片上下留白（桌面档同步 -9%；
      移动端这些类沿用原值，仅 Elementor 容器与正文行距参与收缩） */
@media (min-width: 1200px){
  main .anpcb-cat-card{ padding-top: 20px !important; padding-bottom: 20px !important; }
  main .anpcb-cat-build{ padding-top: 14.6px !important; padding-bottom: 14.6px !important; }
  main .anpcb-model-module{ padding-top: 54.6px !important; padding-bottom: 54.6px !important; }
  main .hdi6l .hdi6l-hero{ padding-top: 27.3px !important; padding-bottom: 27.3px !important; }
  main .hdi6l .hdi6l-sec{ padding-top: 24.6px !important; padding-bottom: 32.8px !important; }
  main .hdi6l .hdi6l-quote{ padding-top: 30px !important; padding-bottom: 30px !important; }
  main .hdi6l .hdi6l-cap,
  main .hdi6l .hdi6l-model{ padding-top: 18.2px !important; padding-bottom: 18.2px !important; }
  main .hdi6l .hdi6l-app{ padding-top: 19.1px !important; padding-bottom: 19.1px !important; }
  main .hdi6l .hdi6l-quote-card{ padding-top: 25.5px !important; padding-bottom: 25.5px !important; }
  main .hdi6l-editorial{ padding-top: 14.6px !important; padding-bottom: 32.8px !important; }
  main .mat-hero.mat-hero--list{ padding-top: 31px !important; padding-bottom: 23.7px !important; }
  main .mat-group-sec{ padding-top: 23.7px !important; padding-bottom: 3.6px !important; }
  main .mat-tier-pick{ padding-top: 21.8px !important; padding-bottom: 12.7px !important; }
  main .mat-ro4{ padding-top: 25.5px !important; padding-bottom: 3.6px !important; }
  main .mat-ro4.mat-arlon{ padding-top: 21.8px !important; padding-bottom: 3.6px !important; }
}

/* 7) 相邻区块分界：不再叠加两侧 padding，统一成一份 48px（CSS 22+22，1.1 倍后 48.4）
      首屏顶部、页脚上方仍按 B 档原节奏 */
@media (min-width: 1024px){
  main .e-con.e-parent{ --padding-block-start: 22px; --padding-block-end: 22px; }
  main .e-con.e-parent:first-child{ --padding-block-start: calc(var(--padding-top, 10px) * var(--dn-scale)); }
  main .e-con.e-parent:last-child{ --padding-block-end: calc(var(--padding-bottom, 10px) * var(--dn-scale)); }
  main .hdi6l .hdi6l-sec,
  main .hdi6l .hdi6l-quote{ padding-top: 22px !important; padding-bottom: 22px !important; }
}

/* 8) 材料参数表表头：9 → 10.5px（保留大写与 0.54px 字距），压 th 上下 padding 抵消行高 */
main .mat-list-table thead th{
  font-size: 10.5px !important;
  letter-spacing: .54px;
  padding-top: 7.4px !important;
  padding-bottom: 7.4px !important;
}

/* 9) 材料页说明性小字提升到正文档（15px），限宽避免超长行 */
main .mat-rights,
main .mat-group-intro,
main .mat-group-note{ font-size: 15px !important; line-height: 1.45 !important; max-width: 780px; }
main .mat-row-maker{ font-size: 12px !important; }
main .mat-rail > a span{ font-size: 13px !important; }
main .mat-count{ font-size: 12px !important; }

/* 10) 另一类分界：padding 写死在主题/页面 CSS 里（不吃 --padding-top），
       上一节的 padding-bottom + 下一节的 padding-top 仍会叠成双份。
       这些页面统一改成 22+22（物理 48.4），与第 7 条同档；
       首屏顶部、页脚上方保持原节奏。 */
@media (min-width: 1024px){
  /* PCBA 单品：pcba-detail.css 里 .pc-sec 写死 62/62，QUOTE 56/64 */
  main .e-con.pc-sec{ padding-top: 22px !important; padding-bottom: 22px !important; }
  main .e-con.pcA-chain{ padding-top: 22px !important; padding-bottom: 22px !important; }
  main .e-con.pcA-hero{ padding-bottom: 22px !important; }
  main .e-con.pcA-close{ padding-top: 22px !important; }

  /* 分类页：主题给 .anpcb-cat-section 写死 36/36 */
  main .e-con.anpcb-cat-section{ padding-top: 22px !important; padding-bottom: 22px !important; }
  main .e-con.anpcb-cat-section:last-of-type{ padding-bottom: 36px !important; }
  main .e-con.anpcb-cat-hero{ padding-bottom: 22px !important; }

  /* 型号页 hdi6l：编辑段底部 32.8 与其余 22 不齐 */
  main .hdi6l .hdi6l-editorial{ padding-bottom: 22px !important; }

  /* 4 个分类页的 model-slot 缺 --display 退化为 inline：上下 padding 不参与排版、
     border-top 不绘制，还会与首屏重叠 ~20px。这里恢复成列向 flex。 */
  main .e-con.anpcb-model-slot{ display: flex !important; flex-direction: column; }
}

/* 11) 竖向卡片列表：卡与卡之间补回可见间距（原设计 gap 为 0，仅靠边框相接）。
       PCBA 汇总页 FAQ 卡片（.pc-faq，圆角+边框）；同时清掉第 7 条误加到卡片
       自身的 22px 上下内边距（卡片内部本来就有 14px 行内边距）。 */
main .pcba-sec-faq > .pc-faq + .pc-faq{ margin-top: 12px !important; }
@media (min-width: 1024px){
  main .e-con.pc-faq.e-parent{ --padding-block-start: 0; --padding-block-end: 0; }
}
