/* ==========================================================================
   商秘库 · 移动端紧凑层  mobile-slim.css  v1.52.55-mobifold r3 (2026-10-14)
   作用域：仅 @media (max-width:860px) 生效 —— 桌面/平板版不受任何影响。
   手法：①纵向节奏压缩 ②同类卡片并排 ③长板块「标题行折叠」（可展开，内容不删）
   v1.52.55 重做折叠机制（用户指令：折叠后「要么只看到标题，要么内容可以看到」，
   不允许出现内容被压半截的杂乱感）：
     ① 折叠态 = 除折叠头(.ms-head)外整体隐藏——不用 max-height 裁剪、
        不用渐变遮罩、不用 -webkit-line-clamp 限行，任何情况下不出现半截内容；
     ② 旧版「正文限 2-3 行」与「未展开隐藏段落但保留其余内容被 max-height 裁切」
        两套机制删除——它们正是「内容被压了部分」观感的根因。
   红线：法律边界声明(.notice)、服务方与合作机构表述、页脚备案、价格卡与价格口径
        说明一律不折叠、不减字；协议与隐私页不适用本层。
   ========================================================================== */

/* ---------- 折叠控件的非手机端保护（非手机端一律不出现） ---------- */
.ms-more, .ms-fade, .ms-head { display: none; }

