/* =====================================================================
 * Aiterich Design System (Production) — T-WEBSITE-DESIGN-SYSTEM-PRODUCTION-CUTOVER-AUTH-V1
 * Date: 2026-06-28 | Scope: production www.aiterich.com | Front-end CSS only.
 * 规则体与 staging 验证版逐字一致(staging CSS SHA 4c38b922…),仅本头注释不同。
 * 冻结 10 token 落地 + 站点框架级 owner 归一化 + 旧协调层 #2f6fcf 口径统一(变量覆盖)。
 * 0 DB write / 0 logic / 0 template / 0 contract touch.
 * 协同既有 aiterich-ui-harmonization(prod,priority 99):本层 priority 100 重声明
 *   --aih-* 变量把 auth/download 主蓝 #2f6fcf → #1F3A4D,不改 harmonization 文件。
 * 生产 widget ID 已只读核验 == staging(服务标题 cc435b8/a95ce8b/928c588/4c86771;
 *   页脚标题 a225544/02c133c/6d0621e/740d1d1)。
 * Rollback = 删除本 .css 与同名 .php mu-plugin 或 define('AITERICH_DS_DISABLE',true)。
 * ===================================================================== */

:root {
	--ank-ink:           #1A1F26; /* 主文字/大标题 */
	--ank-primary:       #1F3A4D; /* 主色/Header/主按钮 */
	--ank-primary-hover: #0E2233; /* 主按钮 hover = 深底 */
	--ank-bg:            #FFFFFF;
	--ank-bg-soft:       #F5F7FA; /* 分区/表头/tab idle */
	--ank-border:        #D9E1EA;
	--ank-accent:        #C84630; /* 安锐红,强 CTA,≤10% */
	--ank-accent-hover:  #A93724;
	--ank-data:          #176B8A; /* 数据/链接 hover */
	--ank-dark:          #0E2233;
	--ank-text:          #4B5563;
	--ank-text-weak:     #6B7280;
	--ank-radius:        6px;
	--ank-font: "Inter", "Noto Sans SC", "思源黑体", "Microsoft YaHei", Arial, system-ui, sans-serif;
}

/* ---------------------------------------------------------------------
 * 1. 字体统一(决策 A · 零依赖) — 消除 Roboto/系统栈漂移。
 *    仅作用文本容器,不触图标字体(eicon/n2-icon/fa)。
 * ------------------------------------------------------------------- */
body,
.hfe-nav-menu, .hfe-menu-item,
.elementor-widget-container, .elementor-heading-title, .elementor-button,
button, input, select, textarea {
	font-family: var(--ank-font);
}

/* ---------------------------------------------------------------------
 * 2. 页眉导航(owner A) — 写死蓝 #1958E4 → token。当前项/ hover 收口。
 * ------------------------------------------------------------------- */
.hfe-nav-menu .hfe-menu-item,
.hfe-nav-menu .hfe-menu-item:link,
.hfe-nav-menu .hfe-menu-item:visited {
	color: var(--ank-primary) !important;
}
.hfe-nav-menu .hfe-menu-item:hover,
.hfe-nav-menu .current-menu-item > .hfe-menu-item,
.hfe-nav-menu .current-menu-ancestor > .hfe-menu-item,
.hfe-nav-menu .menu-item-has-children:hover > .hfe-menu-item {
	color: var(--ank-data) !important;
}
.hfe-nav-menu a.hfe-menu-item {
	font-family: var(--ank-font) !important;
}

/* ---------------------------------------------------------------------
 * 3. 圆角统一 6px(框架级按钮)。
 * ------------------------------------------------------------------- */
.elementor-button,
.wpforms-submit,
.aiterich-header-search-panel-v76__submit,
.hero-source-cta-link,
.hfe-search-submit {
	border-radius: var(--ank-radius) !important;
}

/* ---------------------------------------------------------------------
 * 4. Elementor 按钮(owner C) — 仅重着色"已有内联背景"的填充按钮,
 *    文本/链接型按钮(无内联背景)只改文字色,避免把文本按钮变填充。
 * ------------------------------------------------------------------- */
a.elementor-button[style*="background-color"],
.elementor-button.elementor-size-sm[style*="background-color"] {
	background-color: var(--ank-primary) !important;
	border-color: var(--ank-primary) !important;
	color: #ffffff !important;
}
a.elementor-button[style*="background-color"]:hover {
	background-color: var(--ank-primary-hover) !important;
}

/* 4b. 产品卡填充按钮(经 Elementor 生成 CSS 上色 #268DCB,统一带 .elementor-animation-pulse)
 *     → token 主按钮;并移除规范 07 §4 禁用的脉冲动画。判别干净,不误伤文本型按钮。 */
