/* ==========================================================================
   TPM 贸易促销管理 · 专属组件（assets/css/tpm-page.css）
   只在 /TPM 加载，类名一律 tpmx- 前缀，不动 .card / .kpis / .table 等全站基线。

   三个组件：
   ① .tpmx-mix   投放结构堆叠条：官网「约55% / 约15% / 约30%」三句原话的可视化，
                 数值就写在原句末尾，不另算、不四舍五入。
   ② .tpmx-tri   三问三答链：怎么管 / 管什么 / 怎么控，每行「问句 + 标题 + 三条短语」。
   ③ .tpmx-cats  八类营销费用：顶部一条类目轴（chip），下方八张卡全部展开；
                 chip 只做高亮与定位，不隐藏任何文字——否则文案比对读不到。
   ④ .tpmx-mx    市场效果指标两栏（财务 3 条 / 渠道执行 6 条）。
   ========================================================================== */

/* ① 四条行业事实 ---------------------------------------------------------- */
/* 官网这四条是「一句数字 + 一句说明」，其中两句是整句（25%-30% 那句 30 字、
   20% 那句 25 字）。塞进 .kpis 的四等分列会被压成竖排，所以这里自建两列卡。 */
.tpmx-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tpmx-fact {
  position: relative;
  padding: 24px 26px 22px 30px;
  background: #fff;
  border: 1px solid var(--line, #e3e9f2);
  border-radius: var(--r-md, 12px);
}

.tpmx-fact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 3px;
  background: #2f6fd0;
}

.tpmx-fact__v {
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: #123c68;
}

