/* templateicl4 / C 卡片网格仪表盘式 / build 2026-09-09 cl4-v1
 * 参考 sportzfyapp.to UI 基因（原创化 token）：
 *   Kadence Chakra Blue #2B6CB0 系 · 深蓝 Hero #0c1624 · Inter+Space Grotesk
 *   按钮 #2B6CB0 实心 3px 圆角 SVG 图标居左全宽 · H2 纯加粗无装饰
 *   FAQ Kadence accordion 全收起 1px 灰边箭头右侧 · 斑马纹信息表
 *   图片 11px 圆角 · Hero 图标蓝光晕 · 无 TOC / 无返回顶部
 * C 骨架：JS 运行时将连续 h3+p 对重组为卡片网格（.cl4-grid），
 *   其余长文段落保持全宽；卡片白底 3px 圆角蓝色顶边线
 * 应用 icl1~icl3 全部教训：
 *   组件选择器一律 .cl4-body 前缀防 0-1-1 覆盖
 *   手机端左右边距 24px · 正文原生 details 全套样式 + initDetails 单开
 *   快照先行 · 顺序即依赖 cards→faq→details→menu
 */

:root {
    --cl4-blue: #2B6CB0;
    --cl4-blue-deep: #215387;
    --cl4-blue-soft: #e8f0fa;
    --cl4-hero-bg: #0c1624;
    --cl4-hero-text: #f0f4f8;
    --cl4-ink: #1A202C;
    --cl4-ink-mid: #2D3748;
    --cl4-ink-soft: #4A5568;
    --cl4-muted: #6c7889;
    --cl4-canvas: #F7FAFC;
    --cl4-alt: #EDF2F7;
    --cl4-line: #E2E8F0;
    --cl4-white: #ffffff;
    --cl4-link: #2B6CB0;
    --cl4-green: #13612e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

.cl4-body {
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--cl4-ink);
    background: var(--cl4-canvas);
}

img { max-width: 100%; height: auto; }
p:empty { display: none; }

/* ---------- 通用内衬 ---------- */
.cl4-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
.cl4-header {
    background: var(--cl4-white);
    border-bottom: 1px solid var(--cl4-line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.cl4-header .cl4-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    flex-wrap: wrap;
}

.cl4-brand { display: flex; align-items: center; }

.cl4-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.cl4-body .cl4-brand__link { color: var(--cl4-ink); }

.cl4-brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    object-fit: cover;
}

.cl4-brand__name {
    font-weight: 700;
    font-size: 19px;
    color: var(--cl4-blue);
}

.cl4-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.cl4-body .cl4-nav__link {
    display: inline-block;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--cl4-ink-mid);
    text-decoration: none;
    border-radius: 3px;
}

.cl4-body .cl4-nav__link:hover {
    color: var(--cl4-blue);
    background: var(--cl4-blue-soft);
}

.cl4-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--cl4-line);
    border-radius: 3px;
    font-size: 20px;
    line-height: 1;
    padding: 6px 10px;
    color: var(--cl4-ink);
    cursor: pointer;
}

/* ---------- Hero 通用 ---------- */
.cl4-hero {
    background: var(--cl4-hero-bg);
    color: var(--cl4-hero-text);
    padding: 48px 0 40px;
}

/* 首页 Hero 两列网格（图标 1fr + 文字 2fr ≈ left-golden） */
.cl4-hero__grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 28px;
}

.cl4-hero__media {
    display: flex;
    justify-content: center;
}

.cl4-hero__icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 0 30px rgba(43, 108, 176, 0.4);
}

.cl4-hero__title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cl4-white);
    margin-bottom: 12px;
}

.cl4-hero__desc {
    font-size: 16px;
    color: var(--cl4-hero-text);
    opacity: 0.85;
}

/* 下载页 Hero：单列居中 */
.cl4-hero--special { text-align: center; }

.cl4-hero--special .cl4-hero__title {
    max-width: 680px;
    margin: 0 auto 12px;
}