.elementor-button.elementor-animation-pulse {
	background-color: var(--ank-primary) !important;
	border-color: var(--ank-primary) !important;
	color: #ffffff !important;
}
.elementor-button.elementor-animation-pulse:hover,
.elementor-button.elementor-animation-pulse:focus {
	background-color: var(--ank-primary-hover) !important;
	animation: none !important;
	transform: none !important;
}

/* ---------------------------------------------------------------------
 * 5. Smart Slider 首页 Hero CTA(owner B) — #357CBD → token 主按钮。
 * ------------------------------------------------------------------- */
.hero-source-cta-link {
	background-color: var(--ank-primary) !important;
	color: #ffffff !important;
}
.hero-source-cta-link:hover {
	background-color: var(--ank-primary-hover) !important;
	color: #ffffff !important;
}

/* ---------------------------------------------------------------------
 * 6. 页眉搜索提交(owner E) — #0068B7 → token；HFE 搜索(owner) 同。
 * ------------------------------------------------------------------- */
.aiterich-header-search-panel-v76__submit,
.hfe-search-submit {
	background-color: var(--ank-primary) !important;
	color: #ffffff !important;
}
.aiterich-header-search-panel-v76__submit:hover,
.hfe-search-submit:hover {
	background-color: var(--ank-primary-hover) !important;
}

/* ---------------------------------------------------------------------
 * 7. WPForms 提交(owner D) — 主操作 = 主色 #1F3A4D(与全站主按钮统一)。
 *    安锐红按规范仅限关键位置/不得普遍铺设,故提交按钮不用红。
 *    仅样式,不动表单字段/动作/查询参数。
 * ------------------------------------------------------------------- */
.wpforms-submit {
	background-color: var(--ank-primary) !important;
	border-color: var(--ank-primary) !important;
	color: #ffffff !important;
}
.wpforms-submit:hover {
	background-color: var(--ank-primary-hover) !important;
	border-color: var(--ank-primary-hover) !important;
}

/* ---------------------------------------------------------------------
 * 8. Elementor 嵌套产品 tab 芯片(owner H) — 杂灰 #969796/#F1F2F3 → token。
 * ------------------------------------------------------------------- */
.e-n-tab-title {
	background-color: var(--ank-bg-soft) !important;
	color: var(--ank-ink) !important;
	border-radius: var(--ank-radius) !important;
}
.e-n-tab-title[aria-selected="true"],
.e-n-tab-title.e-active {
	background-color: var(--ank-primary) !important;
	color: #ffffff !important;
}

/* ---------------------------------------------------------------------
 * 9. Astra skip-link(owner H) — 杂蓝 → token。SR-only,不影响版面。
 * ------------------------------------------------------------------- */
.skip-link.screen-reader-text:focus {
	color: var(--ank-primary) !important;
}

/* =====================================================================
 * ITERATION 2 (2026-06-28) — 残留收口 + 旧协调层口径统一(CEO 裁定)
 * ===================================================================== */

/* 10. 旧协调层口径统一 — 既有 aiterich-ui-harmonization-staging 的 #2f6fcf 主蓝
 *     → 冻结 token。仅重声明其 CSS 变量(本层 priority 100 > 其 99,后者后声明胜),
 *     不改其文件,回滚=删本层即恢复。 */
:root {
	--aih-primary:           #1F3A4D;
	--aih-primary-hover:     #0E2233;
	--aih-primary-soft-bg:   #F5F7FA;
	--aih-primary-soft-bord: #D9E1EA;
	--aih-focus-ring:        0 0 0 3px rgba(31, 58, 77, 0.14);
	--aih-input-border-fc:   #176B8A;
}

/* 11. Astra 全局链接色 #046BD2 → token(页脚链接/服务标题/产品卡标题链接)。
 *     无 !important,按钮/导航/白字等更具体规则自动保留,避免覆盖白字链接。 */
a {
	color: var(--ank-primary);
}
a:hover,
a:focus {
	color: var(--ank-data);
}
.elementor-heading-title a {
	color: var(--ank-primary);
}

/* 12. 文本型 Elementor 按钮(无填充/无 pulse,#1958E4 文字) → token 文字色。
 *     :not 排除 pulse 与内联背景填充按钮,避免暗字不可见。 */
.elementor-button.elementor-button-link:not(.elementor-animation-pulse):not([style*="background-color"]) {
	color: var(--ank-primary) !important;
}
.elementor-button.elementor-button-link:not(.elementor-animation-pulse):not([style*="background-color"]):hover {
	color: var(--ank-data) !important;
}

