/* ============================================================
   ChatBen 正文富文本样式（.cb-rich）
   用于工具介绍、关于我们、新闻/案例/产品详情的正文区，
   让后台录入的 p / h2 / h3 / ul / ol / strong / code / pre /
   table / blockquote / a / img 等标签与站点风格一致。
   ============================================================ */

  /* 工具介绍正文：富文本标签排版（p / h2 / h3 / ul / ol / strong / code / pre / table / blockquote / a / img） */
  .cb-rich{max-width:880px;color:#475569;font-size:.95rem;line-height:1.9;word-break:break-word;}
  /* 工具页：外层容器已限宽（.container + 32px 内边距），正文跟随容器满宽，避免桌面端在 880px 处提前断行 */
  .tool-page .cb-rich{max-width:none;}
  .cb-rich > *:first-child{margin-top:0;}
  .cb-rich > *:last-child{margin-bottom:0;}
  .cb-rich > p:first-child{font-size:1rem;color:#334155;}
  .cb-rich p{margin:0 0 14px;}
  .cb-rich h2,.cb-rich h3,.cb-rich h4{color:#0f172a;font-weight:700;line-height:1.45;letter-spacing:-.2px;}
  .cb-rich h2{position:relative;font-size:1.38rem;margin:34px 0 18px;padding-left:15px;}
  .cb-rich h2::before{content:"";position:absolute;left:0;top:.18em;bottom:.18em;width:4px;border-radius:4px;background:linear-gradient(180deg,#2563eb,#60a5fa);}
  .cb-rich h3{position:relative;font-size:1.1rem;margin:28px 0 14px;padding:0 0 9px 19px;border-bottom:1px solid #eef2f7;}
  .cb-rich h3::before{content:"";position:absolute;left:0;top:.42em;width:8px;height:8px;border-radius:3px;background:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1);}
  .cb-rich h4{font-size:.98rem;margin:20px 0 10px;color:#1e293b;}
  .cb-rich h2 + p,.cb-rich h3 + p,.cb-rich h4 + p{margin-top:0;}
  .cb-rich ul,.cb-rich ol{margin:14px 0 16px;padding:0;list-style:none;}
  .cb-rich li{position:relative;margin-bottom:10px;padding-left:22px;}
  .cb-rich li:last-child{margin-bottom:0;}
  .cb-rich ul > li::before{content:"";position:absolute;left:5px;top:.75em;width:6px;height:6px;border-radius:50%;background:#bfdbfe;}
  .cb-rich ol{counter-reset:ti-ol;}
  .cb-rich ol > li{counter-increment:ti-ol;padding-left:28px;}
  .cb-rich ol > li::before{content:counter(ti-ol);position:absolute;left:0;top:.24em;width:19px;height:19px;line-height:19px;text-align:center;font-size:.72rem;font-weight:700;color:#2563eb;background:#eff6ff;border:1px solid #dbeafe;border-radius:6px;}
  .cb-rich li > ul,.cb-rich li > ol{margin:9px 0 0;}
  .cb-rich li p{margin:0 0 6px;}
  .cb-rich strong,.cb-rich b{color:#0f172a;font-weight:600;}
  .cb-rich li > strong:first-child,.cb-rich li > b:first-child{color:#1d4ed8;}
  .cb-rich code,.cb-rich kbd{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.86em;color:#0f172a;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:6px;padding:1px 6px;-webkit-box-decoration-break:clone;box-decoration-break:clone;}
  .cb-rich kbd{border-bottom-width:2px;font-weight:600;}
  .cb-rich pre{margin:0 0 16px;padding:14px 16px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;overflow:auto;line-height:1.65;}
  .cb-rich pre code{background:none;border:0;border-radius:0;padding:0;font-size:.86rem;color:#0f172a;white-space:pre;}
  .cb-rich blockquote{margin:0 0 16px;padding:12px 16px;background:#f8fbff;border-left:3px solid #93c5fd;border-radius:0 10px 10px 0;color:#475569;}
  .cb-rich blockquote p:last-child{margin-bottom:0;}
  .cb-rich table{width:100%;border-collapse:collapse;margin:0 0 18px;font-size:.88rem;}
  .cb-rich th,.cb-rich td{border:1px solid #e2e8f0;padding:9px 12px;text-align:left;vertical-align:top;}
  .cb-rich th{background:#f8fafc;color:#334155;font-weight:600;white-space:nowrap;}
  .cb-rich tbody tr:nth-child(even){background:#fcfdff;}
  .cb-rich a{color:#2563eb;text-decoration:none;border-bottom:1px solid rgba(37,99,235,.28);transition:color .15s ease,border-color .15s ease;}
  .cb-rich a:hover{color:#1d4ed8;border-bottom-color:#1d4ed8;}
  .cb-rich img{max-width:100%;height:auto;border-radius:10px;border:1px solid #eef2f7;}
  .cb-rich hr{border:0;height:1px;background:#eef2f7;margin:26px 0;}
  .cb-rich figure{margin:0 0 16px;}
  .cb-rich figcaption{font-size:.82rem;color:#94a3b8;text-align:center;margin-top:6px;}

/* ---------- 文章底部：相关工具卡片（后台「关联工具」写入 ext_tool） ---------- */
.cb-toolcard {
    margin: 36px 0 8px;
    padding: 20px 22px 22px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 46%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.cb-tc-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
}

.cb-tc-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .25);
}

.cb-tc-titles {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.cb-tc-titles strong {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.cb-tc-titles em {
    font-style: normal;
    font-size: .8rem;
    color: #94a3b8;
}

.cb-tc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cb-tc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e6eefa;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cb-tc-item:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 26px rgba(37, 99, 235, .12);
}

.cb-tc-ico {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--tc, #2563eb);
    background: var(--tcbg, #eff6ff);
}

.cb-tc-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cb-tc-name {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

.cb-tc-desc {
    font-size: .84rem;
    line-height: 1.6;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cb-tc-tag {
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .72rem;
    white-space: nowrap;
}

.cb-tc-go {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
    transition: background .2s ease, box-shadow .2s ease;
}

.cb-tc-item:hover .cb-tc-go {
    background: #1d4ed8;
    box-shadow: 0 8px 20px rgba(29, 78, 216, .3);
}

.cb-tc-go i {
    transition: transform .2s ease;
}

.cb-tc-item:hover .cb-tc-go i {
    transform: translateX(3px);
}

/* ---------- 移动端 ---------- */
@media (max-width: 767.98px) {
    .cb-toolcard {
        margin: 26px 0 6px;
        padding: 16px 14px;
        border-radius: 16px;
    }

    .cb-tc-head {
        margin-bottom: 12px;
    }

    .cb-tc-badge {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: .92rem;
    }

    .cb-tc-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
        border-radius: 12px;
    }

    .cb-tc-ico {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border-radius: 11px;
        font-size: 1.1rem;
    }

    .cb-tc-main {
        flex: 1 1 calc(100% - 54px);
    }

    .cb-tc-name {
        font-size: .96rem;
    }

    .cb-tc-tag {
        display: none;
    }

    .cb-tc-go {
        flex: 1 1 100%;
        justify-content: center;
        padding: 9px 14px;
    }
}

/* ---------- 移动端 ---------- */
@media (max-width: 767.98px) {
    .cb-rich{max-width:none;font-size:.92rem;line-height:1.85;}
    .cb-rich > p:first-child{font-size:.95rem;}
    .cb-rich h2{font-size:1.18rem;margin:26px 0 14px;padding-left:13px;}
    .cb-rich h3{font-size:1.02rem;margin:22px 0 12px;padding:0 0 8px 17px;}
    .cb-rich pre{padding:12px;font-size:.8rem;}
    .cb-rich th,.cb-rich td{padding:7px 9px;}
    .cb-rich table{display:block;overflow-x:auto;}
}
