/*!
 * 适老化（关怀版）专用样式 —— 整页等比放大 + 页面扁平化
 * ------------------------------------------------------------------
 * 整改问题：适老化问题1（PC端）：适老化功能下，未见页面扁平化设计，
 *           字体大小未见变化。
 *           （依据：《互联网网站适老化通用设计规范》—— 页面布局应依照
 *            扁平化原则，避免阴影、透视、纹理等复杂装饰设计；适老化
 *            网页应提供大字号支持。）
 * ------------------------------------------------------------------
 * 触发机制：点击页面上的“关怀版”入口时，由 js/a11y.js 为 <body> 添加
 *           useOldFixed 类；本文件全部规则均以 body.useOldFixed 为前缀，
 *           仅在关怀版开启时生效，不影响正常模式。
 *           （若平台侧日后开启适老化配置，上海无障碍 SDK 也会添加同一个
 *            类，两种来源效果一致、幂等。）
 * ------------------------------------------------------------------
 * 放大实现：与页面无障碍工具条自带的“放大”按钮完全一致 ——
 *           上海无障碍 SDK 的放大就是给 body 加 `zoom: 倍数`
 *           （aria.js 中的原始写法：
 *                t += "body {"; t += "zoom:" + e + " !important;"; t += "}"
 *            e 即缩放倍数，工具条里按 0.1 递增）。
 *           因此这里是整页等比放大：文字、图片、图标、间距一起变大，
 *           版式比例与放大前完全一致。
 *           倍率取 1.25（工具条放大一级为 1.1，可按需调整下方数值）。
 *
 *           注：模板正文基准字号只有 12px（css/base.css 中
 *           `body,p { font: 12px/1 … }`），等比放大 1.25 倍后约 15px，
 *           仍达不到《规范》建议的正文 20px，故下面第二段额外设置了
 *           正文最小字号 16px（×1.25 ≈ 20px），二者叠加后既保持整页
 *           等比放大，又满足大字号要求。
 * ------------------------------------------------------------------
 * 安全边界：为避免破坏页面原有功能，以下内容刻意不做处理 ——
 *           · 页头 / 页脚 / 按钮的图片背景（校徽 logo 由 #header 的
 *             head.jpg 承载、搜索按钮由 search.png 承载，一律保留）
 *           · transform / animation（轮播 sudyslide、下拉与侧边栏动画
 *             依赖它们；本文件用 zoom 而非 transform 做放大，正是为了
 *             不影响这些 JS 动画）
 */

/* =========================================================
 * 一、整页等比放大（与无障碍工具条的“放大”同一实现）
 * ========================================================= */
body.useOldFixed {
    zoom: 1.25 !important;
    -moz-transform-origin: top;
    -moz-transform: scale(1.25);   /* 旧版 Firefox 兜底（现代版本已支持 zoom） */
}

/* 模板原本设了 html{overflow-x:hidden}（见 css/base.css），等比放大后
   超出版心的部分会被直接裁掉，这里放开横向滚动，行为与浏览器缩放一致；
   js/a11y.js 会在放大后把横向滚动位置自动居中。不支持 :has() 的旧浏览器
   会退化为原有行为，不影响正常模式。 */
html:has(body.useOldFixed) {
    overflow-x: auto !important;
}

/* =========================================================
 * 二、正文最小字号兜底（等比放大后达到 20px 以上）
 *    仅 PC 端生效，避免影响 WAP 布局
 * ========================================================= */
@media (min-width: 768px) {

    body.useOldFixed p,
    body.useOldFixed li,
    body.useOldFixed dd,
    body.useOldFixed dt,
    body.useOldFixed td,
    body.useOldFixed th,
    body.useOldFixed .news_list li a,
    body.useOldFixed .news_list li span {
        font-size: 16px !important;   /* ×1.25 ≈ 20px */
        line-height: 1.8 !important;
    }

    /* 标题同步抬高下限，层级关系保持不变 */
    body.useOldFixed h1 { font-size: 30px !important; line-height: 1.5 !important; }
    body.useOldFixed h2 { font-size: 26px !important; line-height: 1.5 !important; }
    body.useOldFixed h3,
    body.useOldFixed h4 { font-size: 22px !important; line-height: 1.5 !important; }
}

/* =========================================================
 * 三、扁平化：去阴影、去圆角、去容器装饰
 * ========================================================= */

/* 1. 阴影与文字阴影全部去除 —— 扁平化最核心的视觉变化 */
body.useOldFixed *:not([class*="aria"]):not([id*="aria"]),
body.useOldFixed *:not([class*="aria"]):not([id*="aria"])::before,
body.useOldFixed *:not([class*="aria"]):not([id*="aria"])::after {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* 2. 圆角统一直角化，去装饰感 */
body.useOldFixed *:not([class*="aria"]):not([id*="aria"]),
body.useOldFixed *:not([class*="aria"]):not([id*="aria"]) img {
    border-radius: 0 !important;
}

/* 3. 正文区域的容器改为纯色底，去掉渐变 / 纹理背景
 *    只作用于内容容器，不涉及页头、页脚与功能按钮的图片背景 */
body.useOldFixed .post,
body.useOldFixed .mbox,
body.useOldFixed .tt,
body.useOldFixed .news_list,
body.useOldFixed .news_list li {
    background-image: none !important;
    background-color: #ffffff !important;
}

/* 4. 列表项之间用清晰的分割线区分，替代阴影与卡片质感 */
body.useOldFixed .news_list li {
    border-bottom: 1px solid #e6e6e6 !important;
}
