/* 学习方法论速查手册 样式
   版式规范见 试卷生成手册.md：mm 单位、手工分页、白底黑线、可打印 */

/* ============================================================
   配色 —— 颜色是语义，不是装饰
   ------------------------------------------------------------
   唯一的判断标准：
       <b>把这个颜色抽掉，读者会少知道什么？</b>
       答不上来，就说明它是装饰，删掉。

   （曾经走过的弯路：用一个「朱色」去替换原本是黑色的核心句左条、
     口诀左条、卡片编号底色。看着像有设计，实际上信息量一点没增加——
     那些地方本来就是全卡最重的，黑色已经足够重。换成朱色纯属涂色。）

   所以颜色只给<b>有对错含义</b>的地方，其余一律黑白灰：

     红 = 错 · 易错 · 会丢分       ✗ 标签 · 小心别错 · 常见错答 · 最常漏的那一步
     绿 = 对 · 得分                ✓ 标签 · 正确答法 · 得分点

   这两个颜色抽掉，孩子就分不出「哪个是对的答法」——所以它们必须在。
   而正文、标题、核心句、口诀、编号一律<b>黑</b>：它们靠字号、字重、位置
   就已经分出了层级，不需要颜色帮忙。<b>页面以黑白为主，颜色只落在对错上。</b>

   灰阶继续做「让次要的退回去」这件事：
   「为什么是这样」故意压到 --ink-3，因为手册第 3 页写着那栏可以先跳过。
   ============================================================ */
:root {
  /* —— 语义色：只用在有对错含义的地方 —— */
  --red:      #C62828;   /* 错 · 易错 · 丢分 */
  --red-line: #E9A8A4;
  --red-wash: #FDF0EE;
  --green:    #2E7D32;   /* 对 · 得分 */
  --green-line:#A8CDAA;
  --green-wash:#EFF6EF;
  /* —— T19 学科色：编码'这张卡是哪一科'，灰度打印下信息不丢（靠左边条粗细存校内/校外信息）—— */
  --学科-语文: #8E5A3C;  /* 赭 */
  --学科-数学: #2F5D8A;  /* 靛 */
  --学科-英语: #4A7C59;  /* 苔绿 */
  /* —— 黑白灰：页面主体 —— */
  --ink:      #111;      /* 正文 */
  --ink-2:    #3A3A38;   /* 次要文字 */
  --ink-3:    #6E6E6A;   /* 更次要：可跳过的内容 */
  --rule:     #C9C9C4;   /* 细线 */
  --wash:     #F5F5F2;   /* 最浅底 */
  --wash-2:   #E9E9E4;   /* 次浅底 */
}

/* 纸面始终按浅色纸张阅读。站点深色令牌在 html:root 上特异性更高，
   因此把手册自己的黑白灰与对错色放到纸张容器，避免正文变成浅字白底。
   #源 是分页失败时显示的未分页备用内容，也使用同一套纸面色。 */
.page,
#源,
#尺 {
  color-scheme: light;
  color: var(--ink);
  --red:       #C62828;
  --red-line:  #E9A8A4;
  --red-wash:  #FDF0EE;
  --green:     #2E7D32;
  --green-line:#A8CDAA;
  --green-wash:#EFF6EF;
  --学科-语文: #8E5A3C;
  --学科-数学: #2F5D8A;
  --学科-英语: #4A7C59;
  --ink:       #111;
  --ink-2:     #3A3A38;
  --ink-3:     #6E6E6A;
  --rule:      #C9C9C4;
  --wash:      #F5F5F2;
  --wash-2:    #E9E9E4;
}

/* ============================================================
   打印版 vs 网页版
   ------------------------------------------------------------
   同一份 HTML 要出两种东西：屏幕上看，和彩打出来贴在书桌前。
   两者的物理特性不一样，所以<b>语义不变、取值要变</b>：

     · 纸上没有背光，浅灰会比屏幕上更淡。屏幕上刚好的 --ink-3（110/255）
       印出来会发虚 → 打印时加深到 90。同理细线加深。
     · 喷墨的浅色底容易偏色发脏，大面积淡底尤其明显
       → 打印时把 wash 系整体提亮，让它接近纯白，只留一点点区分。
     · 红绿在纸上（CMYK）会比屏幕（RGB）暗一档、灰一档
       → 打印时把红绿各提亮提饱和一点，印出来才接近屏幕观感。
     · 屏幕不吃墨，可以用稍重的底色做分区；纸吃墨，就靠线条。

   ⚠️ 只调颜色取值，<b>不改语义</b>：红永远是错、绿永远是对。
   ============================================================ */
@media print {
  .page,
  #源 {
    --red:      #D32F2F;   /* 提亮，抵消 CMYK 转换后的压暗 */
    --red-line: #E5A5A2;
    --red-wash: #FDF4F3;   /* 更接近白，避免喷墨大面积浅红发脏 */
    --green:    #2E7D32;   /* 保持普通文字在白纸上的 4.5:1 对比度 */
    --green-line:#A9CFAB;
    --green-wash:#F3F9F3;
    --ink-3:    #5A5A56;   /* 纸上没有背光，浅灰要加深才不发虚 */
    --rule:     #B4B4AE;   /* 细线加深，否则印出来可能断断续续 */
    --wash:     #F8F8F6;
    --wash-2:   #EFEFEA;
    /* T19：纸上比屏幕提亮一档，低饱和避免喷墨大面积发脏 */
    --学科-语文: #9B6A4A;
    --学科-数学: #3A6390;
    --学科-英语: #558566;
  }
  /* 预览页外壳的阴影和灰底不打印 */
  body { background:#fff !important; padding:0 !important; }
}