.cl4-hero--special .cl4-hero__desc {
    max-width: 600px;
    margin: 0 auto 20px;
}

/* 统计条 4 列 grid（手机端 2 列） */
.cl4-stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.cl4-stats__item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.cl4-stats__val {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--cl4-white);
}

.cl4-stats__lbl {
    display: block;
    font-size: 12px;
    color: var(--cl4-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* 下载页勾选要点列表 */
.cl4-checks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}

.cl4-checks li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--cl4-hero-text);
}

.cl4-checks svg {
    color: var(--cl4-green);
    flex-shrink: 0;
}

/* 下载按钮（3px 圆角实心 + SVG 图标居左 + 全宽） */
.cl4-body .cl4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--cl4-blue);
    color: var(--cl4-white);
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.cl4-body .cl4-btn:hover {
    background: var(--cl4-blue-deep);
    color: var(--cl4-white);
}

.cl4-btn--full { width: 100%; }

.cl4-btn svg { flex-shrink: 0; }

/* 信任徽章行（3 枚原创盾牌+勾） */
.cl4-badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 28px;
    margin-top: 20px;
}

.cl4-badges__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}

.cl4-badges__item svg { color: rgba(255, 255, 255, 0.4); }

/* ---------- App 信息表（斑马纹） ---------- */
.cl4-apptable {
    background: var(--cl4-white);
    border-bottom: 1px solid var(--cl4-line);
    padding: 32px 0;
}

.cl4-apptable__table {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border-collapse: collapse;
    font-size: 15px;
}

.cl4-apptable__table tr:nth-child(even) { background: var(--cl4-alt); }

.cl4-apptable__table th,
.cl4-apptable__table td {
    padding: 10px 16px;
    text-align: center;
    border-bottom: 1px solid var(--cl4-line);
}

.cl4-apptable__table th {
    font-weight: 600;
    color: var(--cl4-blue);
    width: 40%;
}

/* ---------- Main / Article ---------- */
.cl4-main {
    padding: 0;
}

.cl4-article {
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* H2：纯加粗无装饰（参考站实测） */
.cl4-article h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--cl4-ink);
    margin: 48px 0 16px;
    line-height: 1.35;
}

.cl4-article h2:first-child { margin-top: 0; }

/* H3：纯加粗 */
.cl4-article h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--cl4-ink-mid);
    margin: 28px 0 10px;
    line-height: 1.4;
}

.cl4-article h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--cl4-ink-mid);
    margin: 22px 0 8px;
}

.cl4-article p { margin: 0 0 16px; }
.cl4-article h2 + p, .cl4-article h3 + p { margin-top: 0; }

.cl4-article ul, .cl4-article ol { margin: 0 0 16px 26px; }
.cl4-article li { margin-bottom: 6px; }
.cl4-article strong { color: var(--cl4-ink); }

.cl4-body .cl4-article a {
    color: var(--cl4-link);
    text-decoration: underline;
}

.cl4-body .cl4-article a:hover { color: var(--cl4-blue-deep); }

/* 正文表格（通用斑马纹） */
.cl4-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
    font-size: 15px;
    background: var(--cl4-white);
    border-radius: 8px;
    overflow: hidden;
}

.cl4-article th, .cl4-article td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--cl4-line);
}

.cl4-article th {
    font-weight: 600;
    color: var(--cl4-blue);
    background: var(--cl4-alt);
}

.cl4-article tr:nth-child(even) td { background: var(--cl4-alt); }

/* 正文图片（11px 圆角，对齐参考站 Kadence img 基因） */
.cl4-figure {
    margin: 0 0 20px;
    text-align: center;
}

.cl4-figure img {
    border-radius: 11px;
    max-width: 100%;
    height: auto;
}

/* 正文原生 details 全套样式 */
.cl4-article details {
    border: 1px solid var(--cl4-line);
    border-radius: 8px;
    margin: 0 0 12px;
    background: var(--cl4-white);
}