.tpmx-fact__t {
  margin-top: 8px;
  font-size: var(--fs-15, 15px);
  line-height: 1.7;
  color: var(--body, #33445c);
}

.tpmx-fact__src {
  margin: 10px 0 0;
  font-size: var(--fs-12, 12px);
  color: var(--muted, #6b7a90);
}

/* 节标题：中文长标题会被挤成「…机 / 制」两行，交给 balance 断 */
.tpmx-page-head h2,
.section-head { max-width: 900px; }
.section-head h2 { text-wrap: balance; }

/* ② 投放结构堆叠条 -------------------------------------------------------- */
.tpmx-cap {
  margin: 0 0 12px;
  font-size: var(--fs-13, 13px);
  letter-spacing: .08em;
  color: var(--muted, #6b7a90);
}

.tpmx-mix { margin-top: 6px; }

.tpmx-bar {
  display: flex;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft-2, #eef2f7);
  box-shadow: inset 0 0 0 1px rgba(18, 60, 104, .08);
}

.tpmx-seg {
  flex: 0 0 var(--w);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: #fff;
  font-size: var(--fs-15, 15px);
  font-weight: 700;
  transition: filter .18s ease, opacity .18s ease;
}

.tpmx-seg i { font-style: normal; }

/* 三段用官网自己的顺序：返利 → 门店费用 → 商品陈列推销 */
.tpmx-seg--r { background: #2f6fd0; }
.tpmx-seg--s { background: #7aa5e6; }
.tpmx-seg--m { background: #c3d7f5; color: #17365f; }

/* 悬停 / 选中：非当前段降饱和，让「返利类占了一半以上」这件事自己浮出来 */
.tpmx-mix.is-on .tpmx-seg { opacity: .38; }
.tpmx-mix.is-on .tpmx-seg.is-on { opacity: 1; }

.tpmx-lg-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tpmx-lg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--fs-15, 15px);
  color: var(--body, #33445c);
  line-height: 1.65;
  transition: color .18s ease;
}

.tpmx-lg.is-on { color: #123c68; font-weight: 600; }

.tpmx-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
}

.tpmx-dot--r { background: #2f6fd0; }
.tpmx-dot--s { background: #7aa5e6; }
.tpmx-dot--m { background: #c3d7f5; box-shadow: inset 0 0 0 1px rgba(18, 60, 104, .35); }

/* 「问题」三条：官网是三个并列的后果，用图标列表达，不加序号、不排序 */
.tpmx-issue { margin-top: 30px; }

/* ② 三问三答链 ------------------------------------------------------------ */
.tpmx-tri {
  border: 1px solid var(--line, #e3e9f2);
  border-radius: var(--r-lg, 14px);
  overflow: hidden;
  background: #fff;
}

.tpmx-tri-row {
  display: grid;
  /* 左列给固定宽度：问句块本身只有 10 来字，按 1fr 分会把中间空出一大片 */
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 26px;
  align-items: center;
}

.tpmx-tri-row + .tpmx-tri-row { border-top: 1px solid var(--line, #e3e9f2); }

.tpmx-tri-q {
  padding-left: 16px;
  border-left: 3px solid #2f6fd0;
}

.tpmx-tri-ask {
  display: block;
  font-size: var(--fs-13, 13px);
  letter-spacing: .06em;
  color: #2f6fd0;
  font-weight: 700;
}

.tpmx-tri-q b {
  display: block;
  margin: 4px 0 6px;
  font-size: var(--fs-20, 20px);
  color: #123c68;
}

.tpmx-tri-q em {
  font-style: normal;
  font-size: var(--fs-13, 13px);
  color: var(--muted, #6b7a90);
}

.tpmx-tri-a {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tpmx-tri-a li {
  position: relative;
  padding: 10px 12px 10px 34px;
  font-size: var(--fs-15, 15px);
  color: var(--body, #33445c);
  background: var(--soft-1, #f6f8fb);
  border-radius: 8px;
}

/* 三条短语排成一串，用序号点出「事前 → 事中 → 事后」的先后 */
.tpmx-tri-a li::before {
  content: counter(list-item);
  counter-increment: none;
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2f6fd0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* ③ 八类营销费用 ---------------------------------------------------------- */
.tpmx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tpmx-chip {
  appearance: none;
  border: 1px solid var(--line, #e3e9f2);
  background: #fff;
  color: var(--body, #33445c);
  font: inherit;
  font-size: var(--fs-14, 14px);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.tpmx-chip:hover { border-color: #2f6fd0; color: #123c68; }

.tpmx-chip.is-on {
  background: #2f6fd0;
  border-color: #2f6fd0;
  color: #fff;
}

.tpmx-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tpmx-cat {
  position: relative;
  padding: 20px 18px 18px;
  background: #fff;
  border: 1px solid var(--line, #e3e9f2);
  border-radius: var(--r-md, 12px);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tpmx-cat__no {
  display: inline-block;
  margin-bottom: 8px;
  font-size: var(--fs-12, 12px);
  font-weight: 700;
  letter-spacing: .1em;
  color: #2f6fd0;
}

.tpmx-cat h3 {
  margin: 0 0 6px;
  font-size: var(--fs-17, 17px);
  color: #123c68;
}

.tpmx-cat p {
  margin: 0 0 12px;
  font-size: var(--fs-13, 13px);
  line-height: 1.6;
}

.tpmx-cat ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.tpmx-cat ul li {
  position: relative;
  padding-left: 14px;
  font-size: var(--fs-14, 14px);
  line-height: 1.6;
  color: var(--body, #33445c);
}

.tpmx-cat ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9cbe6;
}

.tpmx-cat.is-on {
  border-color: #2f6fd0;
  box-shadow: 0 6px 22px rgba(47, 111, 208, .14);
}

/* ④ 市场效果指标两栏 ------------------------------------------------------ */
.tpmx-mx {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.tpmx-mx__col {
  background: #fff;
  border: 1px solid var(--line, #e3e9f2);
  border-radius: var(--r-md, 12px);
  padding: 20px 22px 22px;
}

.tpmx-mx__col h3 { margin: 0 0 14px; }

.tpmx-m {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 2fr);
  gap: 14px;
  padding: 11px 0;
  border-top: 1px dashed var(--line, #e3e9f2);
  font-size: var(--fs-14, 14px);
  line-height: 1.6;
}

.tpmx-m:first-of-type { border-top: 0; }
.tpmx-m b { color: #123c68; }
.tpmx-m span { color: var(--body, #33445c); }

/* 官网 TPM 的六个问句本身就带 ">>>"（live_html 里是 &gt;&gt;&gt;），
   站点 .faq summary 又用 ::before 生成一个 → 本页关掉，避免出现「>>> >>>」。 */
.faq summary::before { content: none; }

/* 相关产品四张是产品字标图（220×110），官网按图块排；这里放大到 150 宽 */
.rel-icon-card img { width: 150px; margin: 0 auto 12px; }

/* 八类费用区官网本身没有节标题，直接跟类目轴，给一点上留白 */
.tpmx-cats { padding-top: 4px; }

/* 响应式 ------------------------------------------------------------------ */
@media (max-width: 1000px) {
  .tpmx-facts { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .tpmx-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .tpmx-tri-row { grid-template-columns: 1fr; gap: 16px; }
  .tpmx-mx { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tpmx-cat-grid { grid-template-columns: 1fr; }
  .tpmx-tri-a { grid-template-columns: 1fr; }
  .tpmx-bar { height: 46px; }
  .tpmx-seg { font-size: var(--fs-13, 13px); }
  .tpmx-tri-row { padding: 18px; }
  .tpmx-m { grid-template-columns: 1fr; gap: 4px; }
}

/* ⑤ 首屏配图（2026-11-02）-------------------------------------------------
   原首屏是官网那张 3D 金币/柱状大图，与 RGM「增长」主题同质，
   这里换成「预算分配 + 费用核销」的平面界面构图，讲的是费用管控这一侧。
   导航、logo、h1/lead 的字号与排版一律不动，本段只负责右侧那块配图。 */
.tpmx-hero {
  padding: clamp(38px, 4.4vw, 64px) 0 clamp(54px, 6vw, 84px);
  background:
    radial-gradient(760px 520px at 88% 16%, rgba(122, 166, 236, .14), rgba(0, 0, 0, 0) 66%),
    linear-gradient(180deg, #f7fafe 0%, #ffffff 94%);
  border-bottom: 1px solid var(--line);
}

.tpmx-hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 506px);
  gap: clamp(28px, 3.4vw, 54px);
  align-items: center;
}

.tpmx-hero__copy { min-width: 0; }
.tpmx-hero__copy h1 { max-width: 13em; }
/* 原来 .page-hero .lead 是 44em（704px），比这一列还宽，会顶到右侧卡片上去 */
.tpmx-hero__copy .lead { max-width: 32em; }

/* 配图区：主卡 + 右下浮卡，右下角留出浮卡的出血位 */
.tpmx-hero__art {
  position: relative;
  padding: 16px 0 52px;
  min-width: 0;
}

/* 主卡 */
.tpmx-card {
  position: relative;
  margin-right: 104px;
  padding: 28px 28px 32px;
  background: #fff;
  border: 1px solid #e4ecf7;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(19, 47, 88, .06);
}

/* 左上角的「预算分配」签：一半压在卡片外沿上 */
.tpmx-card__tab {
  position: absolute;
  left: 22px;
  top: -14px;
  height: 28px;
  padding: 0 15px;
  border-radius: 7px;
  background: #2f6fd0;
  color: #fff;
  font-size: 12.5px;
  line-height: 28px;
  letter-spacing: .01em;
}

.tpmx-card__h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: #0e2a4d;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.tpmx-card__tag {
  padding: 2px 7px;
  border-radius: 3px;
  background: #e8f1fd;
  color: #2f6fd0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
}

/* 三条费用：浅蓝是预算，深蓝是已执行 */
.tpmx-bars {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpmx-bars li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tpmx-bars__k {
  flex: 0 0 66px;
  color: #3b5170;
  font-size: 13px;
}

.tpmx-bars__t {
  position: relative;
  flex: 1 1 auto;
  height: 11px;
  border-radius: 6px;
  background: #e8ecf3;
  overflow: hidden;
}

.tpmx-bars__t i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 6px;
}

.tpmx-bars__plan { background: #b6d2f4; }
.tpmx-bars__used { background: #3f7fe0; }

/* 申请 → 执行 → 核销：右侧 96px 是浮卡的避让区，否则核销节点会被整个盖掉 */
.tpmx-flow {
  display: flex;
  align-items: flex-start;
  margin-top: 26px;
  padding-right: 96px;
}

.tpmx-flow__n {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: none;
  width: 44px;
}

.tpmx-flow__n i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid #cfdeee;
  border-radius: 50%;
  background: #fff;
  color: #fff;
}

.tpmx-flow__n b {
  color: #9aa9bd;
  font-size: 12px;
  font-weight: 500;
}

.tpmx-flow__n.is-done i {
  border-color: #3f7fe0;
  background: #3f7fe0;
}

.tpmx-flow__n.is-now i { border-color: #b9d3f2; }
.tpmx-flow__n.is-now i::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f7fe0;
}

.tpmx-flow__n.is-done b,
.tpmx-flow__n.is-now b { color: #2f6fd0; }

.tpmx-flow__l {
  flex: 1 1 auto;
  height: 1px;
  margin: 11px 4px 0;
  background: #d6e2f0;
}

/* 右下浮卡：费用核销 */
.tpmx-vf {
  position: absolute;
  right: 0;
  bottom: 12px;
  width: 198px;
  padding: 15px 16px 16px;
  background: #fff;
  border: 1px solid #e4ecf7;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(19, 47, 88, .07);
}

.tpmx-vf__t {
  margin: 0 0 12px;
  color: #0e2a4d;
  font-size: 14px;
  font-weight: 700;
}

.tpmx-vf ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpmx-vf li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3b5170;
  font-size: 12.5px;
}

.tpmx-vf__ico { display: flex; color: #7ba4d8; }

.tpmx-vf__ok {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: auto;
  border-radius: 50%;
  background: #3f7fe0;
  color: #fff;
}

.tpmx-art-note {
  position: absolute;
  right: 210px;
  bottom: 4px;
  color: #9aa9bd;
  font-size: 10px;
}

/* 单栏后横向空间不够，浮卡再绝对定位就会盖住进度条与核销节点，
   所以整组改成「主卡 → 核销卡 → 示意文字」的顺序排下去。 */
@media (max-width: 1080px) {
  .tpmx-hero__in { grid-template-columns: 1fr; gap: 34px; }
  .tpmx-hero__copy h1 { max-width: none; }
  .tpmx-hero__art { width: 100%; max-width: 560px; margin: 0 auto; padding-bottom: 0; }
  .tpmx-card { margin-right: 0; }
  .tpmx-flow { padding-right: 0; }
  .tpmx-vf { position: static; width: 100%; max-width: none; margin: 14px 0 0; }
  .tpmx-art-note { position: static; display: block; margin-top: 12px; text-align: right; }
  /* 全宽后三行会拉得很稀，改成一行三项 */
  .tpmx-vf ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 18px; }
}

@media (max-width: 700px) {
  .tpmx-hero { padding: 30px 0 42px; }
  .tpmx-hero__art { padding-bottom: 0; }
  .tpmx-card { margin-right: 0; padding: 26px 18px 20px; }
  .tpmx-card__tab { left: 16px; }
  .tpmx-card__h { font-size: 17px; }
  .tpmx-bars__k { flex-basis: 60px; font-size: 12.5px; }
  /* 浮卡改为跟卡片的下一块，避免压住流程 */
  .tpmx-vf { position: static; width: 100%; max-width: none; margin-top: 14px; }
  /* 手机上一行三项会挤，退回单列 */
  .tpmx-vf ul { grid-template-columns: 1fr; gap: 11px; }
  /* 手机上一行三项会挤，退回单列 */
  .tpmx-vf ul { grid-template-columns: 1fr; gap: 11px; }
  .tpmx-art-note { position: static; display: block; margin-top: 12px; text-align: right; }
}
