/* ==========================================================================
   contrast-floor.css — 全站可读性下限（对比度兜底层）  v1
   --------------------------------------------------------------------------
   原则：**只上调对比度，不动版式 / 结构 / 信息层级**。
        每条规则都对应一次实测不合格（元素截图像素聚类 + WCAG 比值）。

   本轮实测确认的三类根因：
   ① 反向令牌：`legacy-unification.css` 在 `body.kk-unified` 上重新声明了
      `--text/--ink/--text-soft/--text-mute/--line/--panel`，会**遮蔽**各页内联
      `<style>` 里 `:root` 的同名变量。而首页 / KKOS / 账户页的背景又被强制成
      深色（该文件 49-52 行）⇒ 深底 + 浅色主题的文字令牌 ⇒ 文字对比度 1.0~1.5。
   ② 半迁移：pricing / app / training-dashboard 是「为深底编写的页面」，迁移只
      改了背景，页内大量 `!important` 的浅色工具类（`.text-gray-400 = rgba(255,255,255,.5)`
      / `.text-slate-400` / `.text-success` …）留在浅底上 ⇒ 浅字浅底。
   ③ 令牌本身就低于 AA：`--mute:#5a6678`(3.27) / `--text-tertiary:#6b6b7b`(3.5)
      / `--tx3:#5e6a85`(3.3)。

   加载方式：每个页面在 `</head>` 之前加载本文件（必须在各页内联 <style> 之后，
   否则同名 :root 令牌会被页面自身覆盖）。
   🔴 修改本文件内容后必须同步 bump 各页 <link> 的 ?v=，否则回访用户读到旧缓存。
   ========================================================================== */

/* ==========================================================================
   §A 共享令牌下限 —— 只改「已实测低于 4.5:1」的第三级文字令牌
   ========================================================================== */
:root {
  /* kkos 家族（css/kkos.css、voices.html）+ kk-cards.css 派生 --kcc-mute：
     原 #5a6678 在 --bg(#07080d) 上 3.27、在卡面 #141828 上 3.00 */
  --mute: #7b8797;                 /* → 5.5 / 4.8 */
  /* 后台 kk-admin / admin：原 #6b6b7b 在 --bg-surface(#0f1420) 上 3.5 */
  --text-tertiary: #86869a;        /* → 5.2 */
  /* mirror-admin / ops-admin：原 #5e6a85 在 #141723 上 3.3 */
  --tx3: #8b97b3;                  /* → 6.3 */
}

/* ==========================================================================
   §B 统一层「深色页面」：文字令牌回到深色语义
   作用域与 legacy-unification.css 第 49-52 行的深底选择器一致。
   ========================================================================== */
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) {
  --bg: #07080d;
  --bg-2: #0c0e15;
  --panel: #101a2e;
  --panel-2: #142138;
  --ink: #e9eef5;
  --text: #e9eef5;
  --text-soft: #a7b3c4;
  --sub: #a7b3c4;
  --text-mute: #7b8797;
  --line: rgba(120,160,255,.18);
  --border: rgba(120,160,255,.18);
  /* --accent 在这些页上同时用于「文字」和「按钮填充」。文字必须亮；
     按钮填充必须够暗才能保住白字（见下面的填充类回退）。 */
  --accent: #5b8dff;
  --accent-2: #9d6cff;
  --accent-3: #22d3ee;
  /* 🔴 必须连底层 --kk-color-* 一起改：legacy-unification 里有几条规则
     （如第 100 行的 kkos 侧栏）直接引用令牌而不走别名，只改别名会漏。 */
  --kk-color-canvas: #07080d;
  --kk-color-surface: #101a2e;
  --kk-color-surface-raised: #142138;
  --kk-color-surface-soft: #0c0e15;
  --kk-color-ink: #e9eef5;
  --kk-color-ink-muted: #a7b3c4;
  --kk-color-ink-subtle: #7b8797;
  --kk-color-border: rgba(120,160,255,.18);
  --kk-color-border-strong: rgba(120,160,255,.42);
}

