/* H5 移动端 — 微信公众号风格 */
:root {
    --wx-green: #07c160;
    --wx-green-dark: #06ad56;
    --primary: #1e3a5f;
    --primary-light: #576b95;
    --accent: #fa9d3b;
    --bg: #ededed;
    --card: #ffffff;
    --text: #191919;
    --text-secondary: #888888;
    --text-muted: #b2b2b2;
    --border: #e5e5e5;
    --pipp: #576b95;
    --pipca: #7c3aed;
    --pipa: #07c160;
    --criminal: #e54d42;
    --penalty: #fa9d3b;
    --radius: 8px;
    --menu-h: 50px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.h5-body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    padding-bottom: calc(var(--menu-h) + var(--safe-bottom));
    -webkit-tap-highlight-color: transparent;
}

/* 有底部 CTA 时仅保留菜单栏高度留白（CTA 随文档流置于页面底部） */
body.h5-body:has(.fixed-cta) {
    padding-bottom: calc(var(--menu-h) + var(--safe-bottom));
}

/* 顶部 — 仿公众号资料页 */
.h5-header {
    background: var(--card);
    color: var(--text);
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.h5-brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.3;
}
.h5-logo {
    height: 40px; width: auto; display: block; border-radius: 4px;
}
.h5-tagline { font-size: 13px; color: var(--text-secondary); margin-top: 4px; padding-left: 50px; }

.h5-main { max-width: 640px; margin: 0 auto; }

/* 图文消息块 */
.wx-article-block {
    background: var(--card);
    padding: 20px 16px;
    margin-bottom: 10px;
}
.wx-article-block + .wx-article-block { margin-top: 0; }

