/* ============================================================
   NO.38 工单 · 可访问性对比度修正（WCAG 2.1 AA）
   原则：只新增、不修改既有文件；本文件最后加载，
   用不低于被覆盖规则的特异性 + !important 收敛。
   修正来源：scripts/no38/contrast-audit.js 无浏览器静态审计。
   ============================================================ */

/* ---------- 1. 首页深色导航上的控件 ---------- */

/* 语言切换按钮：深色玻璃底 + 浅蓝字（13px/500，正文阈值 4.5:1） */
body.v10-home .navbar .lang-switcher-btn,
body.v10-home .nav-inner .lang-switcher-btn,
body.v10-home header .lang-switcher-btn {
    background: rgba(10, 22, 38, 0.82) !important;
    border: 1px solid rgba(125, 211, 252, 0.45) !important;
    color: #eaf6ff !important;
}
body.v10-home .lang-switcher-btn:hover,
body.v10-home .lang-switcher-btn:focus,
body.v10-home .lang-switcher-btn[aria-expanded="true"] {
    background: rgba(15, 92, 130, 0.85) !important;
    border-color: rgba(158, 212, 245, 0.75) !important;
    color: #ffffff !important;
}

/* 导航「联系我们」CTA：深青底白字（#0f5c82 对白字 7.31:1，原 #1a759f 仅 2.24:1） */
.nav-link.btn-primary,
a.nav-link.btn-primary {
    background: #0f5c82 !important;
    color: #ffffff !important;
}
.nav-link.btn-primary:hover,
.nav-link.btn-primary:focus {
    background: #0c4d6d !important;
    color: #ffffff !important;
}

/* ---------- 2. 首页 Hero（深底 #0a0e17/#050a14） ---------- */

/* 主 CTA：加深青绿底，白字 5.52:1（原 silk-teal 渐变停点 #3da894 仅 2.91:1）
   选择器特异性对齐 v10-visual.css 的 .hero .hero-actions a.btn-primary.btn-primary (0,4,1) */
.hero .hero-actions a.btn-primary.btn-primary,
.hero .btn-primary,
.hero a.btn-primary {
    background: #0b7668 !important;
    color: #ffffff !important;
    border-color: #0b7668 !important;
}
.hero .hero-actions a.btn-primary.btn-primary:hover,
.hero .hero-actions a.btn-primary.btn-primary:focus,
.hero .btn-primary:hover,
.hero .btn-primary:focus {
    background: #0a6e61 !important;
    color: #ffffff !important;
}

/* 次 CTA「在线演示」：浅蓝字 + 半透明深底描边（原 mystic-gold 深蓝字 1.68:1） */
.hero .hero-actions a.btn-outline.btn-outline,
.hero .btn-outline,
.hero a.btn-outline {
    color: #cfe3f5 !important;
    background: rgba(13, 27, 42, 0.42) !important;
    border: 1px solid rgba(125, 211, 252, 0.55) !important;
}
.hero .hero-actions a.btn-outline.btn-outline:hover,
.hero .hero-actions a.btn-outline.btn-outline:focus,
.hero .btn-outline:hover,
.hero .btn-outline:focus {
    color: #ffffff !important;
    background: rgba(15, 92, 130, 0.55) !important;
    border-color: #9ed4f5 !important;
}
/* 子元素（既有规则 .btn-outline > * / .btn-outline span 给深蓝字） */
.hero .btn-outline > *,
.hero .btn-outline span,
.hero .hero-actions a.btn-outline.btn-outline span {
    color: #cfe3f5 !important;
}

/* 「向下滚动」提示：浅石板色 8.7:1（原 #64748b 仅 4.06:1） */
.hero .scroll-text {
    color: #9fb0c4 !important;
}