/* 直接引用 --kk-color-* 的规则不走别名，必须单独改（legacy-unification 20/21/43 行） */
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(h1,h2,h3,.hero-title,.section-title) { color: #e9eef5; }
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(p,.subtitle,.description,.section-desc,.text-muted) { color: #a7b3c4; }
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(.modal,.dialog,.drawer,[role="dialog"]) { color: #e9eef5; }

/* 卡片 / 表单 / 徽标：legacy-unification 29/41/42 行把它们按「浅底」着色 */
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(.card,.glass-card,.panel,.pcard,.rel-card,.metric-card,.pricing-card,.model-card,.stat-card,.feature-card,.module-card,.kkgrp) {
  background: rgba(16,26,46,.72) !important;
  border-color: rgba(120,160,255,.18) !important;
}
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(input,textarea,select) {
  background: #142138 !important;
  border-color: rgba(120,160,255,.20) !important;
  color: #e9eef5 !important;
}
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(.badge,.tag,.pill,.chip) {
  background: rgba(91,141,255,.16) !important;
  color: #a9c6ff !important;
}

/* --accent 作为「填充」的少数选择器：把变量在元素内退回暗色，保住白字（≥5.5:1） */
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(.active,.nav-cta,.btn-primary,.rel-btn,.primary,.subscribe-btn) {
  --accent: #315f51;
  --accent-2: #6758c8;
}
/* 头部在这些页上仍是浅色玻璃（迁移的既定设计）⇒ 头部内文字保持深色 */
body.kk-unified:is([data-kk-page="home"],[data-kk-page="ask-kk"]) :is(header,.navbar,.nav,.topbar,.rel-nav,.app-header) {
  --text: #18201d;
  --text-soft: #4a5854;
  --text-mute: #5c6964;
  --kk-color-ink: #18201d;
  --kk-color-ink-muted: #4a5854;
  --kk-color-ink-subtle: #5c6964;
  color: #18201d;
}

/* ==========================================================================
   §C 统一层「浅色页面」：把留在浅底上的「深底专用」浅色工具类拉回浅底语义
   作用域排除 §B 的四个深色页，其余（blueprint / app / relationship / grow / pricing）适用。
   ========================================================================== */
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-gray-100,.text-gray-200,.text-gray-300,.text-slate-100,.text-slate-200,.text-slate-300) { color: #34423d !important; }
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-gray-400,.text-slate-400) { color: #5c6964 !important; }
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-gray-500,.text-slate-500) { color: #52615b !important; }
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-gray-600,.text-slate-600,.text-gray-700,.text-slate-700) { color: #4a5854 !important; }
/* 语义色：浅底上必须用深色档 */
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-success,.text-green-300,.text-green-400,.text-emerald-300,.text-emerald-400) { color: #166534 !important; }
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-warning,.text-amber-300,.text-amber-400,.text-yellow-300) { color: #92400e !important; }
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-danger,.text-red-300,.text-red-400,.text-rose-300) { color: #9f1239 !important; }
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-purple-300,.text-violet-300,.text-indigo-300) { color: #6d28d9 !important; }
body.kk-unified:not([data-kk-page="home"]):not([data-kk-page="ask-kk"]):not([data-kk-page="kkos"]):not([data-kk-page="account"]):is(
  [data-kk-page="blueprint"],[data-kk-page="app"],[data-kk-page="relationship"],[data-kk-page="grow"],[data-kk-page="pricing"]
) :is(.text-info,.text-cyan-300,.text-sky-300) { color: #0e7490 !important; }

/* ==========================================================================
   §D pricing 专属：页内深色 shim 的浅色等价物
   ========================================================================== */
body.kk-unified[data-kk-page="pricing"] :is(.hover\:text-gray-200:hover) { color: #17221f !important; }
body.kk-unified[data-kk-page="pricing"] .pay-powered { color: #5c6964 !important; }
body.kk-unified[data-kk-page="pricing"] .gradient-text { background: linear-gradient(90deg,#7c3aed,#be185d,#b45309) !important; }
body.kk-unified[data-kk-page="pricing"] :is(.cost-sub,.cost-note,.cost-src) { color: #52615b !important; }
body.kk-unified[data-kk-page="pricing"] .cost-table :is(th,td,.seat) { color: #4a5854 !important; }
body.kk-unified[data-kk-page="pricing"] :is(.cost-table td strong,.cost-mini h4,.cost-h2,.cost-h3) { color: #17221f !important; }
body.kk-unified[data-kk-page="pricing"] .cost-hl { color: #6d28d9 !important; }
body.kk-unified[data-kk-page="pricing"] .cost-note a { color: #0e7490 !important; }
body.kk-unified[data-kk-page="pricing"] .cost-formula { background: #f3efe7 !important; color: #3b4a45 !important; border-color: #e2ded4 !important; }
body.kk-unified[data-kk-page="pricing"] :is(.cost-card,.cost-mini,.glass-card) { background: #fffdf8 !important; border-color: #e2ded4 !important; }
body.kk-unified[data-kk-page="pricing"] select,
body.kk-unified[data-kk-page="pricing"] input { background: #fffdf8 !important; color: #17221f !important; border-color: #dcd8ce !important; }
body.kk-unified[data-kk-page="pricing"] :is(.border-gray-100,.border-gray-200,.border-gray-300) { border-color: #e2ded4 !important; }
body.kk-unified[data-kk-page="pricing"] .bg-white { background-color: #fffdf8 !important; }
body.kk-unified[data-kk-page="pricing"] :is(.from-blue-50,.from-purple-50,.from-pink-50,.from-amber-50,.from-gray-50) { background-color: rgba(247,245,239,.86) !important; }
body.kk-unified[data-kk-page="pricing"] .pay-more { color: rgba(0,0,0,.6) !important; }

/* ==========================================================================
   §E app / grow 专属：把「旧版深色主题」遗留的深色面 + 浅色字整体拉回浅色
   --------------------------------------------------------------------------
   证据链（全部实测/原文）：
   · legacy-unification.css 45-48 行把 app/grow 的背景**强制为浅色**，
     49-52 行只把 home/ask-kk/kkos/account 强制为深色 ⇒ app/grow 被定为浅色页。
   · 该文件 66-73 行注释明写「app.html 仍带有旧版深色主题的 !important 工具类…
     入口页在统一层显式回到浅色语义色」——**只改了文字、没改面**。
   · 实测：app.html 内联 shim `.bg-white{background-color:rgba(30,41,59,.55)}`
     未被覆盖 ⇒ 卡片是中灰（#80858c），而文字已是浅色主题的深色
     （`.text-gray-400 → #84908b`）⇒ 1.11:1。#userBList 209 条 + 页脚 34 条。
   · training-dashboard.html 第 31 行 body 原为 `#0F172A` 深渐变（被统一层抽掉），
     卡面 `.bg-slate-700(59)/.bg-slate-800\/40(20)`、文字 `.text-white(77)`、
     tailwind.config 的 primary/success/warning/danger 全是 **500 级深色主题色**
     （#10B981 在浅底仅 2.50、#F59E0B 2.43）⇒ 249 条。
   🔴 此处只做「面变浅 + 字变深」，不动版式与信息层级。
   ========================================================================== */

/* — §E1 面：白卡 / 浅色 tint 卡 / 深色 slate 面 → 浅色面 — */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-white,.bg-white\/70,.bg-white\/80,.bg-white\/90,.glass-card,.bg-\[\#fff\],.bg-\[\#ffffff\]
) { background-color: #fffdf8 !important; background-image: none !important; border-color: #e2ded4 !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .from-blue-50,.via-blue-50,.to-blue-50,.bg-blue-50,.from-blue-50\/50,.from-blue-50\/70,
  .from-purple-50,.via-purple-50,.to-purple-50,.bg-purple-50,.bg-purple-50\/50,.bg-purple-50\/70,
  .from-pink-50,.via-pink-50,.to-pink-50,.bg-pink-50,.bg-pink-50\/50,
  .from-amber-50,.via-amber-50,.to-amber-50,.bg-amber-50,
  .from-orange-50,.to-orange-50,
  .from-gray-50,.via-gray-50,.to-gray-50,.bg-gray-50,.bg-gray-50\/50,
  .bg-green-50,.from-green-50,.to-green-50,.bg-red-50
) { background-color: #f5f3ee !important; background-image: none !important; }

body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-blue-100,.to-blue-100,.bg-blue-200,.from-blue-100
) { background-color: #e3ebff !important; background-image: none !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-purple-100,.to-purple-100,.bg-purple-200
) { background-color: #ebe6ff !important; background-image: none !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-pink-100,.to-pink-100,.bg-pink-200
) { background-color: #ffe4f0 !important; background-image: none !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-amber-100,.to-amber-100,.bg-amber-200,.to-amber-50
) { background-color: #fdf0d5 !important; background-image: none !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-green-100,.to-green-100,.bg-emerald-100
) { background-color: #e0f5e7 !important; background-image: none !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-gray-100,.to-gray-100
) { background-color: #f1efe8 !important; background-image: none !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-gray-200,.bg-slate-200,.bg-gray-300,.bg-slate-300
) { background-color: #e7e3d9 !important; background-image: none !important; }

/* 深色 slate 面（grow 的主体卡面）：bg-slate-700(59) + bg-slate-800\/20~60(45) 等 */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-slate-6"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-slate-7"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-slate-8"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-slate-9"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-gray-6"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-gray-7"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-gray-8"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-gray-9"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="bg-black\/"] {
  background-color: #eeece5 !important; background-image: none !important;
}
/* 自定义深色组件 */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .avatar-ring-inner,.score-bar,.flow-node,.unlock-card,.timeline-line,.bg-card,.bg-card-hover
) { background-color: #eeece5 !important; background-image: none !important; }
/* hover 态同色系 */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .hover\:bg-gray-50:hover,.hover\:bg-gray-100:hover,.hover\:bg-slate-700:hover,.hover\:bg-slate-800:hover
) { background-color: #eceadf !important; }

/* — §E2 边框：深色/浅白边框 → 浅色语义边框 — */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-slate-"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-gray-1"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-gray-2"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-gray-3"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-blue-1"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-blue-2"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-purple-1"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-purple-2"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-pink-2"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-amber-1"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-amber-2"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-green-1"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-green-2"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="border-green-3"],
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) .border-dark,
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) .border-white {
  border-color: #e2ded4 !important;
}

/* — §E3 字：深色主题的「浅色字」→ 浅底深字 — */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .text-white,.text-slate-50,.text-slate-100,.text-slate-200,.text-slate-300,
  .text-gray-50,.text-gray-100,.text-gray-200,.text-gray-300,
  .text-blue-200,.text-indigo-200,.text-purple-200
) { color: #202c28 !important; }
/* tailwind.config 里 primary/secondary/accent/success/warning/danger 都是 500 级
   深色主题色，在浅底只有 2.4~4.3 ⇒ 换成 700 级 */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) .text-primary { color: #4338ca !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) .text-secondary { color: #6d28d9 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) .text-accent { color: #be185d !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .text-indigo-300,.text-violet-300,.text-purple-300,.text-emerald-300,
  .text-rose-300,.text-blue-400,.text-emerald-400,.text-green-400
) { color: #4338ca !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="text-\[\#07C160\]"] { color: #0a8f47 !important; }

/* — §E4 反向保护：落在「彩色/渐变填充」上的白字必须保持白 — */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-gradient-to-r,.bg-gradient-to-br,.bg-gradient-to-t,.bg-gradient-to-b,
  .bg-primary,.bg-secondary,.bg-accent,.bg-success,.bg-warning,.bg-danger,
  .bg-indigo-600,.bg-indigo-500,.bg-blue-500,.bg-purple-500,.bg-pink-500,
  .bg-green-500,.bg-emerald-500,.bg-amber-500,.bg-red-500,
  .btn-primary,.nav-cta,.rel-btn,.primary,.subscribe-btn
) :is(.text-white,.text-slate-100,.text-slate-200) { color: #fff !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(
  .bg-gradient-to-r,.bg-gradient-to-br,.bg-primary,.bg-secondary,.bg-accent,
  .bg-success,.bg-warning,.bg-danger,.bg-indigo-600,.bg-indigo-500,.bg-blue-500,
  .bg-purple-500,.bg-pink-500,.bg-green-500,.bg-amber-500,.bg-red-500,
  .btn-primary,.nav-cta,.rel-btn,.primary,.subscribe-btn
).text-white { color: #fff !important; }

/* — §E5 表单/滚动条：深色兜底 → 浅色 — */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(.form-input,.btn-secondary) {
  background-color: #fffdf8 !important; border-color: #dcd8ce !important; color: #17221f !important;
}
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(input,select,textarea,option) {
  background-color: #fffdf8 !important; color: #17221f !important;
  -webkit-text-fill-color: #17221f !important; caret-color: #17221f !important;
}
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) :is(input,textarea)::placeholder {
  color: #84908b !important; -webkit-text-fill-color: #84908b !important;
}
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) ::-webkit-scrollbar-track { background: #eeece5 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) ::-webkit-scrollbar-thumb { background: #c9c4b8 !important; }

/* — §E6 grow 的渐变标题（canvas 渐变字在浅底会偏亮）→ 加深 — */
body.kk-unified[data-kk-page="grow"] .gradient-text {
  background: linear-gradient(135deg,#4338ca,#6d28d9,#be185d) !important;
}
/* — §E7 头像环：app.html 原设计是「白内圈 + 彩色渐变环」，
       深色 shim 把内圈改成 #1e293b、行模板又用**内联** style="color:#e2e8f0"。
       回到浅色的内圈后，内联的浅色字必须压掉（样式表 !important > 内联非 important）。 — */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) .avatar-ring-inner {
  background: #fffdf8 !important; color: #17221f !important; -webkit-text-fill-color: #17221f !important;
}

/* ==========================================================================
   §F 浅色页：Tailwind「深色主题」彩色的 300/400/500 级文字 → 深色档
   --------------------------------------------------------------------------
   实测来源（原文，非推断）：
   · js/app.js getEnergyBadgeClass() 返回 `bg-blue-100 text-blue-300`
     这类 **深底浅字** 配对（浅色 tint 底 + 300 级亮字）；`📍 城市` 用 `text-blue-400`
     ⇒ 浅底上 1.77 / 4.02。
   · app.html 里 `text-red-500`(10) `text-purple-500`(7) `text-blue-500`(7) `text-*-400`
     ⇒ #3b82f6 在 #fffdf8 上仅 3.61。
   · training-dashboard tailwind.config 的 primary/secondary/accent/success/warning/danger
     都是 500 级（#6366F1 4.34 / #10B981 2.50 / #F59E0B 2.43）。
   ⇒ 统一映射到 700 级（实测 5.0~6.9:1）。
   ========================================================================== */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-blue-300,.text-blue-400,.text-blue-500,.text-sky-300,.text-sky-400,.text-sky-500,.text-\[\#3b82f6\]
) { color: #1d4ed8 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-indigo-300,.text-indigo-400,.text-indigo-500
) { color: #3730a3 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-purple-300,.text-purple-400,.text-purple-500,.text-violet-300,.text-violet-400,.text-violet-500,.text-fuchsia-300,.text-fuchsia-400
) { color: #6d28d9 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-pink-300,.text-pink-400,.text-pink-500,.text-rose-300,.text-rose-400,.text-rose-500
) { color: #be185d !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-green-300,.text-green-400,.text-green-500,.text-emerald-300,.text-emerald-400,.text-emerald-500,.text-teal-300,.text-teal-400,.text-teal-500
) { color: #047857 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-amber-300,.text-amber-400,.text-amber-500,.text-yellow-300,.text-yellow-400,.text-orange-300,.text-orange-400
) { color: #b45309 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-red-300,.text-red-400,.text-red-500
) { color: #b91c1c !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"],[data-kk-page="pricing"],[data-kk-page="blueprint"],[data-kk-page="relationship"]) :is(
  .text-cyan-300,.text-cyan-400,.text-cyan-500
) { color: #0e7490 !important; }
/* 同上，但带透明度后缀（Tailwind `text-primary/70` 之类不会被类名精确匹配命中） */
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="text-primary/"] { color: #4338ca !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="text-accent/"] { color: #be185d !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="text-warning/"] { color: #92400e !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="text-success/"] { color: #166534 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="text-secondary/"] { color: #6d28d9 !important; }
body.kk-unified:is([data-kk-page="app"],[data-kk-page="grow"]) [class*="text-danger/"] { color: #b91c1c !important; }

/* ==========================================================================
   §G 第二轮：逐页残差收敛
   --------------------------------------------------------------------------
   作用域一律 `body[data-kk-page="<slug>"]` —— §G 覆盖的页面**不加载
   legacy-unification.css**，因此 §B/§C/§E/§F 的 `body.kk-unified` 前缀对它们无效。
   取色规则（不做渐变/混色猜测，只用实测背景亮度分档）：
     · 深色面（亮度 < 0.25）→ #e7ecf3（≥13:1）/ #aab6c8（≥8:1）
     · 浅色面（亮度 > 0.55）→ #17221f（≥14:1）/ #4a5854（≥8:1）/ #1d4ed8(蓝 6.3:1)
   ========================================================================== */

/* —— G0 kkos：**只修深色主区**，不动被统一层刷成浅色的顶栏/侧栏 ——
   证据（探针实测，注入本表后）：
     `#msgs` / `#floatKeys` 底色是深色（#0a0c12 / 半透明蓝叠加），
     而 `--ink` 已被 legacy-unification.css L2-9 重映射为浅色主题的深墨 #18201d
     ⇒ `.empty h2` 1.12、`.empty p` 2.88、`.fine` 2.92、`.fk` 2.38~2.59。
   `#uiLangToggle`(`.btn.gh`) 底色是 kkos 自己的 `--raise:#141826`（未被重映射），
     字却走 `--ink` ⇒ 1.06。
   ⚠️ 曾尝试「整页还原 kkos.html 的深色令牌」，实测**反而把顶栏/侧栏**（被
     legacy-unification L22-25 强制成浅色 rgb(247 245 239/.91)）压成深字浅底/浅字浅底，
     净回归 8→13，已弃用。改为按「实测是深色的容器」逐个收敛。 */
body.kk-unified[data-kk-page="kkos"] :is(#msgs .empty, #msgs .empty *) { color:#e7ecf3 !important; }
body.kk-unified[data-kk-page="kkos"] :is(#msgs .empty p, #msgs .empty .fine) { color:#aab6c8 !important; }
body.kk-unified[data-kk-page="kkos"] :is(#floatKeys, #floatKeys *) { color:#aab6c8 !important; }
body.kk-unified[data-kk-page="kkos"] #uiLangToggle { color:#e7ecf3 !important; }

/* —— G1 OMI 系模板（app / index-old / index-final / index-fixed / match-analysis-enhanced）——
   同源模板：footer.foot 是「深色半透明底 + 半透明浅字」，但首页模板里它落在浅色页面上
   ⇒ 实测 1.45~2.37（app 75 条、index-old 321 条大多在此）。 */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) :is(footer.foot,.foot) {
  background:#10151f !important; background-image:none !important;
  border-color:rgba(120,160,255,.16) !important;
}
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) :is(footer.foot,.foot) :is(h4,strong,b) {
  color:#e7ecf3 !important;
}
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) :is(footer.foot,.foot) :is(a,p,span,li,div,small) {
  color:#aab6c8 !important;
}
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) :is(footer.foot,.foot) a:hover {
  color:#fff !important;
}
/* 页脚状态点（绿字在深底 1.22）：保留语义色但提高亮度 */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) .foot-status {
  color:#4ade80 !important; background:rgba(74,222,128,.14) !important;
}
/* 底部导航（app 移动端 10px 文字 2.46） */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) nav.mobile-bottom-nav .nav-item :is(span,i,svg) {
  color:#4a5854 !important;
}
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) nav.mobile-bottom-nav .nav-item.active :is(span,i,svg) {
  color:#1d4ed8 !important;
}
/* #userBList 行（index-old 150 条）：头像字母 1.23、角色 1.4、📍 城市 2.54 */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) .avatar-ring-inner {
  background:#fffdf8 !important; color:#17221f !important; -webkit-text-fill-color:#17221f !important;
}
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-blue-400"] {
  color:#1d4ed8 !important;
}
/* 头像字母：`bg-blue-500` 圆底 + `text-white`（app/index-old 实测 1.07~1.09）
   —— §E3 的「深色主题浅字→浅底深字」把同元素上的 .text-white 也压深了，
      而 §E4 的同元素双类规则没能覆盖 .bg-blue-500。这里补一条更专一的保护。 */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"])
  :is([class~="bg-blue-500"],[class~="bg-purple-500"],[class~="bg-pink-500"],
      [class~="bg-indigo-500"],[class~="bg-emerald-500"],[class~="bg-green-500"],
      [class~="bg-amber-500"],[class~="bg-red-500"]).text-white { color:#fff !important; }

/* 渐变卡上的字母/标题（app 1.07） */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"],
    body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) [class*="bg-gradient-to-"] :is(h1,h2,h3,h4,h5,b,strong) {
  color:#17221f !important;
}

/* —— G2 match-analysis-enhanced：**浅色**页面（白色渐变底）—— */
body[data-kk-page="match-analysis-enhanced"] :is(.text-gray-400,.text-gray-500,.text-slate-400,.text-slate-500) { color:#4a5854 !important; }
body[data-kk-page="match-analysis-enhanced"] :is(.text-blue-400,.text-blue-500,.text-indigo-400,.text-indigo-500) { color:#1d4ed8 !important; }
body[data-kk-page="match-analysis-enhanced"] :is(.text-green-400,.text-green-500,.text-emerald-400,.text-emerald-500) { color:#047857 !important; }
body[data-kk-page="match-analysis-enhanced"] :is(.text-purple-400,.text-purple-500,.text-violet-400,.text-violet-500) { color:#6d28d9 !important; }
body[data-kk-page="match-analysis-enhanced"] :is(.text-amber-400,.text-amber-500,.text-orange-500) { color:#b45309 !important; }
body[data-kk-page="match-analysis-enhanced"] footer :is(span,p,div,a,h4) { color:#4a5854 !important; }
body[data-kk-page="match-analysis-enhanced"] :is(.glass-card,.prediction-summary) :is(p,span,div,small,a) { color:#4a5854 !important; }
body[data-kk-page="match-analysis-enhanced"] :is(.glass-card,.prediction-summary) :is(h1,h2,h3,h4,b,strong) { color:#17221f !important; }

/* —— G3 docs（可达，15 处站内引用）——
   `--text-mute:#64748b` 在 #0e111d 上 3.91~4.14（th / aside h4 / crumbs），
   `.crumbs span.sep{opacity:.5}` 让 "/" 掉到 4.09~4.98 边缘。 */
body[data-kk-page="docs"] { --text-mute:#8a96a8; }
body[data-kk-page="docs"] :is(.crumbs,thead th,aside h4,.nextrow a span) { color:#8a96a8 !important; }
body[data-kk-page="docs"] .crumbs span.sep { opacity:1 !important; color:#8a96a8 !important; }
body[data-kk-page="docs"] .crumbs > span { color:#a7b3c4 !important; }

/* —— G4 research（可达，15 处引用）：深色卡上的 .chip = --vio(#8b5cf6) 仅 4.06 —— */
body[data-kk-page="research"] .chip { color:#b9a6ff !important; }
body[data-kk-page="research"] .chip.lang-en { color:#c4b0ff !important; }

/* —— G5 kkos-ai：KPI 数字 b#kpi1..4 在深色 .kpi 卡上是深墨 1.11 —— */
body[data-kk-page="ask-kk"] #kpi1,
body[data-kk-page="ask-kk"] #kpi2,
body[data-kk-page="ask-kk"] #kpi3,
body[data-kk-page="ask-kk"] #kpi4,
body[data-kk-page="ask-kk"] .kpi b { color:#e9eef5 !important; }
body[data-kk-page="ask-kk"] .kpi span { color:#a7b3c4 !important; }

/* —— G6 pricing（浅色页）——
   #growthEntry 链接 1.02、`.subscribe-btn .+more` 2.89（黄底白字 1.43）。 */
body.kk-unified[data-kk-page="pricing"] #growthEntry :is(a,span,p,div,strong,b) { color:#17221f !important; }
body.kk-unified[data-kk-page="pricing"] #growthEntry a { color:#1d4ed8 !important; }
body.kk-unified[data-kk-page="pricing"] :is(.stacked-pay-btn,.stacked-pay-btn *) { color:#111 !important; }
body.kk-unified[data-kk-page="pricing"] .stacked-pay-methods * { color:#111 !important; }
body.kk-unified[data-kk-page="pricing"] #businessPlans a { color:#1d4ed8 !important; }
body.kk-unified[data-kk-page="pricing"] .dodo-btn { background:#1f2937 !important; color:#fff !important; }
body.kk-unified[data-kk-page="pricing"] .dodo-btn :is(div,span,strong,b,small,svg) { color:#fff !important; }
body.kk-unified[data-kk-page="pricing"] .subscribe-btn { color:#17221f !important; }
body.kk-unified[data-kk-page="pricing"] .subscribe-btn * { color:inherit !important; }

/* —— G7 feedback（深色页 + 玻璃卡）—— */
body[data-kk-page="feedback"] :is(.text-gray-500,.text-gray-400) { color:#94a3b8 !important; }
body[data-kk-page="feedback"] form#feedbackForm label span[style] { color:#fca5a5 !important; }

/* —— G8 kk-admin（深色后台）—— */
body[data-kk-page="kk-admin"] nav.mobile-bottom-nav .nav-item :is(span,i,svg) { color:#4a5854 !important; }
body[data-kk-page="kk-admin"] nav.mobile-bottom-nav .nav-item.active :is(span,i,svg) { color:#1d4ed8 !important; }
body[data-kk-page="kk-admin"] .logo-area .logo-icon { color:#e7ecf3 !important; }
body[data-kk-page="kk-admin"] :is(.activity-item,.activity-item span,.activity-item b) { color:#aab6c8 !important; }

/* —— G9 mirror（深色）：能力卡编号/标题 —— */
body[data-kk-page="mirror"] .kk-cap { color:#e8ecf6 !important; }
body[data-kk-page="mirror"] .kk-cap-hud { color:#aab6c8 !important; opacity:1 !important; }
body[data-kk-page="mirror"] .kk-cap .kcc-mute { color:#9aa6c2 !important; }

/* —— G10 rules-*（浅色页，Tailwind 500 级 + 浅 tint 卡内浅字）—— */
:is(body[data-kk-page="rules-prediction"], body[data-kk-page="rules-dimension-analysis"], body[data-kk-page="rules-match-analysis"]) :is(.text-gray-400,.text-gray-500) { color:#4a5854 !important; }
:is(body[data-kk-page="rules-prediction"], body[data-kk-page="rules-dimension-analysis"], body[data-kk-page="rules-match-analysis"]) :is(.bg-green-50,.bg-emerald-50,.bg-blue-50,.bg-amber-50,.bg-purple-50,.bg-red-50) :is(div,span,p,b,strong,em):not([class~="text-white"]) { color:#17221f !important; }
:is(body[data-kk-page="rules-prediction"], body[data-kk-page="rules-dimension-analysis"], body[data-kk-page="rules-match-analysis"]) :is(.rule-card,.stage-card) :is(div,span,p,small):not([class~="text-white"]) { color:#38443f !important; }
:is(body[data-kk-page="rules-prediction"], body[data-kk-page="rules-dimension-analysis"], body[data-kk-page="rules-match-analysis"]) :is(.rule-card,.stage-card) :is(b,strong,h2,h3,.font-bold):not([class~="text-white"]) { color:#17221f !important; }

/* —— G11 设计迭代/孤立页（home-v1~v4 / index-old / ui-preview 等）——
   这些页**没有任何站内引用**（服务器侧 `grep -l` 计数为 0），属历史迭代产物。
   仅对其中「共享结构」的低成本项做统一收敛；其余在验收报告里列为「孤立页，未纳入本次修复范围」。 */
body[data-kk-page="home-v2-humanity"] :is(.eyebrow,.metric .num,.step .n,.scene-card .tag,.quote .mark,.logo-heart,.quote .by,nav .nav-links a,header.hero .sub,.hero-note) { color:#4a5854 !important; }
body[data-kk-page="home-v3-fusion"] .term .ln span { color:#8a96a8 !important; }
body[data-kk-page="home-v4-final"] :is(.deco-row .meta div,.metric div,.algo div,.adapt-col div,.graph-head div,footer.foot h4,footer.foot span,footer.foot a) { color:#aab6c8 !important; }
body[data-kk-page="home-v4-final"] .lang-switch button { color:#aab6c8 !important; }
body[data-kk-page="home-v4-final"] #cta a { background:#315f51 !important; color:#fff !important; border-color:#315f51 !important; }
body[data-kk-page="home-v4-final"] #cta a * { color:#fff !important; }
body[data-kk-page="ui-preview"] :is(.kk-page-header span,.kk-dimension-list li small,#evidence dt) { color:#4a5854 !important; }

/* —— G12 彩色 500 级「填充 + 白字」：实测 3.68:1（<4.5）——
   证据：app.html `<span class="w-9 h-9 rounded-xl bg-blue-500 … text-white">A</span>`
   （探针实测 color=rgb(255,255,255) / bg=rgb(59,130,246) ⇒ 3.68:1）、index-old 同类头像、
   rules-* 的序号方块；tailwind.config 的 primary #6366F1(4.34) / accent #EC4899(3.3) 同理。
   处置：填充下沉到 700 级（语义色不变，白字 ≥6.3:1）。

   🔴 必须写 `[class~="bg-X-500"]`（**整 token** 匹配），绝不能写 `[class*="bg-X-500"]`：
      子串匹配会连带命中伪类 / 透明度变体 —— `peer-checked:bg-blue-500`（未选中的性别
      单选框）与 `bg-blue-500/20`（两成透明填充）都会被强涂成不透明深蓝。
      实测 fix5->fix6 正是因此净回归 +8（app 性别单选 2.18 / index-old 2.42）。
   🔴 必须同时写 `color:#fff`：rules-* 的序号方块被上一条 §G10（`.rule-card :is(div,span,p)`
      ⇒ #38443f，specificity (0,2,0)!important）压成深字，只修底色会变成深字深底（实测 1.43）。
      本条 specificity = (0,2,1) > §G10 的 (0,2,0)，且在文件更后，两条同时命中时本条胜出。 */
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-blue-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-indigo-500"] { background-color:#1d4ed8 !important; color:#fff !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-purple-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-violet-500"] { background-color:#6d28d9 !important; color:#fff !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-pink-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-fuchsia-500"] { background-color:#be185d !important; color:#fff !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-emerald-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-green-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-teal-500"] { background-color:#047857 !important; color:#fff !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-amber-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-orange-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-yellow-500"] { background-color:#b45309 !important; color:#fff !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-red-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-rose-500"] { background-color:#b91c1c !important; color:#fff !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-sky-500"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) [class~="bg-cyan-500"] { background-color:#0e7490 !important; color:#fff !important; }

/* 渐变填充 + 白字：编译版 Tailwind 缺 `--tw-gradient-to` 时整条 linear-gradient 失效
   ⇒ 元素其实没有底色，白字落在浅色页面上（实测 1.08）。给一条真渐变兜底。
   （同样必须整 token 匹配，理由同上。） */
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"],body[data-kk-page="match-analysis-enhanced"],body[data-kk-page="rules-prediction"],body[data-kk-page="rules-dimension-analysis"],body[data-kk-page="rules-match-analysis"]) :is([class~="bg-gradient-to-r"],
[class~="bg-gradient-to-br"],
[class~="bg-gradient-to-b"],
[class~="bg-gradient-to-t"],
[class~="bg-gradient-to-tr"],
[class~="bg-gradient-to-bl"],
[class~="bg-gradient-to-l"],
[class~="bg-gradient-to-tl"])[class~="text-white"] {
  background-color:#1d4ed8 !important;
  background-image:linear-gradient(90deg,#1d4ed8,#6d28d9) !important;
  color:#fff !important;
}

/* —— G13 iframe/独立页收尾 —— */
/* OMI 浅色页脚（`footer.border-t`，实测 2.4）——与 app 的深色 `footer.foot` 是两种页脚 */
:is(body[data-kk-page="index-old"], body[data-kk-page="index-final"],
    body[data-kk-page="index-fixed"], body[data-kk-page="match-analysis-enhanced"])
  footer.border-t :is(span,p,div,a,h4,small) { color:#4a5854 !important; }
:is(body[data-kk-page="index-old"], body[data-kk-page="index-final"],
    body[data-kk-page="index-fixed"], body[data-kk-page="match-analysis-enhanced"])
  footer.border-t :is(h4,strong,b) { color:#17221f !important; }
/* index-old 的灰度工具类（2.34~2.52）*/
:is(body[data-kk-page="index-old"], body[data-kk-page="index-final"], body[data-kk-page="index-fixed"])
  :is(.text-gray-400,.text-slate-400) { color:#5c6964 !important; }
:is(body[data-kk-page="index-old"], body[data-kk-page="index-final"], body[data-kk-page="index-fixed"])
  :is(.text-gray-500,.text-slate-500) { color:#52615b !important; }
/* app / index-old 的「能量徽章」：`bg-X-100` 浅 tint 底 + `text-X-300` 亮字（实测 1.54）
   —— app.js `getEnergyBadgeClass()` 产出 `bg-amber-100 text-amber-300` 等 5 组。
   一律下沉到 800 级（浅 tint 上 ≥6.1:1）。🔴 必须含 pink：原先漏配，index-old 的
   `结构型` 徽章（bg-pink-100 + text-pink-300）实测 1.54。 */
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-blue-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-blue-400"] { color:#1e40af !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-indigo-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-indigo-400"] { color:#3730a3 !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-purple-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-purple-400"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-violet-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-violet-400"] { color:#6b21a8 !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-pink-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-pink-400"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-rose-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-rose-400"] { color:#9d174d !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-amber-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-amber-400"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-orange-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-orange-400"] { color:#92400e !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-green-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-green-400"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-emerald-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-emerald-400"] { color:#166534 !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-red-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-red-400"] { color:#991b1b !important; }
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-sky-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-sky-400"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-cyan-300"],
:is(body[data-kk-page="app"],body[data-kk-page="index-old"],body[data-kk-page="index-final"],body[data-kk-page="index-fixed"]) :is(#userBList,#userAList) [class~="text-cyan-400"] { color:#155e75 !important; }
/* index-final / index-fixed（孤立迭代页：`body` 是 #667eea->#764ba2 紫渐变）
   `.feature` 是 `rgba(255,255,255,.15)` 玻璃卡 ⇒ 实测有效底 #8673c3。
   🔴 原先写「深字 #4a5854」方向搞反（白底思维）→ 实测 1.87 净回归。
   正解：把卡片压暗 + 白字。 */
:is(body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) .feature {
  background:rgba(0,0,0,.32) !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
:is(body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) .feature :is(p,h3,strong,b) {
  color:#fff !important; opacity:1 !important;
}
:is(body[data-kk-page="index-final"], body[data-kk-page="index-fixed"]) a.btn { background:#1d4ed8 !important; color:#fff !important; }

/* ==========================================================================
   §G14 第三轮修正（fix6 → fix7）
   --------------------------------------------------------------------------
   每条都对应 fix6 实测残差或回归，逐条给出元素 / 实测值 / 处置。
   ========================================================================== */

/* 1) app / index-old 主按钮 `.btn-primary`
      = `linear-gradient(135deg,#3b82f6,#8b5cf6)` + 白字
      ⇒ 白字在 #8b5cf6 端 3.90、#3b82f6 端 3.68，均 < 4.5（实测白字 4.15 落在 #6e6af6）。
      处置：渐变两端下沉到 700 级（白字 ≥6.3:1），语义色不变。 */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"])
  :is(.btn-primary,a.btn-primary,button.btn-primary) {
  background-color:#1d4ed8 !important;
  background-image:linear-gradient(135deg,#1d4ed8,#6d28d9) !important;
  color:#fff !important;
}
:is(body[data-kk-page="app"], body[data-kk-page="index-old"]) .btn-primary :is(span,i,svg,div) { color:#fff !important; }

/* 2) app `#quickMatchSection .gradient-text`（`Quick Match` 渐变字，18px、非粗体 ⇒ 需 4.5）
      原渐变 #3b82f6→#8b5cf6→#ec4899 在 #fffdf8 上实测 4.18。
      处置：只压深这一段（不动 30px 的 KPI 数字，那批按大字号 3.0 已达标）。 */
body[data-kk-page="app"] #quickMatchSection .gradient-text {
  background-image:linear-gradient(135deg,#1d4ed8,#6d28d9,#be185d) !important;
}

/* 3) pricing `#growthEntry a.btn-primary`
      该锚点是「带 accent 填充的按钮」（bg #315f51），但 §G6 的通用规则
      `#growthEntry a{color:#1d4ed8}` 把字刷成蓝 ⇒ 蓝字绿底 1.09。
      处置：按钮态恢复白字（白字在 #315f51 上 7.4:1）；其余仍是 §G6 的深字/蓝链。 */
body.kk-unified[data-kk-page="pricing"] #growthEntry a.btn-primary,
body.kk-unified[data-kk-page="pricing"] #growthEntry a.btn-primary * {
  background-color:#315f51 !important;
  color:#fff !important;
}

/* 4) home-v4-final 装饰头像 `.hero-deco .deco-row .avatar`（白字 + #6575e3 靛底 = 4.03）
      纯装饰（无信息量字母），压深底色即可，视觉变化近零。 */
body[data-kk-page="home-v4-final"] .hero-deco .avatar {
  background:#4338ca !important;
  background-image:none !important;
  color:#fff !important;
}

/* 5) home-v2-humanity（浅暖底 #fbf8f3）
      ① `--sub:#7a7268` 在 #fbf8f3 上 4.47 —— 差 0.03 未达 AA（页脚 / `#why` 导语同源）；
      ② `.quote p em` 是 `background-clip:text` 的 #f97316→#fb7185 渐变字，
         在 #fbf8f3 上 2.65（24px 需 3.0）。
      处置：令牌下沉一档；渐变字两端压深（保留橙→玫红的观感）。 */
body[data-kk-page="home-v2-humanity"] { --sub:#6b6259; }
body[data-kk-page="home-v2-humanity"] .quote p em {
  background-image:linear-gradient(120deg,#c2410c,#be123c) !important;
}

/* 6) kk-admin logo 芯片 `.logo-icon`（38×38，底色 `--gradient-hero`：#7c3aed→#06b6d4）
      🔴 里面是 `&#9889;`（U+26A1）—— 在 Chromium 上按**彩色 emoji** 渲染
         （自带黄 #ffc83d，`color` 对它无效）⇒ 黄字落在青蓝段 #06b6d4 上仅 1.3:1。
      处置：把芯片整体压到深靛/深青（`#4c1d95 → #155e75`）。
         这样无论字形是「黄色 emoji」还是「白色文本」，对比度都 ≥7:1
         （黄 #ffc83d 对 #4c1d95 = 7.1，白 #fff 对 #155e75 = 7.3）。 */
body[data-kk-page="kk-admin"] .logo-area .logo-icon {
  background:linear-gradient(135deg,#4c1d95 0%,#155e75 100%) !important;
  color:#fff !important;
}

/* 7) app 移动端 `section#quickMatchSection > div.text-center.mb-10 > p.text-gray-500`
      （"Choose from 3,500 AI digital persons"）：§G 里 app 无灰度工具类兜底。
      与 index-old 同源，一并下沉。 */
:is(body[data-kk-page="app"], body[data-kk-page="index-old"])
  :is(.text-gray-400,.text-slate-400) { color:#5c6964 !important; }
:is(body[data-kk-page="app"], body[data-kk-page="index-old"])
  :is(.text-gray-500,.text-slate-500) { color:#52615b !important; }

/* ==========================================================================
   §G15 第四轮修正（fix9 → fix10）
   --------------------------------------------------------------------------
   fix9 做到全站 58 页 × 2 视口只剩 23 条，逐条给出元素 / 实测值 / 处置。
   ========================================================================== */

/* 1) training-dashboard（`data-kk-page="grow"`）
      🔴 这一页是**半迁移**页：本页内联 CSS 明写 `body{background:linear-gradient(
         #0F172A,#1E1B4B,#0F172A);color:#F8FAFC}`（深色页），但
         `legacy-unification.css` 45-48 行把 app/grow 的背景**强制成浅色**
         ⇒ 浅底 + 白字。§C/§E 已把「工具类文字」拉回深色（503 → 11），
         剩下的是**页内自定义 class** 与**无 class 的继承文字**：
         · `.tab-active{color:#F8FAFC}` + 30% 靛蓝渐变 → 实测 1.03
         · `.nav-tab.active{color:#F8FAFC}`（顶部标签，无底色）→ 实测 1.03
         · `nav.mobile-bottom-nav .nav-item span`（无 class，继承）→ #94a3b8 / 白底 = 2.56
         · `span.layer-badge.bg-accent/20.text-accent` → #be185d / #efcfdb = 4.20
      处置：两个 tab 补一层**自足实底**（与底色无关）；底部导航按 §G1/§G8 同口径给深字；
      徽章再深一档。 */
body[data-kk-page="grow"] :is(.tab-active,.nav-tab.active,.tab-btn.tab-active) {
  background:#4338ca !important;
  background-image:none !important;
  color:#fff !important;
}
body[data-kk-page="grow"] :is(.tab-active,.nav-tab.active,.tab-btn.tab-active) :is(span,i,svg) { color:#fff !important; }
body[data-kk-page="grow"] .layer-badge.text-accent { color:#9d174d !important; }
body[data-kk-page="grow"] nav.mobile-bottom-nav .nav-item :is(span,i,svg) { color:#4a5854 !important; }
body[data-kk-page="grow"] nav.mobile-bottom-nav .nav-item.active :is(span,i,svg) { color:#1d4ed8 !important; }

/* 2) docs `span.method.delete`：`color:var(--danger)`(#ef4444) 落在
      `background:rgba(239,68,68,.15)` 上 = 4.31（差 0.2）。
      其余 method（get/post/put/ws）实测达标，不动。 */
body[data-kk-page="docs"] .method.delete { color:#fca5a5 !important; }

/* 3) kkos-* 微图角标 `span.kcc-viz-hint`（css/kk-cards.css:194）
      = `color:var(--kcc-soft); opacity:.44`，落在 `.kcc-embed` 的**渐变画布**上，
      实测 2.72（kkos-algorithms）/ 3.65（kkos-trust）/ 3.79（kkos-adaptation）。
      处置：前景提亮到 #e7ecf3 并把 44% 透明度放到 92%（角标本身是 9px 极小字，
      原来那点「退到背景里」的意图靠层级和字重仍然成立）。 */
:is(body[data-kk-page="kkos-adaptation"], body[data-kk-page="kkos-algorithms"],
    body[data-kk-page="kkos-trust"]) .kcc-viz-hint {
  color:#e7ecf3 !important;
  opacity:.92 !important;
}

/* 4) kkos-evolution 路线图日期 `div.road-item > div.rt`
      = `color:var(--rc,#5b8dff)`，实测有效值 #5a6678 落在 #07080d 上 = 3.44。 */
body[data-kk-page="kkos-evolution"] .road-item .rt { color:#8b97b3 !important; }

/* 5) mirror-profile `div#confNum.big` 是**渐变文字**
      （`background:linear-gradient(90deg,var(--vio),var(--pink)); background-clip:text`），
      `--vio:#8b5cf6` / `--pink:#ec4899`。desktop 40px 达标，#confNum 34px 的移动端
      实测 1.25（`far`）。处置：只把两端提亮到 300~400 级，**保留同一色相走向**。 */
body[data-kk-page="mirror-profile"] .big {
  background-image:linear-gradient(90deg,#a78bfa,#f9a8d4) !important;
}

/* 6) kkai-preview（孤立预览页）会话元信息 `div.kkai-msg-meta`（时间戳 10px）
      = #64748b 落在 #0f172a 上，实测 3.75。提亮到 400 级（≥6.4:1）。 */
body[data-kk-page="kkai-preview"] .kkai-msg-meta { color:#94a3b8 !important; }

/* ==========================================================================
   §G16 上线后用户视角补漏（live1 验收盲区：body 挂背景图 ⇒ 采集器归 unknownBg）
   ========================================================================== */

/* 1) kkos 各视图大标题：统一层把 --kk-color-ink(#18201d) 继承给 .wrap > h2，
      直接落在 body 深底(#070d1f)上 = 1.14（用户看到的「报告像丢了」就是它）。
      卡片内的 H3（浅底）不受影响，保持深字。 */
body[data-kk-page="kkos"] :is(#v-report,#v-assess,#v-plan,#v-chat,#v-fortune) > .wrap > h2 {
  color:#e7ecf3 !important;
}

/* 2) kkos 对话报告的浅卡内语义色（--good 绿/--warn 琥珀 落浅卡 ≈2.2）
      —— 在浅卡作用域内把令牌下沉到 700 级，语义不变。 */
body[data-kk-page="kkos"] #v-report .card.pad {
  --good:#15803d; --warn:#b45309; --bad:#b91c1c;
}

/* 3) 首页 hero 次按钮 .btn-ghost：浅蓝字(#aecbff)压 hero 底部浅色渐变段 ≈1.9。
      给自足深底药丸（与主 CTA 形成层级），字提亮到 #dce7ff（≥12:1）。 */
body[data-kk-page="home"] section.hero .hero-cta .btn-ghost {
  background:#0a1626 !important;
  color:#dce7ff !important;
  border-color:rgba(91,141,255,.45) !important;
}
