/* SRI 排版底座 · 统一真源（2026-10-09 鼎 · Egbertie 点名「孤儿行」系统整改）
 * 机检（链接/API/JS）全绿 ≠ 排版合格。本文件用 CSS 一次性修 3 类全站性排版缺陷：
 * ① 孤字末行（widow/orphan）→ text-wrap: pretty（Chromium 117+；其余浏览器渐进降级）
 * ② 断头标题（标题被挤在块尾、内容在下一块）→ break-after: avoid + 标题与首段不分离
 * ③ 卡片不等高 → 卡片撑满行高、底部对齐
 * 引用方式：各页 <head> 内 <link rel="stylesheet" href="/v4/assets/css/sri-typography.css">
 */
:root { --sri-pretty: pretty; }

/* ① 孤字末行：中文段落末行只剩一两个字 —— 平衡断行 */
p, li, dd, blockquote, .pillar p, .card p, .sri-card p {
  text-wrap: pretty;   /* 字面值（var 在部分 Chromium 版本对 text-wrap 不生效）*/
  orphans: 2;
  widows: 2;
  line-break: strict;      /* 中文禁则：避免标点被挤到下一行首 */
  word-break: normal;
  overflow-wrap: break-word;
}

/* ② 断头标题：标题后不分页/不分栏，且首段紧跟 */
h1, h2, h3, h4, .section-title, .sec h2 {
  break-after: avoid;
  page-break-after: avoid;
  text-wrap: balance;      /* 标题自身多行时平衡，避免标题末尾孤字 */
}
h2 + p, h3 + p, .section-title + p { margin-top: 0.4em; }

/* ③ 卡片等高：同排卡片撑满、内容与底部对齐 */
.sri-card, .pillar, .card, .kpi-card, [class*="card"] {
  height: 100%;
  box-sizing: border-box;
}
.sri-grid, .sri-grid-3, .pillars, [class*="grid"] { align-items: stretch; }
/* 卡片类别名齐全（pillar/kpi/box 等不叫 *card* 的容器同样撑平） */
.pillar, .kpi-card, .sri-card, .p-card, .feature, .box { height: 100%; display: flex; flex-direction: column; }
.pillar p, .sri-card p { flex: 1 0 auto; }

/* 表格/长串：避免撑破容器 */
table { table-layout: auto; }
td, th { overflow-wrap: anywhere; }

/* ═══ 2026-10-11 全站移动体验（入口整体优化 A组·Egbertie 拍板）═══ */
@media (max-width: 768px) {
  /* A1 触控目标 ≥44px（Apple HIG）：导航/页脚/按钮类 */
  nav a, header a, footer a, [class*="nav"] a, [class*="menu"] a, [class*="Nav"] a,
  button, [role="button"], input[type="button"], input[type="submit"],
  .btn, [class*="btn"], [class*="button"], [class*="cta"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  /* A2 首屏定位行（菜单场景第一眼看清"这是什么"） */
  .loc-line {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: #7A5334;
    background: rgba(139, 69, 19, 0.07);
    border-left: 3px solid #8B4513;
    padding: 5px 12px;
    margin-bottom: 12px;
    border-radius: 0 4px 4px 0;
  }
}