.cl4-article details > summary {
    cursor: pointer;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 16px;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cl4-article details > summary::-webkit-details-marker { display: none; }

.cl4-article details > summary::after {
    content: '\203A';
    font-size: 20px;
    font-weight: 700;
    color: var(--cl4-muted);
    transition: transform 0.2s ease;
}

.cl4-article details[open] > summary::after { transform: rotate(90deg); }
.cl4-article details[open] > summary { border-bottom: 1px solid var(--cl4-line); }

.cl4-article details > *:not(summary) { padding: 0 18px; }
.cl4-article details > p:last-child { padding-bottom: 14px; }

/* 锚点跳转预留间距 */
.cl4-article h2[id], .cl4-article h3[id] { scroll-margin-top: 70px; }

/* ---------- C 骨架：卡片网格（JS initCards 重组） ---------- */
.cl4-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.cl4-grid__item {
    background: var(--cl4-white);
    border-radius: 3px;
    border-top: 3px solid var(--cl4-blue);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cl4-grid__item h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--cl4-ink);
    margin: 0 0 8px;
    line-height: 1.4;
}

.cl4-grid__item p {
    font-size: 15px;
    color: var(--cl4-ink-soft);
    margin: 0;
    line-height: 1.6;
}

/* ---------- FAQ 手风琴（JS initFaq 重组，参考站 Kadence accordion） ---------- */
.cl4-faq {
    margin: 24px 0;
}

.cl4-faq__item {
    border: 1px solid var(--cl4-line);
    border-radius: 3px;
    margin-bottom: -1px;
    overflow: hidden;
}

.cl4-faq__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--cl4-ink-mid);
    text-align: left;
    transition: background 0.15s ease;
}

.cl4-faq__head:hover { background: var(--cl4-alt); }

.cl4-faq__arrow {
    font-size: 13px;
    color: var(--cl4-muted);
    flex-shrink: 0;
    margin-left: 12px;
    transition: transform 0.2s ease;
}

.cl4-faq__item--open .cl4-faq__head {
    background: var(--cl4-ink-soft);
    color: var(--cl4-white);
}

.cl4-faq__item--open .cl4-faq__arrow { transform: rotate(90deg); color: var(--cl4-white); }

.cl4-faq__body {
    display: none;
    padding: 14px 18px;
    background: var(--cl4-white);
}

.cl4-faq__item--open .cl4-faq__body { display: block; }

.cl4-faq__body p { margin: 0; font-size: 15px; color: var(--cl4-ink-soft); line-height: 1.7; }

/* ---------- Footer ---------- */
.cl4-footer {
    background: var(--cl4-alt);
    border-top: 1px solid var(--cl4-line);
    padding: 28px 0;
    text-align: center;
    font-size: 14px;
    color: var(--cl4-muted);
}

.cl4-body .cl4-footer__brand {
    color: var(--cl4-blue);
    font-weight: 600;
    text-decoration: none;
}

.cl4-body .cl4-footer__brand:hover { text-decoration: underline; }

.cl4-footer__links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
}

.cl4-body .cl4-footer__links a {
    color: var(--cl4-muted);
    text-decoration: none;
}

.cl4-body .cl4-footer__links a:hover { color: var(--cl4-blue); }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
    .cl4-menu-toggle { display: inline-block; }

    .cl4-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 2px;
        padding: 6px 0 10px;
    }

    .cl4-nav--open { display: flex; }
    .cl4-body .cl4-nav__link { display: block; padding: 10px 12px; }

    .cl4-hero { padding: 36px 0 32px; }

    .cl4-hero__grid {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }

    .cl4-hero__title { font-size: 24px; }
    .cl4-hero__icon { width: 72px; height: 72px; }

    .cl4-stats { grid-template-columns: repeat(2, 1fr); }

    .cl4-article { padding: 24px; }
    .cl4-article h2 { font-size: 22px; margin: 36px 0 12px; }
    .cl4-article h3 { font-size: 18px; }

    .cl4-grid { grid-template-columns: 1fr; }

    .cl4-inner { padding-left: 24px; padding-right: 24px; }
}
