/* ============================================================
   办理条件自检页样式（beginner-guide.html）
   对齐 ycnxw.cn user/beginner-guide 视觉：渐变标题卡片 + 富文本正文
   ============================================================ */
.bg-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 16px 48px;
    min-height: 70vh;
}

.bg-head {
    text-align: center;
    margin-bottom: 24px;
}
.bg-head h1 {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
}
.bg-head p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.bg-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------- 内容卡片 ---------- */
.bg-card {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.bg-card-head {
    background: linear-gradient(135deg, #1d6fe0 0%, #4f46e5 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bg-card-head svg {
    width: 20px;
    height: 20px;
    color: #fff;
    flex-shrink: 0;
}
.bg-card-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}

.bg-card-body {
    padding: 20px;
    color: #374151;
    font-size: 14px;
    line-height: 1.8;
    word-break: break-word;
}

/* ---------- 富文本排版（内容来自后台，保存时已白名单过滤） ---------- */
.bg-card-body h1,
.bg-card-body h2,
.bg-card-body h3,
.bg-card-body h4 {
    font-weight: 700;
    color: #1f2937;
    margin: 18px 0 8px;
    line-height: 1.5;
}
.bg-card-body h1 { font-size: 20px; }
.bg-card-body h2 { font-size: 18px; }
.bg-card-body h3 { font-size: 16px; }
.bg-card-body h4 { font-size: 15px; }
.bg-card-body h1:first-child,
.bg-card-body h2:first-child,
.bg-card-body h3:first-child,
.bg-card-body h4:first-child { margin-top: 0; }

.bg-card-body p {
    margin: 0 0 10px;
}
.bg-card-body p:last-child { margin-bottom: 0; }

.bg-card-body ul,
.bg-card-body ol {
    margin: 8px 0 12px;
    padding-left: 22px;
}
.bg-card-body ul { list-style: disc; }
.bg-card-body ol { list-style: decimal; }
.bg-card-body li {
    margin-bottom: 6px;
}
.bg-card-body ul li::marker { color: #1d6fe0; }
.bg-card-body ol li::marker { color: #1d6fe0; font-weight: 600; }

.bg-card-body strong { color: #111827; font-weight: 700; }
.bg-card-body em { font-style: normal; color: #1d6fe0; }

.bg-card-body a {
    color: #1d6fe0;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}
.bg-card-body a:hover { color: #096dd9; }

.bg-card-body blockquote {
    margin: 10px 0;
    padding: 10px 14px;
    border-left: 4px solid #1d6fe0;
    background: #f3f8ff;
    border-radius: 0 8px 8px 0;
    color: #4b5563;
}

.bg-card-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}
.bg-card-body table th,
.bg-card-body table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
}
.bg-card-body table th {
    background: #f9fafb;
    font-weight: 600;
    color: #1f2937;
}

.bg-card-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

/* ---------- 空状态 ---------- */
.bg-empty {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 16px;
    padding: 56px 20px;
    text-align: center;
    color: #9ca3af;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.bg-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.bg-empty p { margin: 0; font-size: 14px; }

/* ---------- 返回按钮 ---------- */
.bg-back {
    margin-top: 32px;
    text-align: center;
}
.bg-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #fff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    transition: all .2s;
}
.bg-back-btn:hover {
    background: #f9fafb;
    color: #1d6fe0;
    border-color: #1d6fe0;
}

/* ---------- PC 端 ---------- */
@media (min-width: 768px) {
    .bg-page { padding: 48px 24px 72px; }
    .bg-head { margin-bottom: 32px; }
    .bg-head h1 { font-size: 28px; }
    .bg-head p { font-size: 15px; }
    .bg-list { gap: 24px; }
    .bg-card-head { padding: 16px 24px; }
    .bg-card-head h2 { font-size: 18px; }
    .bg-card-body { padding: 24px; font-size: 15px; }
}

/* ============================================================
   暗黑模式适配
   ============================================================ */
html[data-theme="dark"] body { background: var(--c-bg); }
html[data-theme="dark"] .bg-head h1 { color: var(--c-text); }
html[data-theme="dark"] .bg-head p { color: var(--c-text-3); }
html[data-theme="dark"] .bg-card {
    background: var(--c-surface);
    border-color: var(--c-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .bg-card-body { color: var(--c-text-2); }
html[data-theme="dark"] .bg-card-body h1,
html[data-theme="dark"] .bg-card-body h2,
html[data-theme="dark"] .bg-card-body h3,
html[data-theme="dark"] .bg-card-body h4,
html[data-theme="dark"] .bg-card-body strong { color: var(--c-text); }
html[data-theme="dark"] .bg-card-body blockquote {
    background: rgba(29, 111, 224, .1);
    color: var(--c-text-2);
}
html[data-theme="dark"] .bg-card-body table th,
html[data-theme="dark"] .bg-card-body table td { border-color: var(--c-border); }
html[data-theme="dark"] .bg-card-body table th { background: var(--c-bg-2); color: var(--c-text); }
html[data-theme="dark"] .bg-empty {
    background: var(--c-surface);
    border-color: var(--c-border);
    color: var(--c-text-3);
}
html[data-theme="dark"] .bg-back-btn {
    background: var(--c-surface);
    color: var(--c-text-2);
    border-color: var(--c-border);
}
html[data-theme="dark"] .bg-back-btn:hover {
    background: var(--c-bg-2);
    color: #47a3f3;
    border-color: #47a3f3;
}
