/* ===== GWD-FONT-BEGIN =====
 * 龚文道体 · 站点字体样式（自研字体，规避第三方字库商业风险）
 * 版权：四川国富民强文化传播有限公司 / 设计：龚文道
 * 基底 Source Han Sans（Apache-2.0，允许商用与修改），已做实质性字形原创重构
 * 绝对路径：页面路由不在 /fonts 下时，相对路径会 404 导致字体静默回退
 * !important：inline style 属 author 普通声明，author !important 可覆盖之
 ===== GWD-FONT-END ===== */

@font-face{font-family:"龚文道体";src:url("/fonts/dqnrh/GongWenDaoTitle-Bold.woff2") format("woff2");font-weight:700 900;font-style:normal;font-display:swap}
@font-face{font-family:"龚文道体";src:url("/fonts/dqnrh/GongWenDaoSub-Medium.woff2") format("woff2");font-weight:450 699;font-style:normal;font-display:swap}
@font-face{font-family:"龚文道体";src:url("/fonts/dqnrh/GongWenDaoText-Regular.woff2") format("woff2");font-weight:100 449;font-style:normal;font-display:swap}
@font-face{font-family:"GongWenDao Title";src:url("/fonts/dqnrh/GongWenDaoTitle-Bold.woff2") format("woff2");font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:"GongWenDao Sub";src:url("/fonts/dqnrh/GongWenDaoSub-Medium.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"GongWenDao Text";src:url("/fonts/dqnrh/GongWenDaoText-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}

:root{--gwd-stack:"龚文道体","GongWenDao Title","GongWenDao Sub","GongWenDao Text","Noto Sans SC",system-ui,sans-serif}
html,body{font-family:var(--gwd-stack)!important}
/* ---------- 表单控件字体继承 ----------
 * 浏览器 UA 样式对 input / button / select / textarea 直接设置 font，
 * 使这些控件不继承 html/body 的字体栈 → 回退到 UA 默认 Arial（微软字体）。
 * 此处显式声明 inherit 让其跟随站点字体；不带 !important，
 * 以便个别组件（如富文本编辑器）仍可用更具体的选择器覆盖。
 */
button,input,select,textarea,optgroup{font-family:inherit}
.gwd-title{font-family:var(--gwd-stack);font-weight:800}
.gwd-sub{font-family:var(--gwd-stack);font-weight:500}
.gwd-text{font-family:var(--gwd-stack);font-weight:400}

/* ---------- 富文本内容层兜底 ----------
 * 数据库（UEditor / 外部粘贴 HTML）里落库的 inline style 属内容数据，不应改库；
 * 此处用属性选择器 + !important 在渲染层覆盖，效果等价且完全可逆（删本段即恢复）。
 * 覆盖范围：具名商业字体（微软雅黑 / 苹方 / 黑体 / 宋体 / 仿宋 / 楷体 / Arial /
 * Helvetica / Impact / Segoe UI / Roboto / Tahoma / Verdana / Georgia /
 * Times New Roman / 方正 / 汉仪 / 思源黑体 等）
 */
[style*="YaHei"],[style*="yahei"],[style*="微软雅黑"],[style*="PingFang"],[style*="pingfang"],[style*="苹方"],[style*="SimHei"],[style*="simhei"],[style*="黑体"],[style*="SimSun"],[style*="simsun"],[style*="宋体"],[style*="FangSong"],[style*="仿宋"],[style*="FangSong_GB2312"],[style*="KaiTi"],[style*="楷体"],[style*="Helvetica"],[style*="helvetica"],[style*="Arial"],[style*="arial"],[style*="Impact"],[style*="impact"],[style*="Segoe UI"],[style*="segoe"],[style*="Roboto"],[style*="roboto"],[style*="Tahoma"],[style*="Verdana"],[style*="Georgia"],[style*="Times New Roman"],[style*="times new roman"],[style*="MS Gothic"],[style*="Meiryo"],[style*="Yu Gothic"],[style*="方正兰亭"],[style*="方正中"],[style*="汉仪"],[style*="思源黑体"],[style*="Source Han"],[style*="Noto Sans CJK"]{
  font-family:var(--gwd-stack)!important}

/* 等宽语境：商业等宽（Consolas / Courier / Menlo / Monaco / Lucida Console）
 * 替换为通用等宽族，保留代码块的等宽语义 */
[style*="Consolas"],[style*="consolas"],[style*="Courier"],[style*="courier"],[style*="Menlo"],[style*="menlo"],[style*="Monaco"],[style*="Lucida Console"],[style*="monospace"],[style*="Monospace"]{
  font-family:ui-monospace,SFMono-Regular,monospace!important}

/* ===== GWD-DEFENSE-BEGIN ===== */
/* ---------- 第三方组件防御层 ----------
 * 覆盖第三方 SDK / 插件（腾讯地图 tmap、vant、UEditor、video-js 等）自带的
 * 具名商业字体声明。这些 SDK 用 class 选择器直接声明字体，优先级高于继承，
 * 故必须用同样或更高特异性 + !important 覆盖。
 * 不改动 vendor 文件，纯渲染层覆盖，删除本段即完全恢复。
 */
[class*="tmap"],[class*="Tmap"],[class*="TMAP"],
[class*="amap"],[class*="AMap"],[class*="bmap"],[class*="BMap"],
[class*="leaflet"],[class*="vant"],[class*="van-"],
[class*="ueditor"],[class*="edui"],[class*="video-js"],[class*="vjs-"],
[class*="swiper"],[class*="layui"],[class*="element-"],[class*="el-"],
[class*="contextMenu"],[class*="wPaint"],[class*="colorpicker"]{
  font-family:var(--gwd-stack)!important}

/* 等宽语境（代码编辑器 / 文本框）保留等宽语义 */
[class*="tmap"] code,[class*="amap"] code,[class*="ueditor"] code,
[class*="edui"] code,[class*="video-js"] code,pre code,pre,samp,kbd{
  font-family:ui-monospace,SFMono-Regular,monospace!important}
/* ===== GWD-DEFENSE-END ===== */