/* =========================================================
   可读性增强层（v1）—— 最后加载，覆盖 styles.css
   目标：① 字号放大 ② 层级拉开 ③ 底色与文字区分
        ④ 补齐夜间模式缺失的深色适配（核心修复）
   ========================================================= */

/* ---------- 浅色主题变量：提高对比、加深底板让白卡浮出 ---------- */
:root {
  --ink: #12151c;
  --ink-2: #2e3541;
  --muted: #555e6c;
  --muted-2: #636e7c;         /* 由#828a97(3.5:1)加深到≥4.8:1 */
  --bg: #eef1f5;              /* 画布略深一档，白色卡片更突出 */
  --line: #e2e5ea;
  --line-strong: #d2d7df;
  --brand-dark: #a03e05;      /* 加深：浅色米底(#fef3ea)/白底上橙字 AA≥6:1（原#c94c06仅4.25） */
}

/* 基准字号：15px，行高更舒展 */
html, body { font-size: 15px; line-height: 1.65; }

/* ---------- 标题层级：更大、更清晰 ---------- */
.section-title { font-size: 21px; font-weight: 800; letter-spacing: -.012em; margin-bottom: 8px; }
.section-sub { font-size: 15px; color: var(--ink-2); line-height: 1.8; margin-bottom: 20px; }
.eyebrow { font-size: 11.5px; }
/* 浅色专用低对比残余：步骤眉标(#ef620d≈3.3:1)、分组小字(slate-400) 提深（暗色不受影响） */
html:not([data-theme="dark"]) .eyebrow { color: #a03e05; }
html:not([data-theme="dark"]) .av-group { color: #64748b; }
.tip { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.field label { font-size: 14px; }
.input, textarea, select { font-size: 15px; padding: 12px 15px; }
textarea { line-height: 1.75; }
.btn { font-size: 15px; }
.btn.sm { font-size: 13.5px; }

/* ---------- 结果块：与白色卡片拉开底色，正文加深 ---------- */
.shot {
  background: #f5f7fa;                 /* 浅灰底，区别于白卡 */
  border: 1px solid var(--line-strong);
  padding: 15px 17px;
  border-radius: 12px;
}
.shot-h { font-size: 15px; font-weight: 800; }
.shot-b { font-size: 15px; color: var(--ink); line-height: 1.85; margin-top: 7px; }
.shot-v { font-size: 13px; color: var(--muted); margin-top: 7px; }
.shot .k { color: var(--brand-dark); font-weight: 700; }

/* ---------- 通用展示卡：层级更清晰 ---------- */
.feat-t { font-size: 16px; }
.feat-d { font-size: 14px; color: var(--muted); line-height: 1.8; }
.step-t { font-size: 15px; }
.step-d { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.cover-t { font-size: 15px; }
.cover-d { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.faq-q { font-size: 15.5px; }
.faq-a { font-size: 14px; color: var(--muted); line-height: 1.9; }
.stat .lab { font-size: 13.5px; color: var(--muted); }
.vault-item .title { font-size: 15px; }
.vault-item .preview { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.vault-item .meta { font-size: 12.5px; }
.work-item .meta .t { font-size: 14.5px; }
.work-item .meta .s { font-size: 13px; }
.cr-t { font-size: 16px; }
.cr-d { font-size: 14px; color: var(--muted); line-height: 1.9; }
.import-box .big { font-size: 16px; }
.import-box .sub { font-size: 14px; color: var(--muted); }
.gen-hint { font-size: 14.5px; }
.gen-hint em { font-size: 13.5px; }
.acct-pf { font-size: 14px; }
.acct-name { font-size: 12px; }
.acct-fans { font-size: 13.5px; }
.ae-d { font-size: 14px; color: var(--muted); line-height: 1.9; }
.ve-d { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.ve-s b { font-size: 15px; }
.ve-s i { font-size: 13px; color: var(--muted); }
.modal-title { font-size: 19px; }
.fs-label { font-size: 15px; }

/* ---------- 深色主题：提亮 + 补齐缺失适配 ---------- */
html[data-theme="dark"] {
  --ink: #eef1f6;
  --ink-2: #c9d0da;
  --muted: #98a2b0;
  --muted-2: #8b94a3;         /* 由#6f7785(3.94:1)提亮到≥5.8:1 */
  --bg: #0b0e13;
  --panel: #14181f;
  --line: #252c36;
  --line-strong: #333d49;
  --brand-dark: var(--brand-dark);      /* 暗色提亮：深底橙字 AA≥8.5:1（原#c94c06仅3.83） */
}

/* 深色下背景仍是浅色的组件：全部补成深色底 + 浅色字（原 bug 根因） */
html[data-theme="dark"] .shot { background: #171c24; border-color: #2a323e; }
html[data-theme="dark"] .shot-h { color: #eef1f6; }
html[data-theme="dark"] .shot-b { color: #cdd4de; }
html[data-theme="dark"] .shot-v { color: #98a2b0; }
html[data-theme="dark"] .shot .k { color: var(--brand-dark); }

html[data-theme="dark"] .feat-card,
html[data-theme="dark"] .cover-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .tpl-card { background: #151a22; border-color: #262d37; }

html[data-theme="dark"] .ve-sample .vault-item { background: #171c24; }
html[data-theme="dark"] .gen-hint { background: rgba(var(--glow),.10); border-color: rgba(var(--glow),.24); color: var(--ink); }
html[data-theme="dark"] .gen-hint em { color: var(--muted); }

html[data-theme="dark"] .geo-preview { background: #151a22; border-color: #262d37; }
html[data-theme="dark"] .geo-valid { background: #1b212b; border-color: #333d49; color: #98a2b0; }
html[data-theme="dark"] .geo-panel-close { background: #1f2733; }

html[data-theme="dark"] .login-tabs .lt { background: #1a212b; color: #98a2b0; }
html[data-theme="dark"] .login-tabs .lt.on { background: rgba(var(--glow),.13); color: var(--brand-dark); }

html[data-theme="dark"] .ac-menu-item:hover { background: #1f2630; color: #eef1f6; }
html[data-theme="dark"] .modal-tab.on { color: var(--brand-dark); }

/* 深色下按钮/文字微调，保证可读 */
html[data-theme="dark"] .btn.ghost { color: #eef1f6; }
html[data-theme="dark"] .topbar .subtitle { color: #98a2b0; }
html[data-theme="dark"] .tb-tip { color: #98a2b0; }
html[data-theme="dark"] .vault-item .preview { color: #aeb6c2; }
html[data-theme="dark"] .import-box .sub { color: #98a2b0; }

/* =========================================================
   可读性 v2 —— 暗色专项修复（核心：消灭“浅米/白块 + 深棕橙字”残留）
   审计结果(账号定位页·暗色)：
     .kefu-btn  fg#c9d0da/bg#fff       1.55  ← 白底浅字
     .b(结果标题) fg#c94c06/bg#14181f  3.83  ← 深棕橙贴深底
     .badge/.chip.on fg#c94c06/bg#fef3ea 4.25 ← 浅米胶囊
   修复：① 暗色 --brand-dark 已提亮为 var(--brand-dark)（深底 8.54:1）
         ② 下方把仍残留的浅米/白底“活性块/按钮”统一转深橙调
   ========================================================= */

/* ① 橙调活性胶囊：替代暗色下刺眼的浅米底高亮（选中态/标签） */
html[data-theme="dark"] .badge,
html[data-theme="dark"] .chip.on,
html[data-theme="dark"] .pf.on,
html[data-theme="dark"] .tag-pos,
html[data-theme="dark"] .mx-hero-badge,
html[data-theme="dark"] .plan-badge,
html[data-theme="dark"] .case-tag,
html[data-theme="dark"] .spread-pack-tag,
html[data-theme="dark"] .rc-card.on {
  background: rgba(var(--glow),.13);
  border-color: rgba(var(--glow),.35);
}
/* 绿色“成功”徽章在暗色下转深绿调（保持语义、去掉浅绿刺眼底） */
html[data-theme="dark"] .badge.on {
  background: rgba(74,222,128,.12);
  border-color: rgba(74,222,128,.32);
  color: #6ee7a0;
}

/* ② 白底控件：客服按钮 / 侧栏选中项 / 套餐横幅 / 底部CTA */
html[data-theme="dark"] .kefu-btn {
  background: #1a1f27; border-color: var(--line-strong); color: #dbe1ea;
}
html[data-theme="dark"] .kefu-btn:hover { border-color: var(--brand-dark); color: var(--brand-dark); }
html[data-theme="dark"] .ac-menu-item.on { background: rgba(var(--glow),.13); box-shadow: none; }
html[data-theme="dark"] .ac-plan-bar { background: rgba(var(--glow),.10); border-color: rgba(var(--glow),.30); }
html[data-theme="dark"] .bottom-cta .btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border-color: transparent;
}
html[data-theme="dark"] .btn.ghost:hover { color: var(--brand-dark); border-color: var(--brand-dark); }

/* ③ 个别直接写死深棕橙的高亮文字，暗色统一亮橙 */
html[data-theme="dark"] .geo-sim-out b { color: var(--brand-dark); }

/* ④ 全页复扫发现的其余暗色低对比项（avatar/geo/vault/tutorial） */
html[data-theme="dark"] .av-item { color: #94a3b8; }
html[data-theme="dark"] .av-item:hover { background: #1c2430; color: #eef1f6; }
html[data-theme="dark"] .av-item.on { background: rgba(var(--glow),.10); color: var(--brand-dark); border-color: rgba(var(--glow),.35); }
/* geo-feat-tag 颜色为内联(500级,深底仅≈3.6:1)；暗色统一 !important 提亮 */
html[data-theme="dark"] .geo-feat-tag { color: var(--brand-dark) !important; background: rgba(var(--glow),.14) !important; }
html[data-theme="dark"] .vault-filter.on { background: var(--accent-solid); border-color: var(--accent-solid); }
html[data-theme="dark"] .faq-qico { background: var(--accent-solid); }

/* ⑤ 语言快捷条（copy页 Listing 快捷入口）：暗色恢复深色玻璃态（浅色已改暖橙浅底） */
html[data-theme="dark"] .landing-lang {
  background: rgba(20, 18, 36, .6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .ll-head { color: rgba(255, 255, 255, .94); }
html[data-theme="dark"] .ll-body .input { background: rgba(255, 255, 255, .08); color: #eef1f6; border-color: rgba(255, 255, 255, .22); }
html[data-theme="dark"] .ll-tip { color: rgba(255, 255, 255, .62); }

/* ⑥ 浅色残余提对比（html:not dark 限定，暗色不动）：
   白字橙底小件 → 底 var(--accent-solid)（白字 4.53:1）
   橙字白底小件 → 品牌深橙 var(--brand-dark)/sky-700 */
html:not([data-theme="dark"]) .faq-qico,
html:not([data-theme="dark"]) .vault-filter.on { background: var(--accent-solid); border-color: var(--accent-solid); }
html:not([data-theme="dark"]) .tour-step,
html:not([data-theme="dark"]) .av-work-l,
html:not([data-theme="dark"]) .geo-case-tag { color: var(--brand-dark); }
html:not([data-theme="dark"]) .geo-flow-a { color: #0369a1; }
html:not([data-theme="dark"]) .mx-mode-n { color: var(--brand-dark); }   /* 26px 大序号：浅色下原#f6cba0近白(1.5:1) */
html:not([data-theme="dark"]) .mx-ind-btn { color: var(--brand-dark); }