/* 13. 首页"服务内容"4 个标题(方案设计/监测设备/技术支持/科研合作)直接设在 h2 上的
 *     #046BD2 → token ink。按 widget ID 精确 scope,不误伤深底白色卡片标题。 */
.elementor-element-cc435b8 .elementor-heading-title,
.elementor-element-a95ce8b .elementor-heading-title,
.elementor-element-928c588 .elementor-heading-title,
.elementor-element-4c86771 .elementor-heading-title {
	color: var(--ank-ink) !important;
}

/* 14. 页脚 4 列标题(产品中心/解决方案/技术中心/关于安锐)= 文本编辑器组件,
 *     内联 <span style="color:#3366ff"> → token 主色。按 4 个文本组件 widget ID
 *     精确 scope,!important 压过非-important 内联色;全站唯一 #3366FF 不误伤。 */
.elementor-element-a225544 .elementor-widget-container [style*="color"],
.elementor-element-02c133c .elementor-widget-container [style*="color"],
.elementor-element-6d0621e .elementor-widget-container [style*="color"],
.elementor-element-740d1d1 .elementor-widget-container [style*="color"] {
	color: var(--ank-primary) !important;
}

/* 15. 登录壳次级 tab(密码登录/验证码登录)激活态残蓝 #3B82F6 → token。 */
.aiterich-tab.active {
	color: var(--ank-primary) !important;
	border-bottom-color: var(--ank-primary) !important;
}

/* 16. 页脚容器暗线 — box-shadow rgba(0,0,0,.5) 0 0 10px(与页眉同款偏重)→
 *     减淡为近乎不可见的细投影,弱化页脚上方那条暗线(同页眉 darkline-refine 方案)。 */
.elementor-element-3497d20 {
	box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* =====================================================================
 * PHASE 2（2026-06-28）— 视觉对比度 WCAG AA 修复（明确安全项）
 * 系统性正文灰 #7A7A7A(Elementor 全局文字色默认,略低 AA)留待 Kit 全局色子项,
 *   不在此 CSS 广覆盖以免误伤深底白字。
 * ===================================================================== */

/* 17a. 页脚备案号 #999/#EEE(对比 2.46<4.5)→ token 正文色(达 AA)。widget 6dc1c93。 */
.elementor-element-6dc1c93,
.elementor-element-6dc1c93 * {
	color: var(--ank-text) !important;
}

/* 17b. /download/「联系我们」按钮:深字压自带蓝底 #1A5DAD(对比 1.81)→ 白字(达 AA)。
 *      该页仅 1 个 /contact/ 链接,page-id scope 安全;修我此前全局 a{color} 的副作用。 */
body.page-id-7522 a[href*="/contact/"] {
	color: #ffffff !important;
}

/* 18. Elementor text-editor 默认文字 #7A7A7A(略低 AA)→ token 正文色。
 *    staging 已验证:7 页 text-editor 不可见扫描 0 误伤、通用不可见 0;深底白字未破。 */
.elementor-widget-text-editor,
.elementor-widget-text-editor p,
.elementor-widget-text-editor li {
	color: var(--ank-text);
}

/* 19. 招牌安锐红强 CTA(规范 ≤10%,仅首屏关键位置)——首屏 Hero 唯二"直接留资"CTA:
 *     「提交方案需求」(#wpforms-1546)+「申请平台演示」(/contact/) → 安锐红;
 *     其余「查看产品中心/下载/获取资料」保持 token 主色蓝(次级)。按 href 精确定位,不铺设。 */
.hero-source-cta-link[href*="wpforms"],
.hero-source-cta-link[href*="/contact/"] {
	background-color: var(--ank-accent) !important;
	border-color: var(--ank-accent) !important;
	color: #ffffff !important;
}
.hero-source-cta-link[href*="wpforms"]:hover,
.hero-source-cta-link[href*="/contact/"]:hover {
	background-color: var(--ank-accent-hover) !important;
	border-color: var(--ank-accent-hover) !important;
}

/* 20. 移动端横向溢出修复 —— 非首页共用容器 .elementor-element-004a6dd(桌面 width:350+margin-left:103)
 *     + 主题文章容器 4ever-article(桌面 width:402)未做移动适配 → 390 视口撑出横向滚动。
 *     仅移动端(≤767px)放开自适应 + overflow-x 兜底;桌面不受影响。 */
@media (max-width: 767px) {
	.elementor-element-004a6dd {
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	/* 类名以数字开头,CSS 须用属性选择器(.4ever-article 无效)。 */
	[class~="4ever-article"] {
		width: auto !important;
		max-width: 100% !important;
	}
	html,
	body {
		overflow-x: hidden !important;
	}
}