@media (max-width: 860px) {

  /* ================= 1. 纵向节奏：全局压缩 ================= */
  html, body { font-size: 14px; }
  body { line-height: 1.62; }

  .container, .wrap, main.wrap, .page, .inner { padding-left: 14px !important; padding-right: 14px !important; }

  section, .sec, .band, .fg-band, .pub-banner, .trust-band {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
  }

  .card, .p-card, .pkg-card, .ps-card, .case-card, .fg-cell, .step2, .ev-layer {
    padding: 12px 13px !important;
    border-radius: 12px !important;
  }

  h1 { font-size: 23px !important; line-height: 1.28 !important; }
  h2, .sec-head h2 { font-size: 18px !important; line-height: 1.3 !important; margin-bottom: 4px !important; }
  h3 { font-size: 15px !important; }
  p, li { font-size: 13px !important; }
  .muted, .small, small { font-size: 12px !important; }

  /* 标题块（sec-head）统一瘦身：手机端省掉一行说明（下方内容已表达同义） */
  .sec-head { margin: 0 0 8px !important; padding: 0 !important; }
  .sec-head p, .sec-head .sub, .sec-head .desc { display: none !important; }
  .sec-head h2, .sec-head h3 { margin: 0 !important; }

  /* 合规文本不折叠：法律边界声明、服务方与价格口径一律完整展示，仅缩小字号 */
  .notice { font-size: 11.5px !important; line-height: 1.55 !important; padding: 10px 12px !important; }
  .notice * { font-size: 11.5px !important; line-height: 1.55 !important; }
  .trust-band > *, .trust-band li { font-size: 12px !important; }

  /* 通用间距收敛 */
  .grid, .grid2, .grid3, .cols, .row, .flex { gap: 8px !important; }
  .card + .card, .sec + .sec { margin-top: 8px !important; }

  /* 装饰性元素在手机上直接省掉（不承载信息） */
  .hero2-float, .hero2-illust, .ib-sea, .ib,
  .howto-progress, .gap, .deco, .blob, .orb, .wave { display: none !important; }

  /* 表格统一改为可横向滚动容器，避免撑破 */
  table { font-size: 12px !important; }
  .tbl-inner, .tbl-wrap, .table-wrap, .tablescroll { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

  /* ================= 2. 首屏（hero2）压缩 ================= */
  .hero2 { padding: 16px 14px 18px !important; margin-bottom: 12px !important; }
  .hero2-inner { padding: 0 !important; }
  .hero2-inner h1, .hero2 h1 { font-size: 24px !important; }
  .hero2-left { width: 100% !important; max-width: 100% !important; }
  .hero2-stats {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 8px !important; margin-top: 12px !important;
  }
  .hero2-stats > * { padding: 8px 10px !important; border-radius: 10px !important; }

  /* ================= 3. 同类卡片并排（2 列） ================= */
  .fg-grid, .pkg-grid, .plans-strip, .case-grid, .steps2, .grid2, .grid3,
  .dim-grid, .price-grid, .fx-catgrid, .news-list, .pb-grid, .ev-layers {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  /* 三卡组在手机上取「2+1」，最后一张跨列铺满，避免出现半空行 */
  .pkg-grid > :last-child:nth-child(odd),
  .plans-strip > :last-child:nth-child(odd),
  .steps2 > :last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* 单列强制：正文型长文块不做并排 */
  .card.pain, .card.solution, .notice, .ev-layer { grid-column: auto; }

  /* 卡片内的说明文字进一步收敛（仅手机端） */
  .fg-cell p, .pkg-card p, .ps-card p, .case-card p, .step2 p { font-size: 12px !important; }
  .fg-cell ul, .pkg-card ul { padding-left: 14px !important; }
  .fg-cell li, .pkg-card li { font-size: 12px !important; margin-top: 2px !important; }

  /* 卡片里的「大数字/图标」缩小，但保证可读 */
  .fg-cell .ico, .pkg-card .ico, .case-card .ico { font-size: 20px !important; }
  .stat .v, .ps-card .price, .pkg-card .price { font-size: 19px !important; }

  /* 案例卡：全部保留（不隐藏任何一张） */

  /* 步骤条：5 步 → 2 列小卡 */
  .step2 { border-radius: 10px !important; }

  /* ================= 4. 折叠块：标题行折叠（v1.52.55-mobifold 重做） =================
     用户指令：折叠后「要么只看到标题，要么内容可以看到」，不允许内容被压半截。
     实现：折叠头(.ms-head)由 mobile-slim.js 插入为块内第一个子元素；
     折叠态 = 除折叠头外整体隐藏（display:none，零裁剪、零遮罩）；
     展开态 = 内容全部还原（不写任何 display，恢复元素原值），一字不删。 */
  .ms-fold:not(.ms-fold-open) > *:not(.ms-head) { display: none !important; }
  /* 折叠块若本身是 grid/flex 的子项（如 faq 每日问答 1fr 单列），
     必须清零其自动最小宽度，否则标题 nowrap 的 min-content 会把轨道撑到超出视口 */
  .ms-fold { min-width: 0; max-width: 100%; }
  .ms-fold > .ms-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-width: 0; max-width: 100%;
    grid-column: 1 / -1;              /* 折叠块本身是 grid 容器时占满整行 */
    width: 100%; box-sizing: border-box; text-align: left;
    /* 注意：不写 flex 简写——折叠块若是 column 方向的 flex 容器（如 faq 每日问答卡），
       flex-basis:100% 会按主轴(纵向)把头部撑到容器高度；全宽由 width:100% 保证 */
    font: 700 13px/1.45 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #16283f; background: #f2f6fc; border: 1px solid #d9e3f2; border-radius: 10px;
    padding: 9px 12px; margin: 0; cursor: pointer;
  }
  .ms-fold > .ms-head .ms-head-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ms-fold > .ms-head .ms-head-x { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #1f3a8a; white-space: nowrap; }
  .ms-fold > .ms-head:active { background: #e7eefb; }
  .ms-fold.ms-fold-open > .ms-head { margin-bottom: 10px; }

  /* ================= 6. 首页专属：横幅/背书带/页脚 三处并排瘦身 ================= */
  /* 公共法律服务横幅：2 列并排 + 瘦身（价格与权益口径完整保留，仅缩小字号） */
  .pub-banner { padding: 14px 13px !important; }
  .pub-banner .pb-inner { gap: 8px !important; }
  .pub-banner .pb-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  .pub-banner .pb-title, .pub-banner h2 { font-size: 16px !important; }
  .pub-banner .pb-sub { font-size: 12px !important; }
  .pub-banner .pb-note { font-size: 11.5px !important; line-height: 1.5 !important; margin-top: 8px !important; }

  /* 信任背书带（含合作机构表述）：改单行横滑，三行高度压成一行 */
  .trust-band {
    display: flex !important; flex-wrap: nowrap !important;
    overflow-x: auto !important; -webkit-overflow-scrolling: touch;
    gap: 8px !important; padding: 10px 12px !important;
  }
  .trust-band > *, .trust-band > * > * { flex: 0 0 auto !important; white-space: nowrap !important; font-size: 12px !important; }

  /* 价格口径说明行（不折叠，全文常显） */
  .strip-note { font-size: 11.5px !important; line-height: 1.5 !important; margin: 6px 0 !important; }
  .strip-cta { padding: 10px 12px !important; font-size: 12.5px !important; }

  /* 页脚：两列链接 + 紧凑 */
  footer { padding: 14px 13px !important; }
  footer .fl-links { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 4px 12px !important; }
  footer .fl-links a, footer .fl-links * { font-size: 12px !important; }
  footer .wxq-mini { display: flex !important; align-items: center; gap: 8px !important; margin-bottom: 8px !important; }
  footer .wxq-mini img { max-width: 52px !important; }
  footer p, footer .fl-note { font-size: 11px !important; line-height: 1.5 !important; }

  /* 标题再压一档：每个 sec-head 都省下约 15px × 6 处 */
  .sec-head h2, .sec-head h3 { font-size: 16.5px !important; }

  /* ================= 5. 页脚与浮动件紧凑 ================= */
  footer { padding: 16px 14px !important; }
  footer .fl-links { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px !important; }
  footer .wxq-mini { margin-bottom: 10px !important; }
}

/* 极大屏与打印不受影响（本层无桌面规则） */