.hero-banner {
    background: var(--card);
    padding: 24px 16px;
    margin-bottom: 10px;
    text-align: center;
}
.hero-banner h1 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.hero-banner p { font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }
.hero-hint {
    margin-top: 14px;
    margin-bottom: 0;
    font-size: 12px;
    color: var(--text-muted, var(--text-secondary));
    line-height: 1.5;
}
.hero-hint a { color: var(--primary, #1a6fb5); text-decoration: none; }
.hero-hint a:active { opacity: 0.8; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: 6px; font-size: 15px; font-weight: 500;
    text-decoration: none; border: none; cursor: pointer;
}
.btn-primary { background: var(--wx-green); color: #fff; }
.btn-outline { background: var(--card); color: var(--wx-green); border: 1px solid var(--wx-green); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.6; }

.section { background: var(--card); padding: 16px; margin-bottom: 10px; }
.section-title {
    font-size: 16px; font-weight: 600; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px; color: var(--text);
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.section-more { display: block; text-align: center; color: var(--primary-light); text-decoration: none; font-size: 14px; margin-top: 12px; }

.cert-cards { display: flex; flex-direction: column; gap: 0; }
.cert-card {
    display: block; padding: 14px 0; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border);
}
.cert-card:last-child { border-bottom: none; }
.cert-code { font-weight: 600; font-size: 15px; display: block; color: var(--primary-light); }
.cert-name { font-size: 14px; color: var(--text); margin-top: 2px; }
.cert-tag { font-size: 12px; color: var(--text-secondary); }

.cert-card-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cert-card-row > div { flex: 1; min-width: 0; }
.cert-card-row > div p {
    font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-top: 4px;
}
.cert-card-row .cert-code { flex-shrink: 0; margin-top: 2px; }
.cert-card-row i { flex-shrink: 0; margin-left: auto; margin-top: 6px; color: var(--text-muted); font-size: 12px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 500; color: #fff; }
.badge-pipp { background: var(--pipp); }
.badge-pipca { background: var(--pipca); }
.badge-pipa { background: var(--pipa); }
.badge-criminal, .badge-category-criminal { background: var(--criminal); }
.badge-penalty, .badge-category-penalty { background: var(--penalty); }
.badge-training, .badge-category-training { background: var(--primary-light); }
.badge-刑法, .badge-个保法 { background: #888; }

.schedule-item, .article-item, .case-card {
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.schedule-item:last-child, .article-item:last-child, .case-card:last-child { border-bottom: none; }
.article-item, .case-card { display: block; text-decoration: none; color: var(--text); }
.article-cat { font-size: 12px; color: var(--text-secondary); }
.article-item h3, .case-card h3 { font-size: 16px; font-weight: 500; margin: 6px 0 4px; line-height: 1.4; }
.article-item p, .case-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.link-action { color: var(--primary-light); font-size: 14px; text-decoration: none; }

.page-hero { background: var(--card); padding: 20px 16px; margin-bottom: 10px; text-align: center; }
.page-hero h1 { font-size: 18px; font-weight: 600; color: var(--text); }
.page-hero p { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

.pyramid { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pyramid-level {
    width: 100%; text-align: center; padding: 14px; border-radius: var(--radius);
    color: #fff; font-size: 14px;
}
.pyramid-level small { display: block; opacity: 0.9; font-size: 12px; margin-top: 4px; }
.level-pipa { background: var(--pipa); max-width: 70%; }
.level-pipca { background: var(--pipca); max-width: 85%; }
.level-pipp { background: var(--pipp); }

.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th, .compare-table td { padding: 10px 8px; border: 1px solid var(--border); text-align: center; }
.compare-table th { background: #f7f7f7; font-weight: 600; }
.compare-table td:first-child { font-weight: 500; text-align: left; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
    padding: 6px 14px; border-radius: 4px; font-size: 13px;
    background: #f7f7f7; color: var(--text-secondary); text-decoration: none;
}
.filter-chip.active { background: var(--wx-green); color: #fff; }
.filter-chip.chip-hot.active { background: var(--criminal); }
.filter-sub { margin-top: 8px; }

.form-card { padding: 4px 0; }
.form-field { display: block; margin-bottom: 16px; }
.form-field span { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.form-field em { color: var(--criminal); }
.form-field input, .form-field select, .form-field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 4px; font-size: 16px; font-family: inherit; background: #fafafa;
}
.cert-checkboxes { display: flex; flex-direction: column; gap: 10px; }
.checkbox-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 4px; background: #fafafa;
    font-size: 15px; cursor: pointer;
}
.checkbox-item input { width: auto; margin: 0; }
.form-error { color: var(--criminal); font-size: 13px; margin-bottom: 10px; }
.hidden { display: none !important; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-item { background: #f7f7f7; padding: 12px; border-radius: var(--radius); }
.info-item label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.highlight-list { list-style: none; }
.highlight-list li { padding: 8px 0; font-size: 15px; border-bottom: 1px solid var(--border); }
.highlight-list i { color: var(--wx-green); margin-right: 8px; }
.module-list { display: flex; flex-direction: column; gap: 0; }
.module-item { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.module-item:last-child { border-bottom: none; }

.cert-intro { font-size: 15px; line-height: 1.7; color: var(--text-secondary); }
.section-hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.feature-list { display: flex; flex-direction: column; gap: 12px; }
.feature-item { background: #f7f7f7; padding: 12px; border-radius: var(--radius); }
.feature-item strong { display: block; margin-bottom: 4px; font-size: 15px; }
.feature-item p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.curriculum-day { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.curriculum-day:last-child { border-bottom: none; }
.curriculum-day h3 { font-size: 16px; margin-bottom: 8px; color: var(--pipp); }
.curriculum-subtitle { font-size: 13px; color: var(--text-secondary); margin: -4px 0 8px; }
.curriculum-slot { margin-bottom: 8px; }
.curriculum-slot label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.curriculum-slot ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }

.fixed-cta {
    padding: 10px 16px; background: var(--card);
    border-top: 1px solid var(--border); margin-top: 10px;
}

/* ── 公众号底部菜单栏 ── */
.wx-menu-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; height: calc(var(--menu-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: #f7f7f7;
    border-top: 1px solid var(--border);
    z-index: 200; max-width: 640px; margin: 0 auto;
}
.wx-menu-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; background: none; border: none; font-size: 11px; color: var(--text-secondary);
    cursor: pointer; padding: 6px 0; transition: color 0.15s;
}
.wx-menu-btn i { font-size: 20px; }
.wx-menu-btn.active, .wx-menu-btn:active { color: var(--wx-green); }

.wx-menu-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 300; opacity: 0; transition: opacity 0.25s;
}
.wx-menu-mask.show { opacity: 1; }

.wx-menu-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #f7f7f7;
    border-radius: 12px 12px 0 0;
    z-index: 400; max-width: 640px; margin: 0 auto;
    transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.36, 0.66, 0.04, 1);
    padding-bottom: var(--safe-bottom);
}
.wx-menu-sheet.show { transform: translateY(0); }

.wx-menu-sheet-header {
    display: flex; align-items: center; justify-content: center;
    padding: 14px 16px; position: relative;
    font-size: 15px; font-weight: 600; color: var(--text);
    background: var(--card); border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--border);
}
.wx-menu-close {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; font-size: 18px; color: var(--text-secondary); padding: 8px;
}

.wx-menu-sheet-body { padding: 8px 12px; max-height: 55vh; overflow-y: auto; }

.wx-menu-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--card); border-radius: var(--radius);
    padding: 14px 16px; margin-bottom: 8px;
    text-decoration: none; color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.wx-menu-item:active { background: #f0f0f0; }
.wx-menu-item-icon {
    width: 40px; height: 40px; border-radius: 8px;
    background: #f0f0f0; color: var(--wx-green);
    display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.wx-menu-item.hot .wx-menu-item-icon { background: #fdecea; color: var(--criminal); }
.wx-menu-item-text { flex: 1; min-width: 0; }
.wx-menu-item-text strong { display: block; font-size: 16px; font-weight: 500; }
.wx-menu-item-text small { font-size: 12px; color: var(--text-secondary); }
.wx-menu-item-tag {
    font-size: 11px; color: #fff; background: var(--criminal);
    padding: 2px 6px; border-radius: 3px; flex-shrink: 0;
}
.wx-menu-item-arrow { color: var(--text-muted); font-size: 12px; }

.wx-menu-cancel {
    display: block; width: calc(100% - 24px); margin: 4px 12px 12px;
    padding: 14px; background: var(--card); border: none; border-radius: var(--radius);
    font-size: 16px; color: var(--text); cursor: pointer;
}

.quick-links { display: flex; flex-direction: column; gap: 0; }
.quick-link {
    display: flex; align-items: center; gap: 12px; padding: 14px 0;
    border-bottom: 1px solid var(--border); text-decoration: none;
    color: var(--text); font-size: 15px;
}
.quick-link:last-child { border-bottom: none; }
.quick-link i { color: var(--wx-green); width: 20px; text-align: center; }

.download-card { text-align: center; padding: 20px 0; }
.download-card i { color: var(--wx-green); margin-bottom: 16px; }
.download-btns { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; text-align: left; }
.download-os-hint {
    text-align: center; font-size: 14px; color: var(--text-secondary); margin: 0;
}
.download-os-hint i { margin-right: 6px; color: var(--wx-green); }
.download-url-box {
    background: #f7f7f7; border: 1px solid var(--border); border-radius: 6px;
    padding: 12px; word-break: break-all;
}
.download-url-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.download-url { font-size: 14px; color: var(--primary-light); text-decoration: none; line-height: 1.5; }
.download-tip { font-size: 13px; color: var(--text-secondary); text-align: center; margin: 0; }

.detail-article { background: var(--card); padding: 20px 16px; margin-bottom: 10px; }
.detail-article h1 { font-size: 20px; font-weight: 600; margin: 10px 0; line-height: 1.4; }
.article-body { font-size: 16px; line-height: 1.8; margin-top: 16px; color: var(--text); }
.article-body p { margin-bottom: 14px; }
.article-cta { text-align: center; padding: 24px 16px; background: var(--card); margin-bottom: 10px; }

.case-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.case-industry { font-size: 12px; color: var(--text-secondary); }
.case-highlight { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--penalty); font-weight: 500; }
.case-alert {
    background: #fff8f0; border-left: 3px solid var(--penalty);
    padding: 12px 14px; margin: 12px 0; font-size: 14px; color: #666;
}

.empty-hint, .hint-text { color: var(--text-secondary); font-size: 14px; text-align: center; padding: 20px; }
.steps-list { padding-left: 20px; font-size: 14px; }
.steps-list li { margin-bottom: 8px; }
.material-card { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.material-card i { color: var(--wx-green); font-size: 24px; margin-top: 4px; }
.material-tag { font-size: 12px; color: var(--text-secondary); }
.material-tag.free { color: var(--wx-green); }
.material-list { display: flex; flex-direction: column; gap: 12px; }
.material-item { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: var(--card); }
.material-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.material-desc { font-size: 14px; color: var(--text-secondary); margin: 0 0 12px; }
.material-hint { text-align: left; padding: 8px 0 0; margin: 0; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

.pricing-cert-block { border-bottom: 1px solid var(--border); padding: 16px 0; }
.pricing-cert-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pricing-fee { margin-left: auto; font-size: 14px; color: var(--penalty); font-weight: 500; }
.pricing-audience { font-size: 14px; color: var(--text-secondary); margin: 0 0 8px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal.hidden { display: none; }
.modal-panel { background: #fff; border-radius: 12px; padding: 20px; width: min(480px, 100%); max-height: 90vh; overflow: auto; }
.modal-panel h3 { margin: 0 0 16px; font-size: 18px; }

.form-hint { font-size: 13px; color: var(--text-secondary); text-align: center; margin: 0 0 12px; }
.form-hint a { color: var(--primary-light); }

.contact-hint { text-align: center; margin-top: 16px; color: var(--text-secondary); font-size: 14px; }

body.menu-open { overflow: hidden; }

/* 桌面办公智能工具嵌入：隐藏公众号壳，适配宽屏 */
html.client-desktop body.h5-body,
body.h5-body.client-desktop {
    padding-bottom: 0;
    background: #f5f7fa;
}
body.client-desktop .h5-header,
body.client-desktop .wx-menu-bar,
body.client-desktop .wx-menu-mask,
body.client-desktop .wx-menu-sheet {
    display: none !important;
}
body.client-desktop .h5-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px 32px;
}
body.client-desktop .page-hero {
    padding-top: 8px;
}
body.client-desktop .form-card {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
