/* qt.z01.css — 详情页宽表格在手机上的横向滚动（2026-11-20）
 *
 * 背景：指南里从 PDF 还原的表格列数可到 6～8 列
 *       （如《中国糖尿病防治指南（2024版）》表1：调查年份/人数/年龄/患病率/IGT/筛选方法），
 *       .qt-table 只有 width:100%，列被挤窄后长文本格撑成十几行，最右列还被裁出可视区。
 * 做法：
 *   1) 容器 .qt 允许横向滚动 —— 表不超宽就不滚，窄表零影响；
 *   2) 只有打了 .wide 类（数据里 tables[i].cls = "wide"）的表才 nowrap，
 *      让行保持紧凑、靠左右滑动看其余列。既有表格（疾病诊疗要点等）不受影响。
 *   3) 桌面端（≥900px）列宽足够，还原成正常换行。
 */

.qt {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.qt-table.wide th,
.qt-table.wide td {
  white-space: nowrap;
}

@media (min-width: 900px) {
  .qt { overflow-x: visible; }
  .qt-table.wide th,
  .qt-table.wide td { white-space: normal; }
}

.qt-table.tight td,.qt-table.tight th{white-space:nowrap}
.qt-table.tight td{text-align:center}
.qt-table.tight td:first-child,.qt-table.tight th:first-child{text-align:left}
.qt-table.tight th{text-align:center}
.qt-table.tight th:first-child{text-align:left}

/* 宽表：首列限宽换行，其余列 nowrap，减少横滑距离 */
.qt-table.wide th:first-child,
.qt-table.wide td:first-child {
  white-space: normal;
  min-width: 92px;
  max-width: 132px;
}
.qt-table.wide { width: auto; min-width: 100%; }

/* ── 2026-11-21 (Z273)：等宽换行表 .fit ─────────────────────────
 * 场景：卫健委《罕见病诊疗指南（2019年版）》这类三线表，3 列全是长句
 *       （典型UIP型 / 可能UIP型 / 不符合UIP型 各是一条判定标准）。
 *       之前走 .wide（nowrap + 首列 max-width:132px），手机 414px 下
 *       第三列直接被推出可视区，首列还被挤成竖排。
 * 做法：固定表格布局 + 宽度 100%，列宽自动平分，单元格强制换行 ——
 *       永不横向溢出，任何列都看得见。PC 端同样适用（容器更宽，列更松）。
 */
.qt-table.fit {
  width: 100%;
  table-layout: fixed;
}
.qt-table.fit th,
.qt-table.fit td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

/* ── 2026-11-21 (Z275)：三列「短-长-中」推荐意见表 .rec ─────────────
 * 场景：指南的循证推荐意见表（环节 / 推荐意见 / 推荐强度·证据级别）。
 *       直接套 .fit 时，table-layout:fixed 无 colgroup 会按「表头字数」分列宽，
 *       结果「推荐意见」列只分到 ~110px，13px 字号下每行仅 3～4 字，手机上像竖条。
 * 做法：显式按 22% / 48% / 30% 分配，单元格强制换行。
 */
.qt-table.rec {
  width: 100%;
  table-layout: fixed;
}
.qt-table.rec th,
.qt-table.rec td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.qt-table.rec th:nth-child(1), .qt-table.rec td:nth-child(1) { width: 22%; }
.qt-table.rec th:nth-child(2), .qt-table.rec td:nth-child(2) { width: 48%; }
.qt-table.rec th:nth-child(3), .qt-table.rec td:nth-child(3) { width: 30%; }