/* A4几何和打印规则由本文件末尾工作台样式统一管理。 */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { background:#fff; }
body {
  font-family:"Songti SC","STSong","SimSun",serif;
  font-size:9.4pt; color:#000; line-height:1.6;
  -webkit-print-color-adjust:exact; print-color-adjust:exact;
}
/* ============================================================
   T19：书口色带 —— 合上书从侧面看颜色就知道是哪个学科
   ============================================================ */
.page { position:relative; }
.page::after { content:""; position:absolute; right:0; top:0; bottom:0; width:4mm; }
.page[data-subject="语文"]::after { background:var(--学科-语文); }
.page[data-subject="数学"]::after { background:var(--学科-数学); }
.page[data-subject="英语"]::after { background:var(--学科-英语); }
/* 封面和目录页（data-subject="通用"）没有色带 */
.page:not([data-subject])::after,
.page[data-subject="通用"]::after { display:none; }
/* 色带不要压到正文 —— 正文区右边留 4mm */
.page[data-subject="语文"] .pbody,
.page[data-subject="数学"] .pbody,
.page[data-subject="英语"] .pbody { padding-right:4mm; }
/* 偶数页的外侧在左；色带与正文留白按页码镜像，不依赖应用内双面开关。 */
.page.even::after { left:0; right:auto; }
.page.even[data-subject="语文"] .pbody,
.page.even[data-subject="数学"] .pbody,
.page.even[data-subject="英语"] .pbody { padding-left:4mm; padding-right:0; }
/* 骑马钉：奇数页左边大（装订侧），偶数页右边大 */
.page.odd { padding-left:22mm; padding-right:14mm; }
.page.even { padding-left:14mm; padding-right:22mm; }
/* ============================================================
   纸张骨架
   ------------------------------------------------------------
   页眉页脚属于每一张纸的网格，禁止固定定位重复覆盖正文。
   ============================================================ */

/* 页眉：篇名 + 拇指索引十格。合上书从侧面看黑格位置就知道是第几篇 */
.phead { display:flex; justify-content:space-between; align-items:center;
  border-bottom:0.6mm solid #000; padding-bottom:1.2mm; }
.phead .pt { font-family:"Heiti SC","STHeiti","SimHei",sans-serif; font-size:11pt; font-weight:bold; }
.thumb { display:flex; gap:0.9mm; }
.thumb i { width:2.6mm; height:2.6mm; border:0.25mm solid var(--ink-3); display:block; }
.thumb i.on { background:#111; border-color:#111; }
.pfoot { border-top:0.2mm solid var(--rule); padding-top:0.8mm;
  display:flex; justify-content:space-between; font-size:7.8pt; color:var(--ink-3); }

/* ============================================================
   卡片 —— 四拍固定结构（版式规范_v4.md §1）
     卡头 / 触发条 / ①一句话 ②怎么做 ③看个例子 ④小心别错 / 尾注 / 掌握条
   顺序不许调换：孩子的四个使用场景各自从固定位置切入。
   高度：优先<b>整张放进一页</b>；真的放不下时由 paginate.js 按四拍边界切开，
   每一段重复卡头并标「（续）」。<b>丢内容比拆卡严重得多</b>——
   第八篇那张巨表卡就曾被 overflow:hidden 整段裁掉。
   ============================================================ */
.card { border:0.3mm solid #111; background:#fff; margin-bottom:5mm;
  page-break-inside:avoid; break-inside:avoid; }
/* 校内 = 细左条；校外 = 粗左条。不要再用颜色重复表达同一件事 */
.card.in  { border-left:0.5mm solid #111; }
.card.out { border-left:1.6mm solid #111; }
.card.unknown { border-left:0.7mm dashed #111; }

/* —— 卡头 —— */
.card > .ct { display:flex; align-items:stretch; border-bottom:0.3mm solid #111; }
.ct .cn { width:14mm; flex:none; background:#111; color:#fff;
  display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2mm 0; }
/* T19：学科色覆盖卡头编号块默认黑色 */
.card[data-subject="语文"] .ct .cn { background: var(--学科-语文); }
.card[data-subject="数学"] .ct .cn { background: var(--学科-数学); }
.card[data-subject="英语"] .ct .cn { background: var(--学科-英语); }
.ct .cn .no { font:bold 16pt/1 "Heiti SC","STHeiti",sans-serif;
  color:#fff; /* 覆盖全局 .no{--red}：编号块里的 .no 不是「错误」标记。
                 白字压学科深底（赭/靛/苔绿），屏幕与灰度打印双安全 */ }
.ct .cn .sub { font-size:7pt; letter-spacing:1.5px; margin-top:1.2mm;
  font-family:"Heiti SC",sans-serif; }
.ct .hd { flex:1; min-width:0; padding:2.2mm 3mm; background:var(--wash-2); }
.ct .hd h2 { font-family:"Heiti SC","STHeiti","SimHei",sans-serif;
  font-size:14pt; line-height:1.32; font-weight:bold; margin:0; }
.ct .meta { display:flex; gap:3mm; flex-wrap:wrap; align-items:center; margin-top:1.6mm;
  font-family:"Heiti SC",sans-serif; font-size:8pt; color:var(--ink-2); }
.ct .meta .u { border:0.25mm solid var(--ink-3); padding:0.4mm 1.6mm; }
.ct .meta .stage { border:0.25mm solid var(--ink-3); padding:0.4mm 1.6mm; font-weight:bold; }
.ct .meta .lv { letter-spacing:1px; }
.ct .meta .tip { color:var(--ink-3); }

/* —— 四拍与触发条共用的「左栏 + 右内容」骨架 —— */
.sec { display:flex; align-items:stretch; border-top:0.25mm solid var(--rule); }
.sec:first-of-type { border-top:0; }
.sec > .lb { width:21mm; flex:none; padding:1.7mm 2.2mm 1.7mm 0; text-align:right;
  border-right:0.25mm solid var(--rule);
  font-family:"Heiti SC","STHeiti","SimHei",sans-serif; font-size:9.6pt;
  font-weight:bold; line-height:1.3; color:var(--ink); }
.sec > .lb .n { display:inline-flex; width:5.2mm; height:5.2mm; border-radius:50%;
  background:#111; color:#fff; font:bold 8pt "Heiti SC",sans-serif;
  align-items:center; justify-content:center; margin-bottom:1.2mm; }
.sec > .lb .t { display:block; }
.sec > .bd { flex:1; min-width:0; padding:1.7mm 3mm; }
.sec > .bd > table { margin-top:0; }
.sec > .bd > :first-child { margin-top:0; }

/* 触发条：从作业里的题干反查卡片 */
.trig { background:var(--wash); border-bottom:0.25mm solid var(--rule); }
.trig > .lb { font-weight:normal; font-size:8.6pt; color:var(--ink-3); }
.trig > .bd { font-size:9.8pt; line-height:1.75; }
.trig .condition { margin-top:1mm; padding-top:0.8mm; border-top:0.2mm solid var(--rule); }
.trig .condition-label { display:inline-block; margin-right:1.2mm; color:var(--ink-3); font-size:8.6pt; font-weight:bold; }

/* ① 一句话说清 —— 全卡最重的一行 */
.beat1 > .bd { font-family:"Heiti SC","STHeiti",sans-serif;
  font-size:13pt; line-height:1.6; font-weight:bold; color:var(--ink); }
/* ② 怎么做 */
.beat2 > .bd { font-size:9.8pt; line-height:1.8; }
/* ③ 看个例子 */
.beat3 > .bd { font-size:9.6pt; line-height:1.8; }
/* ④ 小心别错 —— 红＝会丢分 */
.beat4 > .lb { color:var(--red); border-right-color:var(--red-line); }
.beat4 > .lb .n { background:var(--red); }
.beat4 > .bd { font-size:9.6pt; line-height:1.8; background:var(--red-wash); }
/* 并列项：一条一行。
   ⚠️ 这里<b>不能</b>再写 `b:first-child{display:block}` 这类靠位置猜语义的规则——
      它在「句中加粗」的卡片上会把普通的加粗词拽成独立一行。
      哪里是一条，由 card_render.js 的 并列项() 决定，CSS 只负责排。 */
.li { display:block; margin-top:0.9mm; }
.li:first-child { margin-top:0; }
.item { display:block; margin-top:0.9mm; }   /* 旧别名，等价于 .li */

/* 尾注：为什么 + 它连着谁。整块压灰，明写「可以先跳过」 */
.tail { background:var(--wash); }
.tail > .lb { font-weight:normal; color:var(--ink-3); font-size:8.8pt; }
.tail > .bd { font-size:9.2pt; line-height:1.8; color:var(--ink-3); }
.tail .h { font-family:"Heiti SC",sans-serif; font-weight:bold; color:var(--ink-2);
  display:block; margin-top:1.4mm; }
.tail .h:first-child { margin-top:0; }

/* 掌握条：屏幕上可点，纸上手写 */
.done { display:flex; align-items:center; gap:3mm; flex-wrap:wrap;
  border-top:0.25mm solid var(--rule); padding:1.8mm 3mm; font-size:9.2pt; }
.done .bx { width:3.8mm; height:3.8mm; border:0.3mm solid #111; flex:none; display:inline-block; }
.done .dt { margin-left:auto; color:var(--ink-3); white-space:nowrap; }

/* 口诀：只有它用楷体。字体本身就是「这段要背」的信号 */
.kj { border-left:1.1mm solid #111; background:var(--wash);
  padding:1.4mm 2mm 1.4mm 2.4mm; margin:1.4mm 0;
  font-family:"Kaiti SC","STKaiti","KaiTi",serif; font-size:12pt; line-height:1.7; }
.steps { line-height:1.8; }
.steps > div { margin-bottom:1mm; }
.steps > div:last-child { margin-bottom:0; }

/* ============================================================
   低年级卡：整体大一档
   按明确年级范围套用，难度星级不代表年龄
   ============================================================ */
.card.low-grade .ct .hd h2 { font-size:16pt; }
.card.low-grade .beat1 > .bd { font-size:14.2pt; }
.card.low-grade .kj { font-size:13pt; }
.card.low-grade .beat2 > .bd,
.card.low-grade .beat3 > .bd,
.card.low-grade .beat4 > .bd { font-size:10.6pt; }
.card.low-grade .sec > .lb { font-size:10.4pt; }
.card.low-grade .t { font-size:9.8pt; }
.card.low-grade .sec > .bd { padding:1.8mm 3mm; }

/* 分页器按剩余高度临时套用的紧凑档位；站点与离线手册共用规则。 */
.card.紧1 > .sec > .bd,
.card.紧1 > .sec > .lb { padding-top:1.05mm; padding-bottom:1.05mm; }
.card.紧1 .li { margin-top:0.35mm; }
.card.紧1 .li > .sub { margin-top:0.2mm; padding-left:2mm; }
.card.紧1 .kj { margin:0.9mm 0; padding-top:1mm; padding-bottom:1mm; }
.card.紧1 .steps > .li { margin-top:0.5mm; }
.card.紧1 > .done { padding-top:1.15mm; padding-bottom:1.15mm; }
.card.紧1 .ct .hd { padding-top:1.6mm; padding-bottom:1.6mm; }
.card.紧1 .ct .meta { margin-top:1.1mm; }
.card.紧1 .figwrap { margin:0.9mm 0; }
.card.紧1 .steps { line-height:1.52; }
.card.紧1 .steps > div { margin-bottom:0.45mm; }
.card.紧1 .steps > div:last-child { margin-bottom:0; }
.card.紧1 .beat2 > .bd,
.card.紧1 .beat3 > .bd,
.card.紧1 .beat4 > .bd { line-height:1.52; }
.card.紧1 .t td, .card.紧1 .t th { padding:0.55mm 1.5mm; line-height:1.42; }
.card.紧2 .li { display:inline; margin-top:0; }
.card.紧2 .li + .li::before { content:"　"; }
.card.紧2 .li > .sub { display:inline; padding-left:0; }
.card.紧2 .li > .sub::before { content:"；"; }
.card.紧2 .steps > .li { display:block; }
.ct .hd h2 .xu { font-size:9.5pt; font-weight:normal; color:var(--ink-3); margin-left:2mm; }

/* 拼音注解（注音规范.md）。加了 ruby 的卡行高要放大，高度预算另算 */
ruby { ruby-position:over; -webkit-ruby-position:before; }
rt { font-family:"Times New Roman",serif; font-size:7pt; line-height:1;
  color:var(--ink-2); font-weight:normal; }
.card.zhuyin .beat1 > .bd,
.card.zhuyin .beat2 > .bd,
.card.zhuyin .beat3 > .bd,
.card.zhuyin .beat4 > .bd { line-height:calc(1.8em + 0.62em); }

/* ============================================================
   重点突出：黑白打印也要看得出层级
   原来只有「加粗」一档，正文里到处 <b> 反而谁都不突出。
   现在分三档，从强到弱：
     .key   反白（黑底白字）—— 一张卡片最多用 1—2 次，留给最该记住的那句
     .em    着重号（字下加点）—— 中文传统重点标记，比加粗更醒目且不吵
     <b>    普通加粗 —— 一般强调
   ============================================================ */
/* 强调是「重要」，不是「对错」，所以一律黑 —— 靠反白和着重号的形式取胜，不靠颜色 */
.key { background:#000; color:#fff; padding:0.2mm 1.4mm; border-radius:0.6mm;
  font-family:"Heiti SC","STHeiti","SimHei",sans-serif; font-weight:bold; }
.em { font-weight:bold;
  text-emphasis:dot #000; -webkit-text-emphasis:dot #000;
  text-emphasis-position:under right; -webkit-text-emphasis-position:under right; }

/* 行内语义标记：只用在确实有对错含义的词上 */
.ok { color:var(--green); font-weight:bold; }   /* 对 · 得分 */
.no { color:var(--red);   font-weight:bold; }   /* 错 · 丢分 */

/* ============================================================
   .flow 三步流程条 —— 把「① → ② → ③」这类步骤从文字段落变成看得见的流程
   用途：口诀式的固定答题步骤、固定解题顺序。
   黑白友好：靠边框和底色深浅区分，不靠颜色。
   ============================================================ */
.flow { display:table; width:100%; border-collapse:separate; border-spacing:1.2mm 0; margin:1.8mm 0; }
.flow > .s { display:table-cell; width:33%; vertical-align:top; text-align:center;
  border:0.28mm solid var(--rule); border-top:0.7mm solid #000;
  padding:1.6mm 1.2mm; background:var(--wash); }
.flow > .s .n { display:block; font-size:8pt; color:#fff; background:#000;
  width:4.8mm; height:4.8mm; line-height:4.8mm; border-radius:50%; margin:0 auto 1.1mm; }
.flow > .s .h { display:block; font-family:"Heiti SC","STHeiti",sans-serif;
  font-size:10.2pt; font-weight:bold; line-height:1.45; color:var(--ink); }
.flow > .s .d { display:block; font-size:8.4pt; line-height:1.6; color:var(--ink-2); margin-top:0.9mm; }
/* 得分点 —— 绿＝能拿分，这是颜色在传信息，不是涂色 */
.flow > .s .p { display:block; font-size:8pt; margin-top:0.9mm;
  border-top:0.2mm dotted var(--rule); padding-top:0.7mm;
  color:var(--green); font-weight:bold; }
/* 这一步最常漏 —— 红＝会丢分，整格改成红顶红底做预警 */
.flow > .s.risk { border-top-color:var(--red); background:var(--red-wash); }
.flow > .s.risk .p { color:var(--red); }
.flow > .a { display:table-cell; width:4mm; vertical-align:middle; text-align:center;
  font-size:12pt; font-weight:bold; color:var(--ink-3); }

/* 对错对照：✗ 常见错答 / ✓ 正确答法，两栏并排，比上下堆叠好扫
   ✗ 一行整体压灰后退，✓ 一行保持黑正文 —— 视线自然落到对的那行 */
.vs { display:table; width:100%; border-collapse:collapse; margin:1.5mm 0; font-size:8.8pt; }
.vs > div { display:table-row; }
.vs .lab { display:table-cell; width:11mm; text-align:center; font-weight:bold;
  padding:1.3mm 0.6mm; vertical-align:middle; font-size:13pt; color:#fff; }
.vs .txt { display:table-cell; border:0.25mm solid var(--rule); padding:1.3mm 2mm; line-height:1.75; }
/* ✗ 红＝这是错的　✓ 绿＝这是对的。颜色本身就在说「哪个能抄」 */
.vs .bad  .lab { background:var(--red); }
.vs .bad  .txt { background:var(--red-wash);   border-color:var(--red-line);   color:var(--ink-2); }
.vs .good .lab { background:var(--green); }
.vs .good .txt { background:var(--green-wash); border-color:var(--green-line); color:var(--ink); }
.sec > .bd b { font-family:"Heiti SC","STHeiti","SimHei",sans-serif; }
.fm { font-family:"Times New Roman",serif; font-size:10pt; }

/* ── 分数：上下结构 + 中间横线 ──────────────────────────────
   全年级统一这一种写法，见 版式规范_v4.md §10。生成只走 分数.js，别手写。

   为什么用 inline-block 而不是 inline-flex：
   inline-flex 的 vertical-align 在<b>打印</b>时表现不一致（同一份 HTML，
   屏幕上居中、打印预览里下沉半行）。inline-block + 两个 block 子元素
   是最老实的写法，屏幕和纸上一个样。

   为什么子元素不起类名：靠 .fr > span 定位。少两个类名就少两处和别人撞车
   的机会 —— .fm 已经被「公式字体」占了，.u 被目录和卡头元信息占了。 */
.fr {
  display:inline-block;
  vertical-align:-0.42em;      /* 让横线大致落在文字中线上 */
  text-align:center;
  margin:0 0.16em;
  font-family:"Times New Roman",serif;
  font-size:0.92em;            /* 跟着上下文缩一点，免得把行高撑得太开 */
}
.fr > span { display:block; line-height:1.18; padding:0 0.2em; white-space:nowrap; }
.fr > span + span { border-top:0.3mm solid currentColor; }
/* 带分数：整数紧挨着分数，中间不留空 */
.fr-w { white-space:nowrap; }
.fr-w .fr { margin-left:0.06em; }

@media print {
  /* 纸上线要实、要够黑：0.3mm 在 600dpi 上偶尔会被渲染成灰线。
     颜色跟着 currentColor 走，所以红色区里的分数线也是红的，语义不会漏。 */
  .fr > span + span { border-top-width:0.32mm; }
  /* 分数不许被拆到两行/两页之间 —— 上下断开就成了两个数 */
  .fr { break-inside:avoid; page-break-inside:avoid; }
}

.figwrap { margin:1.4mm 0; text-align:center; }
.figwrap svg { display:inline-block; }

/* 表格 */
.t { width:100%; border-collapse:collapse; font-size:8.8pt; margin-top:0.8mm; }
/* 表格对齐：表头与正文<b>统一左对齐</b>（原来 th 居中、td 左对齐，看起来不齐）。
   需要居中的短列（数字格、占格标签等）由作者显式加 .c；th、td 都认 .c。 */
.t th, .t td { border:0.2mm solid #777; padding:0.75mm 1.5mm; vertical-align:top; text-align:left; }
.t th { background:#f0f0f0; font-family:"Heiti SC",sans-serif; }
.t td.c, .t th.c { text-align:center; }
.t td.hd { font-family:"Heiti SC",sans-serif; background:#fafafa; white-space:nowrap; }
.t td.k { font-family:"Times New Roman",serif; font-size:9.6pt; letter-spacing:0.6px; }

.two { display:flex; gap:3mm; }
.two > * { flex:1; min-width:0; }

/* ---------- 封面 / 说明页 ---------- */
.cv { text-align:center; margin:10mm 0 5mm; }
.cv h1 { font-family:"Heiti SC","STHeiti","SimHei",sans-serif; font-size:25pt; letter-spacing:2px; }
.cv .s1 { font-size:13pt; margin-top:3mm; }
.cv .s2 { font-size:10pt; color:#555; margin-top:2mm; }
.box { border:0.35mm solid #000; padding:2.6mm 3.4mm; margin-bottom:2.6mm; font-size:9.2pt; line-height:1.8; }
.box .bt { font-family:"Heiti SC",sans-serif; font-size:10.5pt; margin-bottom:1.2mm; }
.box b { font-family:"Heiti SC",sans-serif; }

/* 目录 */
.toc { font-size:9pt; line-height:1.75; }
.toc .g { font-family:"Heiti SC",sans-serif; font-size:10pt; margin-top:1.6mm; }
.toc .g:first-child { margin-top:0; }
.toc .d { padding-left:4mm; color:#222; }

/* 标记图例 */
.legend { width:100%; border-collapse:collapse; font-size:9pt; }
.legend td { border:0.2mm solid #777; padding:1.2mm 2mm; vertical-align:middle; }
.legend .sw { width:26mm; text-align:center; }
.legend .demo { display:inline-block; width:20mm; height:5mm; border:0.28mm solid #000; }
.legend .demo.in { border-left:0.5mm solid #000; }
.legend .demo.out { border-left:1.6mm solid #000; }
.legend .demo.unknown { border-left:0.7mm dashed #000; }

/* 索引表 */
.idx > .ct { background:#e4e4e4; }
.idxt td { padding:0.6mm 1.5mm; }
.idxt tr td:first-child { font-family:"Heiti SC",sans-serif; font-size:8.4pt; }

@media screen {
  /* 网页版就是一本可以滚动的书：同一套版式、同一套节奏。
     不做展开/折叠、不做点击揭示答案 —— 一旦屏幕和纸上的信息量不同，
     孩子在两个介质之间就要重新学一次怎么读。 */
  body { background:#e9e9e9; }
}

/* ============================================================
   宽度兜底
   ------------------------------------------------------------
   表格与图形约束在纸张正文宽度内，避免单个元素撑开整页。
   ============================================================ */
.figwrap svg, .sec > .bd svg { max-width:100%; height:auto; }
.sec > .bd { overflow-wrap:break-word; }
.t, .flow, .vs { max-width:100%; table-layout:fixed; }
.t td, .t th { overflow-wrap:break-word; }
/* ============================================================
   页 —— 由 paginate.js 在浏览器里装箱后生成
   ------------------------------------------------------------
   paginate.js测量装箱，每张.page对应一张A4；按单/双面、翻转边和装订留白调整纸面几何。
   ============================================================ */
.page { padding:16mm; display:flex; flex-direction:column; background:#fff; }
/* 正文区：<b>绝不裁剪</b>。
   这里曾经是 overflow:hidden，理由是「万一装箱算多了，宁可裁掉也别压到页脚」。
   那是错的——裁剪等于<b>用丢内容来掩盖算不准</b>，而且丢得无声无息：
   「关键词 → 专题对照表」的后半张表就是这么消失的。
   现在：先靠量真高度 + 拆块/拆卡/降级把「装不下」消灭在源头；
   万一还偏满就<b>让它破格</b>——破格看得见，丢字看不见。 */
.page > .pbody { flex:1; min-height:0; overflow:visible; }
.page > .phead { flex:none; margin-bottom:3.5mm; }
.page > .pfoot { flex:none; margin-top:auto; padding-top:1.2mm; }
.empty { text-align:center; color:var(--ink-3); padding:40mm 0; font-size:11pt; line-height:2; }

/* 封面 */
.cv { text-align:center; margin:22mm 0 8mm; }
.cv h1 { font-family:"Heiti SC","STHeiti","SimHei",sans-serif; font-size:25pt; letter-spacing:2px; }
.cv .s1 { font-size:13pt; margin-top:3mm; }
.cv .s2 { font-size:10pt; color:var(--ink-3); margin-top:2mm; }
.cv .s3 { margin-top:6mm; display:flex; gap:4mm; justify-content:center; }
.cv .s3 span { font-family:"Heiti SC",sans-serif; font-size:11pt;
  border:0.3mm solid #111; padding:1.2mm 5mm; }
.cv .s3 span.on { background:#111; color:#fff; }
.cv .cover-editions { max-width:160mm; margin:9mm auto 0; text-align:left; font-size:9pt; line-height:1.65; }
.cv .cover-editions h2 { margin:0 0 3mm; font-size:11pt; }
.cv .cover-editions dl { margin:0; }
.cv .cover-editions dt { margin-top:3mm; font-weight:bold; }
.cv .cover-editions dd { margin:1mm 0 0; color:var(--ink-2); overflow-wrap:anywhere; }

/* 学科说明块 */
.box.subj .bt .sub { font-family:"Songti SC",serif; font-weight:normal;
  font-size:9.4pt; color:var(--ink-3); }

/* ============================================================
   目录 —— 页码由 paginate.js 按<b>当前打印范围</b>算出来
   所以整本打、只打四年级、只打四上，页码都是对的。
   ============================================================ */
.tocwrap { margin-bottom:4mm; }
.tochd h2 { font-family:"Heiti SC","STHeiti",sans-serif; font-size:16pt; margin-bottom:2.5mm; }
.tochd p { font-size:9.4pt; line-height:1.8; margin-bottom:1.5mm; }
.tochd .scope { display:inline-block; border:0.3mm solid #111; padding:1mm 3mm; font-size:9.2pt; }
.toct { width:100%; border-collapse:collapse; font-size:9.4pt; margin-bottom:3mm; }
.toct th, .toct td { border-bottom:0.2mm solid var(--rule); padding:1.3mm 2mm; vertical-align:top; }
.toct thead th { border-bottom:0.4mm solid #111; font-family:"Heiti SC",sans-serif;
  font-size:8.6pt; color:var(--ink-2); text-align:left; }
.toct .u { width:34mm; }
.toct .p { width:12mm; text-align:right; font-family:"Times New Roman",serif; font-weight:bold; }
.toct tr.grp td { font-family:"Heiti SC",sans-serif; font-size:10.5pt; font-weight:bold;
  background:var(--wash-2); border-bottom:0.3mm solid #111; padding:1.6mm 2mm; }

/* ============================================================
   屏幕工具条 —— 打印时整条消失
   ⚠️ 与旧规范的改动：原来「筛选只影响屏幕，打印永远整本」。
      现在要按年级/学期分册打印，所以改成<b>筛什么就打印什么</b>。
   ============================================================ */
/* ============================================================
   卡尾关系渲染（T11）
   ============================================================ */
.card-rel { margin-top:1mm; padding-top:0.6mm; border-top:0.1mm solid #ccc;
  font-size:90%; line-height:1.6; color:#555; }
.card-rel .rel-up, .card-rel .rel-down { display:inline-block; margin-right:1.5mm; }
.card-rel [data-rel="易混"] { color:var(--red); }
.card-rel [data-rel="替代"] { color:var(--ink-3); }
/* ============================================================
   T20b：空白自测版
   ============================================================ */
.card.版式-空白自测版 .beat2::after,
.card.版式-空白自测版 .beat3::after { content:""; display:block; min-height:18mm;
  border:1px dashed var(--rule); border-radius:2px; margin:1.5mm 0; }
.card.版式-空白自测版 .zt { display:inline-block; background:var(--ink-3); color:#fff;
  font-size:7.5pt; padding:0 1.5mm; border-radius:2px; margin-left:1.5mm; vertical-align:middle; }


/* 纸张尺寸只由打印工作台管理，不再同时叠加doc-page影子外壳。 */
#main-content { width:100%; min-width:0; }
body.wiki-print-workbench { background:var(--site-canvas); color:var(--site-ink); }
#源 { display:none; }
#尺 { position:absolute; top:0; left:-99999px; visibility:hidden; font:9.4pt/1.6 "Songti SC","STSong","SimSun",serif; }
#书 { width:100%; max-width:100%; padding:20px 12px 40px; overflow-x:auto; outline-offset:-3px; }
.wiki-sheet { width:calc(210mm * var(--wiki-scale,1)); height:calc(297mm * var(--wiki-scale,1)); margin:0 auto 20px; position:relative; scroll-margin-top:220px; }
#书 .wiki-sheet[hidden] { display:none; }
.page.wiki-paper { width:210mm; height:297mm; min-height:297mm; box-sizing:border-box; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:3mm; margin:0; border:0; padding:16mm; background:#fff; color:#111; font:9.4pt/1.6 "Songti SC","STSong","SimSun",serif; box-shadow:0 3px 15px #0002; border-radius:3px; }
.wiki-sheet > .wiki-paper { transform:scale(var(--wiki-scale,1)); transform-origin:top left; }
.page.wiki-paper.duplex.long-edge.gutter.odd { padding-left:22mm; padding-right:18mm; }
.page.wiki-paper.duplex.long-edge.gutter.even { padding-left:18mm; padding-right:22mm; }
.page.wiki-paper.simplex.gutter { padding-left:22mm; padding-right:18mm; }
.page.wiki-paper.duplex.short-edge.gutter.odd { padding-top:22mm; padding-bottom:18mm; }
.page.wiki-paper.duplex.short-edge.gutter.even { padding-top:18mm; padding-bottom:22mm; }
.page.wiki-paper.simplex.short-edge.gutter { padding-left:22mm; padding-right:18mm; }
.page.wiki-paper > .pbody { min-height:0; margin:0; padding:0; overflow:visible; }
.page.wiki-paper[data-subject="语文"] > .pbody,
.page.wiki-paper[data-subject="数学"] > .pbody,
.page.wiki-paper[data-subject="英语"] > .pbody { padding-right:4mm; }
.page.wiki-paper.duplex.long-edge.even[data-subject="语文"]::after,
.page.wiki-paper.duplex.long-edge.even[data-subject="数学"]::after,
.page.wiki-paper.duplex.long-edge.even[data-subject="英语"]::after { left:0; right:auto; }
.page.wiki-paper.duplex.long-edge.even[data-subject="语文"] > .pbody,
.page.wiki-paper.duplex.long-edge.even[data-subject="数学"] > .pbody,
.page.wiki-paper.duplex.long-edge.even[data-subject="英语"] > .pbody { padding-left:4mm; padding-right:0; }
.page.wiki-paper.duplex.short-edge::after { left:0; right:0; top:auto; bottom:0; width:auto; height:4mm; }
.page.wiki-paper.duplex.short-edge.even::after { top:0; bottom:auto; }
.page.wiki-paper.duplex.short-edge.odd[data-subject="语文"] > .pbody,
.page.wiki-paper.duplex.short-edge.odd[data-subject="数学"] > .pbody,
.page.wiki-paper.duplex.short-edge.odd[data-subject="英语"] > .pbody { padding:0 0 4mm; }
.page.wiki-paper.duplex.short-edge.even[data-subject="语文"] > .pbody,
.page.wiki-paper.duplex.short-edge.even[data-subject="数学"] > .pbody,
.page.wiki-paper.duplex.short-edge.even[data-subject="英语"] > .pbody { padding:4mm 0 0; }
.page.wiki-paper.simplex.even[data-subject="语文"]::after,
.page.wiki-paper.simplex.even[data-subject="数学"]::after,
.page.wiki-paper.simplex.even[data-subject="英语"]::after { left:auto; right:0; }
.page.wiki-paper.simplex.even[data-subject="语文"] > .pbody,
.page.wiki-paper.simplex.even[data-subject="数学"] > .pbody,
.page.wiki-paper.simplex.even[data-subject="英语"] > .pbody { padding-left:0; padding-right:4mm; }
.page.wiki-paper > .phead,.page.wiki-paper > .pfoot { min-width:0; margin:0; flex:none; font-size:8pt; line-height:1.4; }
.page.wiki-paper > .phead { padding-bottom:1mm; border-bottom:.4mm solid #111; }
.page.wiki-paper > .pfoot { padding-top:1mm; }
body.wiki-print-workbench .wiki-paper .toct a { color:#111; text-decoration:none; }
.wiki-paper .toct a:hover { text-decoration:underline; }
.wiki-paper .cover-note { margin-top:30mm; font-size:10pt; line-height:1.9; color:#555; }
.wiki-paper .cv { margin-top:25mm; }
.wiki-empty { max-width:760px; margin:50px auto; padding:24px; border-radius:12px; background:var(--site-card); color:var(--site-ink); font:1rem/1.7 var(--site-font-sans); }
/* 屏幕工作流与印刷内容分离。所有纸张继续由上方的 A4 规则管理。 */
.wiki-workspace { --wiki-controls-height:60px; --wiki-readerbar-height:52px; --wiki-bottom-height:0px; --wiki-control:44px; display:grid; grid-template-columns:224px minmax(0,1fr); align-items:start; }
.wiki-reader { min-width:0; }
.wiki-sidebar,.wiki-reader-toolbar { background:var(--site-card); color:var(--site-ink); font:.875rem/1.5 var(--site-font-sans); }
.wiki-sidebar { position:sticky; top:var(--site-header-height,60px); z-index:45; height:calc(100dvh - var(--site-header-height,60px)); padding:12px; display:flex; flex-direction:column; gap:18px; border-right:1px solid var(--site-line); }
.wiki-sidebar-head { display:flex; align-items:center; justify-content:space-between; gap:8px; flex:none; }
.wiki-sidebar-head #概览入口 { font-size:.875rem; font-weight:650; color:var(--site-ink); }
.wiki-settings { min-width:0; min-height:0; overflow:auto; flex:1; }
.wiki-settings :focus-visible { outline-offset:-3px!important; }
.wiki-settings-body { display:flex; flex-direction:column; gap:20px; }
.wiki-settings-body :where(button,input[type=search],select,summary),.wiki-reader-toolbar :where(button,input,select,summary),.wiki-print-actions button,.wiki-filter-drawer footer button { min-height:var(--wiki-control,44px); padding:6px 8px; max-width:100%; border:1px solid var(--site-line); border-radius:7px; font:inherit; background:var(--site-card); color:var(--site-ink); }
.wiki-settings-body button,.wiki-reader-toolbar button,.wiki-reader-toolbar summary,dialog button { cursor:pointer; }
.wiki-text-button,.wiki-settings-body .wiki-text-button { min-height:36px; padding:0 4px; border:0; background:transparent; color:var(--site-muted); font:inherit; cursor:pointer; }
.wiki-text-button:hover:not(:disabled) { color:var(--site-accent-strong); }
.wiki-search,.wiki-select-grid label { display:grid; gap:6px; color:var(--site-muted); }
.wiki-search-row { position:relative; display:block; }
.wiki-settings-body #搜 { width:100%; min-width:0; padding-right:34px; background:var(--site-surface); border-color:transparent; }
.wiki-settings-body #清除关键词 { position:absolute; inset:0 0 0 auto; padding:0; width:32px; border:0; background:transparent; font-size:1rem; color:var(--site-muted); }
.wiki-settings-body #清除关键词:disabled { visibility:hidden; }
.wiki-section-head { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--site-muted); }
.wiki-filter-section { display:grid; gap:8px; }
.wiki-options,.view-options { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; padding:3px; background:var(--site-surface); border-radius:9px; }
.view-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
:is(.wiki-options,.view-options) button { min-width:0; border:0; padding:6px 2px; background:transparent; color:var(--site-muted); font:inherit; }
:is(.wiki-options,.view-options) button[aria-pressed=true] { color:var(--site-ink); background:var(--site-card); box-shadow:0 1px 3px #0001; font-weight:650; }
.wiki-select-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.wiki-select-grid label { min-width:0; }
.wiki-select-grid select { width:100%; min-width:0; background:var(--site-surface); border-color:transparent; }
.wiki-check,.wiki-panel label { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:var(--wiki-control,44px); }
.wiki-settings-body input[type=checkbox] { width:16px; height:16px; flex:none; margin:0; accent-color:var(--site-accent-strong); }
.wiki-more { border-top:1px solid var(--site-line); padding-top:8px; }
.wiki-disclosure > summary { display:flex; align-items:center; justify-content:space-between; list-style:none; cursor:pointer; }
.wiki-more > summary { border:0; padding-inline:0; color:var(--site-muted); background:transparent; }
.wiki-disclosure > summary::-webkit-details-marker { display:none; }
.wiki-disclosure > summary::after { content:'⌄'; margin-left:8px; }
.wiki-disclosure[open] > summary::after { content:'⌃'; }
.wiki-disclosure:not([open]) > :not(summary) { display:none; }
.wiki-panel { padding-top:8px; }
.wiki-print-toggle { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:var(--wiki-control,44px); }
.wiki-print-fieldset { min-width:0; margin:8px 0 0; padding:0; border:0; }
.wiki-print-fieldset legend { margin-bottom:6px; color:var(--site-muted); font-size:.8125rem; }
.wiki-print-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.wiki-print-choices label { display:flex; align-items:flex-start; gap:7px; min-height:64px; padding:9px 7px; border:1px solid var(--site-line); border-radius:8px; background:var(--site-surface); cursor:pointer; }
.wiki-print-choices input[type=radio] { width:16px; height:16px; flex:none; margin:2px 0 0; accent-color:var(--site-accent-strong); }
.wiki-print-choice { display:flex; align-items:center; gap:7px; min-width:0; }
.wiki-print-diagram { display:block; width:21px; height:29px; flex:none; border:1px solid var(--site-muted); border-radius:2px; background:var(--site-card); }
.wiki-print-diagram.duplex { box-shadow:-3px -3px 0 -1px var(--site-card),-3px -3px 0 0 var(--site-muted); }
.wiki-print-diagram.long { background:linear-gradient(to left,var(--site-accent-strong) 0 3px,transparent 3px),var(--site-card); }
.wiki-print-diagram.short { background:linear-gradient(to top,var(--site-accent-strong) 0 3px,transparent 3px),var(--site-card); }
.wiki-print-choices strong,.wiki-print-choices small { display:block; }
.wiki-print-choices strong { color:var(--site-ink); font-size:.8125rem; line-height:1.4; }
.wiki-print-choices small { margin-top:3px; color:var(--site-muted); font-size:.6875rem; line-height:1.4; }
.wiki-print-choices label:has(input:checked) { border-color:var(--site-accent-strong); box-shadow:0 0 0 1px var(--site-accent-strong); }
.wiki-print-gutter { margin-top:8px; padding-top:4px; border-top:1px solid var(--site-line); }
.wiki-print-gutter p,.wiki-print-note { margin:0; color:var(--site-muted); font-size:.6875rem; line-height:1.55; }
.wiki-print-note { margin-top:10px; padding:9px; border-radius:7px; background:var(--site-surface); }
@media screen and (min-width:1100px) {
 .wiki-print-choices { grid-template-columns:1fr; gap:4px; }
 .wiki-print-choices label { min-height:48px; align-items:center; padding:6px 8px; }
}
.wiki-print-actions { display:grid; gap:7px; flex:none; font-size:.75rem; }
.wiki-print-actions #条件摘要 { color:var(--site-muted); overflow-wrap:anywhere; }
.wiki-print-actions #范围计数 { font-size:inherit; color:var(--site-muted); }
.wiki-print-actions #范围计数:empty { display:none; }
.wiki-print-actions #大册提示 { font-size:inherit; color:var(--site-amber); }
.wiki-print-actions #导出PDF,.wiki-drawer-footer #应用筛选 { width:100%; border:0; background:var(--site-accent-strong); color:var(--site-on-accent); font-weight:650; }
.wiki-print-actions #导出PDF { font-size:.8125rem; }
.wiki-icon-button { display:grid; place-items:center; width:44px; height:44px; min-height:44px; padding:0; flex:none; border:0; border-radius:50%; color:var(--site-muted); background:transparent; font:1.125rem/1 var(--site-font-sans); cursor:pointer; }
.wiki-icon-button:hover { color:var(--site-ink); background:var(--site-surface); }
.wiki-mobile-only { display:none; }
.reader-feedback,.reader-note { margin:8px 16px 0; color:var(--site-ink); font:.875rem/1.5 var(--site-font-sans); }
.reader-feedback[data-tone=success] { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#状态反馈:empty,.link-note:empty { display:none; }
.wiki-reader-toolbar { position:sticky; top:var(--site-header-height,60px); z-index:35; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding:6px 12px; min-height:56px; border-bottom:1px solid var(--site-line); }
.page-controls { display:flex; align-items:center; gap:4px; font-variant-numeric:tabular-nums; }
.page-controls button { width:var(--wiki-control); padding-inline:4px; }
.page-controls label { display:flex; align-items:center; gap:4px; white-space:nowrap; }
.page-controls #页序 { width:calc(4ch + 10px); min-width:44px; padding-inline:4px; text-align:center; }
.wiki-display-panel { position:absolute; right:12px; top:calc(100% + 6px); width:min(260px,calc(100vw - 24px)); padding:12px; border:1px solid var(--site-line); border-radius:12px; background:var(--site-card); box-shadow:var(--site-shadow-raised); }
.zoom-control { display:grid; gap:8px; margin-top:12px; }
.zoom-control select { width:100%; }
body.wiki-print-workbench #书 .wiki-sheet { scroll-margin-top:calc(var(--site-header-height,60px) + var(--wiki-readerbar-height) + 12px); }
#书[data-ready=true] .wiki-sheet { content-visibility:auto; }
#书[aria-busy=true] .wiki-sheet { opacity:.4; pointer-events:none; }
.wiki-print-error { display:none; }
.wiki-overview { width:min(100%,960px); margin:0 auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; font:.875rem/1.7 var(--site-font-sans); color:var(--site-ink); }
.wiki-overview > header { grid-column:1/-1; padding:12px 0 8px; }
.wiki-overview h1 { margin:4px 0 8px; font:650 1.5rem/1.4 var(--site-font-sans); }
.wiki-overview p { margin:0 0 12px; color:var(--site-muted); }
.wiki-overview button { min-height:40px; padding:6px 12px; border:1px solid var(--site-line); border-radius:8px; font:inherit; color:var(--site-ink); background:var(--site-card); }
.wiki-overview .wiki-text-button { border:0; padding:0; color:var(--site-accent-strong); }
.wiki-catalog-group { min-width:0; padding:16px; border:1px solid var(--site-line); border-radius:12px; background:var(--site-card); }
.wiki-catalog-group h2 { margin:0; font-size:1rem; color:var(--site-ink); }
.wiki-catalog-group ul { padding-left:18px; margin:8px 0; }
.wiki-catalog-group li { margin:4px 0; overflow-wrap:anywhere; }
.wiki-catalog-more { color:var(--site-muted); }
.wiki-catalog-more summary { cursor:pointer; }
.wiki-eyebrow { font-size:.75rem; }
.wiki-help-dialog,.wiki-toc-dialog,.wiki-filter-drawer { position:fixed; inset:0; width:min(580px,calc(100% - 32px)); max-height:80dvh; margin:auto; padding:0; overflow:hidden; border:1px solid var(--site-line); border-radius:16px; background:var(--site-card); color:var(--site-ink); box-shadow:var(--site-shadow-raised); font:.875rem/1.75 var(--site-font-sans); }
:is(.wiki-help-dialog,.wiki-toc-dialog,.wiki-filter-drawer)[open] { display:flex; flex-direction:column; }
:is(.wiki-help-dialog,.wiki-toc-dialog,.wiki-filter-drawer)::backdrop { background:rgb(15 18 14 / 32%); }
.wiki-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 20px; border-bottom:1px solid var(--site-line); flex:none; }
.wiki-dialog-header h2 { margin:0; font-size:1.125rem; font-weight:650; }
.wiki-help-tabs { display:flex; gap:4px; padding:10px 24px 0; flex:none; }
.wiki-help-tabs [role=tab] { min-height:40px; padding:6px 12px; border:0; border-radius:8px; color:var(--site-muted); background:transparent; font:inherit; }
.wiki-help-tabs [aria-selected=true] { background:var(--site-surface); color:var(--site-ink); font-weight:650; }
.wiki-help { min-height:0; overflow:auto; padding:0 24px 24px; overscroll-behavior:contain; }
.wiki-help h3 { margin:20px 0 6px; font-size:.9375rem; font-weight:650; }
.wiki-help h4 { margin:12px 0 4px; font-size:inherit; font-weight:600; color:var(--site-muted); }
.wiki-help p { margin:0 0 10px; }
.wiki-help .wiki-secondary { color:var(--site-muted); }
.wiki-help [hidden] { display:none; }
.wiki-toc-list { overflow:auto; padding:12px; }
.wiki-toc-item { width:100%; min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 12px; text-align:left; border:0; border-radius:7px; background:transparent; color:var(--site-ink); font:inherit; }
.wiki-toc-item:hover { background:var(--site-surface); }
.wiki-toc-item span:first-child { flex:1; }
.wiki-drawer-body { min-height:0; overflow:auto; padding:20px 24px; }
.wiki-drawer-footer { padding:12px 24px max(12px,env(safe-area-inset-bottom)); border-top:1px solid var(--site-line); flex:none; }
@media screen and (min-width:1100px) and (pointer:fine) {
 .wiki-workspace { --wiki-control:36px; }
 .wiki-sidebar,.wiki-reader-toolbar { font-size:.75rem; }
 .wiki-reader-toolbar { min-height:50px; }
}
@media screen and (max-width:1099px) {
 .wiki-workspace { display:block; padding-bottom:calc(var(--wiki-bottom-height) + 12px); }
 .wiki-sidebar { height:auto; padding:6px 12px; border-right:0; border-bottom:1px solid var(--site-line); }
 .wiki-sidebar-head { justify-content:flex-start; }
 .wiki-sidebar-head #概览入口 { margin-right:auto; }
 .wiki-mobile-only { display:block; min-height:44px; padding:6px 12px; border:1px solid var(--site-line); border-radius:8px; font:inherit; color:var(--site-ink); background:transparent; }
 #桌面设置宿主 { display:none; }
 .wiki-print-actions { position:fixed; bottom:0; inset-inline:0; z-index:50; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 12px; padding:10px 12px max(10px,env(safe-area-inset-bottom)); border-top:1px solid var(--site-line); background:var(--site-card); }
 .wiki-print-actions #条件摘要 { grid-column:1; font-size:.75rem; }
 .wiki-print-actions #张数,.wiki-print-actions #范围计数,.wiki-print-actions #大册提示 { grid-column:1; margin:0; }
 .wiki-print-actions #导出PDF { grid-column:2; grid-row:1/5; width:auto; min-height:44px; }
 .wiki-reader-toolbar { top:calc(var(--site-header-height,60px) + var(--wiki-controls-height)); }
 body.wiki-print-workbench #书 .wiki-sheet { scroll-margin-top:calc(var(--site-header-height,60px) + var(--wiki-controls-height) + var(--wiki-readerbar-height) + 12px); }
 .wiki-filter-drawer { top:auto; bottom:0; width:min(640px,100%); margin:0 auto; max-height:min(88dvh,calc(var(--wiki-visual-height,100dvh) - 12px)); border-radius:18px 18px 0 0; }
}
@media screen and (max-width:767px) {
 .wiki-overview { grid-template-columns:1fr; }
 .wiki-help-dialog { inset:12px; width:calc(100% - 24px); height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); font-size:.9375rem; }
 .wiki-settings-body input[type=search] { font-size:1rem; }
}
@media screen and (max-width:359px) {
 .wiki-reader-toolbar,.page-controls { gap:2px; }
}
@page { size:A4 portrait; margin:0; }
@media print {
 html,body.wiki-print-workbench { margin:0!important; padding:0!important; background:#fff!important; }
 .site-header,.site-footer,[data-screen-only],#源,#尺 { display:none!important; }
 dialog::backdrop { display:none!important; }
 #main-content { display:block!important; }
 #main-content,#书 { margin:0!important; padding:0!important; width:auto!important; max-width:none!important; overflow:visible!important; }
 #书 .wiki-sheet,#书 .wiki-sheet[hidden] { display:block!important; width:210mm; height:297mm; margin:0; break-after:page; break-inside:avoid; }
 #书 .wiki-sheet { content-visibility:visible!important; contain:none!important; opacity:1!important; }
 #书 .wiki-sheet:last-child { break-after:auto; }
 #书 .wiki-paper { transform:none!important; border-radius:0; box-shadow:none; }
 body[data-wiki-print-error=true] #书 { display:none!important; }
 body[data-wiki-print-error=true] .wiki-print-error { display:block; font:14pt/1.8 sans-serif; padding:25mm; color:#111; }
}