/* 标题渐变字「智梭 AI 智造」：最暗停点 #62b6e8 在深底上 8.62:1（原渐变停点 2.65:1） */
.hero .gradient-tech {
    background: linear-gradient(135deg, #62b6e8 0%, #9ad4f5 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #62b6e8 !important;
}

/* ---------- 3. NO.34 深色区块被浅色主题规则刷浅的修复 ----------
   style.css 偶数节规则 body>section:not(.hero):nth-of-type(even)
   与 v10-visual.css 的 section.news 浅色规则特异性 (0,2,2) 且 !important，
   压制了 .n34-proof/.n34-news-mini 的深色设计，导致青色/象牙色文字
   落在 #f8fafc 浅底上（1.0~2.0:1）。此处以同等特异性、后加载恢复深底。 */

body > section.n34-proof.n34-proof {
    background: linear-gradient(180deg, #0b1626 0%, #0d2036 100%) !important;
}
body > section.n34-news-mini {
    background: #0f172a !important;
}
/* 浅色主题规则曾把区块默认字色改为深色，恢复为深色表面的浅色基调 */
body > section.n34-proof.n34-proof,
body > section.n34-news-mini {
    color: #dbe7f3 !important;
}
body > section.n34-news-mini .n34-nm-head h2,
body > section.n34-news-mini h2 {
    color: #f2f8ff !important;
}

/* ---------- 4. 卡片 CTA（/products 等列表页） ---------- */

/* card-foot 蓝绿渐变底（pages.css 1573）被 1938 的灰字规则覆盖 → 灰字蓝底 1.32:1。
   同特异性恢复白字；渐变末停 #0ea390 对 14.5px/700 大字为 3.15:1，满足大字 3:1。 */
.section .cards-grid .card .card-foot,
.section .cards-grid-2 .card .card-foot {
    color: #ffffff !important;
}

/* 金色卡片 CTA：原渐变末停 #f59e0b 白字仅 2.15:1（大字阈值 3:1），改深琥珀底 5.02:1 */
.section .cards-grid .card.card-gold .btn-primary,
.section .cards-grid-2 .card.card-gold .btn-primary,
.card.card-gold .btn-primary {
    background: #b45309 !important;
    color: #ffffff !important;
}
.section .cards-grid .card.card-gold .btn-primary:hover,
.section .cards-grid-2 .card.card-gold .btn-primary:hover,
.card.card-gold .btn-primary:hover {
    background: #92400e !important;
    color: #ffffff !important;
}

/* ---------- 5. 内页通用（浅底页面 .page-main） ---------- */

/* stat-number 原取 --primary:#00d4ff，浅底白卡上仅 1.77:1（大字 32px 阈值 3:1）。
   hero/深色区块自带 !important 规则，不受此规则影响。 */
.page-main .stat-number {
    color: #0f5c82 !important;
}

/* 序号圆标 feature-icon：内联渐变各停点白字不达标
   （#0ea390=3.15 / #f59e0b=2.15 / #ec4899=3.53），整体换深停点，全部 ≥4.5:1 */
.page-main .feature-icon[style*="#165ae8"] {
    background: linear-gradient(135deg, #0f5c82, #0a6e61) !important;
    color: #ffffff !important;
}
.page-main .feature-icon[style*="#f59e0b"] {
    background: linear-gradient(135deg, #b45309, #b91c1c) !important;
    color: #ffffff !important;
}
.page-main .feature-icon[style*="#8b5cf6"] {
    background: linear-gradient(135deg, #6d28d9, #be185d) !important;
    color: #ffffff !important;
}

/* compliance-note 基础样式是深面浅字（pages.css 1410），浅底内联变体需深字 */
.compliance-note[style*="rgba(22,90,232,.04)"] {
    color: #334155 !important;
}
.compliance-note[style*="rgba(22,90,232,.04)"] b {
    color: #1e3a5f !important;
}

/* n34 深蓝看板内无类裸 span 继承全局深字（#1f2937 on #0c2749 = 1.02:1） */
.n34-dash-wrap {
    color: #dbe7f3;
}
.n34-dash-wrap figcaption {
    color: #9fb0c4;
}
/* 面板单位 11.5px：#7f9abf on #193353 = 4.44:1，提到 5.78:1 */
.n34-panel-unit {
    color: #9fb0c4;
}

/* ---------- 6. 浅底长页 FAQ 手风琴 / 合规小字（pages.css 原按深面配色） ---------- */

/* FAQ 条目实际渲染在白卡上（页面内联样式），但 pages.css 1386 给了深面浅字
   rgba(200,214,236,.9) → 白底 1.35:1；统一浅底主题 */
.page-main .faq-item {
    background: #ffffff !important;
    border-color: #e5e9f2 !important;
}
.page-main .faq-item p {
    color: #4a5775 !important;
}
.page-main .faq-item .faq-q {
    background: rgba(22, 90, 232, .12) !important;
    color: #0f5c82 !important;
}

/* compliance-note 基础样式为深面浅字（pages.css 1410），浅底长页统一改浅底深字 */
.page-main .compliance-note {
    background: #f6f8fe !important;
    border-color: #c7d8ec !important;
    color: #334155 !important;
}
.page-main .compliance-note b {
    color: #1e3a5f !important;
}

/* card-foot 内裸 <a> 内联 #165ae8 蓝字落在蓝绿渐变底上（1.00:1），统一白字。
   智改方案页的 card-foot 带各色内联文字色（内联 !important 才可压）。 */
.card .card-foot,
.card .card-foot * {
    color: #ffffff !important;
}

/* ---------- 7. 浅底页青色链接/标签（--primary:#00d4ff 为深底设计） ---------- */
.page-main .news-link,
.page-main .case-industry {
    color: #0f5c82 !important;
}
/* 新闻筛选激活钮：原 #165ae8→#0ea390 渐变，13px 常规字末停 3.15:1（需 4.5） */
.news-filter-btn.active {
    background: #0f5c82 !important;
    color: #ffffff !important;
}
/* 案例指标 chip / 价值标签：#fbbf24 金在浅金底上仅 1.49:1 */
.page-main .case-metric,
.page-main .case-metric strong,
.page-main .spec-tag.value-tag {
    color: #92400e !important;
}
/* 技术路线时间轴 stat 数字：--tlc 常被内联置为 #f59e0b，22px/800 大字仍不足 3:1 */
.page-main .tech-layer .tl-stat b {
    color: #b45309 !important;
}

/* 区块快照（DB 中旧 HTML）内联强调色在白底上不达标：属性选择器直接改深 */
.page-main [style*="color:#0ea390"],
.page-main [style*="color: #0ea390"] {
    color: #0a6e61 !important;
}
.page-main [style*="color:#f59e0b"],
.page-main [style*="color: #f59e0b"] {
    color: #b45309 !important;
}
.page-main [style*="color:#8b5cf6"],
.page-main [style*="color: #8b5cf6"] {
    color: #6d28d9 !important;
}

/* 渐变表头行内的单元格：.spec-table .table-header 的 #eff6ff 不透明底盖住父行渐变，
   白字消失（1.09:1）；渐变行内改透明底透出渐变 */
.page-main .table-row[style*="linear-gradient"] .table-header {
    background: transparent !important;
    color: #ffffff !important;
}

/* ---------- 8. 移动端防溢出兜底（C 类静态审计，无 Chrome 环境） ---------- */
/* 区块引擎参数表：宽表容器内横滚，不撑破页面 */
.pb-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.pb-table { min-width: 480px; }
/* 区块内媒体一律不超出容器 */
.page-main img,
.page-main video,
.page-main canvas,
.page-main svg { max-width: 100%; }
/* 长 URL/代码段不撑破 */
.page-main p, .page-main li, .page-main td, .page-main th { overflow-wrap: anywhere; }
