/* ============================================================
   知识产权法律法规研习站 · 全站统一升级样式 v1 (2026-08-25)
   加载顺序：各页内联样式之后 —— 本文件为最终权威，统一视觉
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root{
  --u-primary:#1a4f8b;      /* 主色：内容页品牌蓝 */
  --u-accent:#1a6ec9;       /* 链接/强调蓝 */
  --u-ok:#0e7c66;           /* 成功绿 */
  --u-gov:#b45309;          /* 官方发布橙 */
  --u-bg:#f7f8fa;           /* 页面底 */
  --u-card:#ffffff;         /* 卡片面 */
  --u-line:#e3e8ef;         /* 描边 */
  --u-ink:#1f2733;          /* 正文 */
  --u-sub:#5a6573;          /* 次要文字 */
  --u-radius:10px;
  --u-shadow:0 1px 3px rgba(20,30,50,.06);
}

html{scroll-behavior:smooth;}
.dx-art,.orig-art{scroll-margin-top:90px;}

/* ---------- 统一：逐条卡片组件（旧6页已有内联定义，此处为权威版本；
             新5页此前缺失定义导致视觉漂移，由此补齐） ---------- */
.dx-art{border:1px solid #e3e8f0;border-radius:10px;margin:14px 0;background:#fff;box-shadow:var(--u-shadow);}
.dx-hd{background:#f5f8fc;padding:10px 14px;border-bottom:1px solid #e3e8f0;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;border-radius:9px 9px 0 0;}
.dx-no{font-weight:700;color:#1a4f8b;font-size:16px;}
.dx-ttl{color:#33415c;font-size:14px;}
.dx-bd{padding:6px 14px 14px;}
.dx-blk{margin:11px 0;}
.dx-lab{display:inline-block;font-weight:700;color:#1a4f8b;background:#eaf1fb;border-radius:5px;padding:2px 9px;margin-right:8px;font-size:13px;vertical-align:middle;}
.dx-txt{display:inline;color:#1f2733;line-height:1.85;font-size:14.5px;}
.dx-txt p{margin:7px 0;}
.dx-chap{font-size:17px;font-weight:700;color:#143a66;margin:26px 0 8px;border-left:4px solid #1a4f8b;padding-left:11px;}

/* ---------- 统一：法律原文卡片组件 ---------- */
.orig-art{border:1px solid var(--u-line);border-radius:10px;margin:12px 0;background:#fff;box-shadow:var(--u-shadow);}
.orig-hd{background:#f5f8fc;padding:10px 14px;border-bottom:1px solid var(--u-line);font-weight:700;color:#1a4f8b;font-size:16px;border-radius:9px 9px 0 0;}
.orig-body{padding:8px 16px 14px;color:#243044;font-size:15px;}
.orig-body p{margin:8px 0;}

/* ---------- 统一：导航容器（topnav / topbar 同款视觉） ---------- */
.topnav{margin:18px 0;font-size:14px;}
.topnav a,.topbar a{text-decoration:none;padding:7px 13px;border:1px solid #d8dee9;border-radius:8px;background:#fff;margin-right:8px;display:inline-block;color:#1a3c6e;min-height:36px;box-sizing:border-box;}
.gov-mini{background:#fdf4e8 !important;color:#b45309 !important;border-color:#f2d3a3 !important;font-weight:600;}
.gov-mini:hover{background:#fae8cc !important;}

/* ---------- A 首页：工具条 / 分组 / 卡片瘦身 ---------- */
.idx-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:0 0 16px;}
.idx-tools .chips{display:flex;gap:8px;flex-wrap:wrap;}
.chip{box-sizing:border-box;cursor:pointer;font-size:13px;padding:7px 15px;border:1px solid #c9d4e4;background:#fff;border-radius:999px;color:#33475f;user-select:none;min-height:36px;line-height:1.4;}
.chip:hover{border-color:#2f6df0;color:#2f6df0;}
.chip.on{background:#2f6df0;color:#fff;border-color:#2f6df0;}
/* 查找区（2026-09-18）：两个入口分组并明确归属 ——「筛选本站」就地筛列表 /「全文搜索」跳转检索条文正文。
   .find-bar 承载该组（宽屏同排、窄屏各占整行），元信息 .idx-count 不属于该组。 */
.find-bar{display:flex;align-items:center;gap:8px;flex:1 1 360px;min-width:0;}
.idx-search{flex:1 1 auto;min-width:0;display:flex;align-items:stretch;}
.idx-search .f-lab{display:flex;align-items:center;flex:0 0 auto;padding:0 10px;font-size:12.5px;
  color:#5a6b8c;background:#f4f7fc;border:1px solid #c9d4e4;border-right:0;border-radius:9px 0 0 9px;white-space:nowrap;}
.idx-search input{flex:1 1 auto;min-width:0;padding:9px 14px;border:1px solid #c9d4e4;
  border-radius:0 9px 9px 0;font-size:14px;min-height:42px;outline:none;background:#fff;color:inherit;}
.idx-search input:focus{border-color:#2f6df0;box-shadow:0 0 0 3px rgba(47,109,240,.12);}
.idx-search:focus-within .f-lab{border-color:#2f6df0;background:#eef4ff;color:#2f6df0;}
.idx-count{font-size:12.5px;color:#94a3b8;white-space:nowrap;}
.idx-searchlink{box-sizing:border-box;font-size:13px;text-decoration:none;color:#2f6df0;border:1px solid #9db9e8;border-radius:9px;padding:0 13px;white-space:nowrap;background:#f4f8ff;min-height:42px;display:inline-flex;align-items:center;gap:5px;}
.idx-searchlink .f-ico{font-size:14px;opacity:.85;}
.group-h{grid-column:1/-1;font-size:16px;font-weight:700;color:#1f3a8a;border-left:4px solid #2f6df0;padding-left:10px;margin:14px 0 2px;display:flex;align-items:baseline;gap:10px;}
.group-h:first-child{margin-top:0;}
.group-h small{color:#94a3b8;font-weight:400;font-size:12px;}
.card[data-cat]{cursor:pointer;transition:.18s;}
.card[data-cat]:hover{transform:translateY(-3px);box-shadow:0 8px 22px rgba(20,40,80,.12);border-color:#b9cdf0;}
.card p.desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.card .timeline{max-height:2.9em;overflow:hidden;transition:max-height .25s ease;cursor:pointer;position:relative;padding-right:26px;}
.card .timeline::after{content:'▾ 沿革';position:absolute;right:10px;top:8px;color:#2f6df0;font-size:11px;background:#eef3ff;border-radius:999px;padding:1px 8px;}
.card .timeline.open{max-height:260px;}
.card .timeline.open::after{content:'▴ 收起';}

/* ---------- B 逐条页：章节吸顶条 ---------- */
.chapbar{position:sticky;top:0;z-index:60;display:flex;gap:8px;align-items:center;overflow-x:auto;background:rgba(247,248,250,.95);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);padding:9px 12px;border:1px solid #dbe4f0;border-radius:10px;margin:14px 0;scrollbar-width:thin;}
.chapbar a{flex:0 0 auto;text-decoration:none;font-size:13px;color:#33475f;background:#fff;border:1px solid #d8e3f5;border-radius:999px;padding:6px 14px;white-space:nowrap;}
.chapbar a:hover{border-color:#1a4f8b;color:#1a4f8b;}
.chapbar a.on{background:#1a4f8b;color:#fff;border-color:#1a4f8b;}
.chapbar .cur{margin-left:auto;font-size:12px;color:#5a6b8c;white-space:nowrap;padding-left:8px;}

/* ---------- B 逐条页：视图工具（折叠 / 只看区别 / 密度） ---------- */
.view-tools{display:inline-flex;gap:6px;flex-wrap:wrap;align-items:center;}
.view-tools button{font-size:12.5px;padding:6px 13px;border:1px solid #c9d4e4;background:#fff;border-radius:8px;cursor:pointer;color:#33475f;min-height:36px;}
.view-tools button:hover{border-color:#1a4f8b;color:#1a4f8b;}
.view-tools button.on{background:#1a4f8b;color:#fff;border-color:#1a4f8b;}
.dx-blk.bk-opt>.dx-lab{cursor:pointer;}
.dx-blk.bk-opt>.dx-lab::after{content:' ▾';font-size:11px;opacity:.65;}
.dx-blk.bk-fold>.dx-txt{display:none;}
.dx-blk.bk-fold>.dx-lab::after{content:' ▸';}
body.fold-all .dx-blk.bk-opt>.dx-txt{display:none;}
body.fold-all .dx-blk.bk-opt>.dx-lab::after{content:' ▸';}
body.focus-bt .dx-blk.bk-opt{display:none;}
body.focus-bt .dx-blk[data-b="bt"]{display:block;margin:11px 0;}
body.focus-bt .dx-blk[data-b="bt"]>.dx-txt{display:inline;}
body.focus-bt .dx-blk[data-b="ct"]{display:block;margin:11px 0;}
body.focus-bt .dx-blk[data-b="rl"]{display:block;margin:11px 0;}
body.focus-bt .dx-blk[data-b="case"]{display:block;margin:11px 0;}
/* 密度切换（原文页/通用） */
body.dense .orig-art{margin:8px 0;}
body.dense .orig-body{padding:4px 12px 8px;}
body.dense .orig-body p{margin:4px 0;}
body.dense .dx-art{margin:10px 0;}
body.dense .dx-bd{padding:2px 10px 8px;}
body.dense .dx-blk{margin:6px 0;}
body.dense .dx-txt p{margin:3px 0;}

/* ---------- B/D：款项悬挂缩进 ---------- */
p.subitem{padding-left:2.3em;text-indent:-2.3em;}
p.subitem .sn{font-weight:600;color:#1a4f8b;}
b.sn2{font-weight:700;color:#1a4f8b;}

/* ---------- B：翻条球 + 跳转高亮 ---------- */
.pn-nav{position:fixed;right:18px;bottom:68px;display:flex;flex-direction:column;gap:8px;z-index:98;}
.pn-nav a{width:42px;height:42px;line-height:40px;text-align:center;border-radius:50%;background:#fff;border:1px solid #c9d4e4;color:#1a4f8b;font-size:20px;text-decoration:none;box-shadow:0 2px 8px rgba(0,0,0,.14);user-select:none;}
.pn-nav a:hover{background:#eef3fb;}
.pn-nav a.off{opacity:.3;pointer-events:none;}
@keyframes upg-flash{0%{background:#ffe9a8;}65%{background:#ffe9a8;}100%{background:transparent;}}
.upg-flash{animation:upg-flash 2s ease 1;}
.dx-art:target>.dx-hd,.orig-art:target>.orig-hd{animation:upg-flash 2s ease 1;}

/* ---------- E 移动端底部操作栏 ---------- */
.m-bar{display:none;}
.dark-btn{position:fixed;left:18px;bottom:18px;width:40px;height:40px;border-radius:50%;border:1px solid #c9d4e4;background:#fff;font-size:17px;cursor:pointer;z-index:98;box-shadow:0 2px 8px rgba(0,0,0,.14);line-height:1;}
@media (max-width:860px){
  .m-bar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:97;background:#fff;border-top:1px solid var(--u-line);box-shadow:0 -2px 10px rgba(0,0,0,.08);padding:5px 8px calc(5px + env(safe-area-inset-bottom));}
  .m-bar a{flex:1;text-align:center;text-decoration:none;font-size:12px;color:#33475f;padding:5px 2px;min-height:46px;display:flex;flex-direction:column;justify-content:center;gap:1px;border-radius:8px;}
  .m-bar a b{font-size:17px;display:block;line-height:1.15;}
  .m-bar a:active{background:#eef3fb;}
  /* 底栏 6 项（首页/速查/目录/搜索/主题/顶部）窄屏收紧，防溢出 */
  .m-bar a{font-size:11px;padding:5px 1px;}
  .m-bar a b{font-size:16px;}
  @media (max-width:359px){
    .m-bar a{font-size:10px;}
    .m-bar a b{font-size:15px;}
  }
  body{padding-bottom:66px;}
  .to-top{bottom:78px !important;width:38px !important;height:38px !important;line-height:36px !important;}
  .pn-nav{bottom:128px;right:12px;}
  .dark-btn{left:12px;bottom:78px;width:38px;height:38px;}
  /* quicknav 移动端紧凑化：不再整列占屏 */
  .quicknav{flex-direction:row !important;align-items:center !important;}
  .quicknav select{max-width:58% !important;width:auto !important;flex:1;}
  .view-tools{width:100%;}
}
@media (min-width:861px){ .m-bar{display:none !important;} }

/* ---------- G 打印：仅条文 + 主旨讲义模式 ---------- */
@media print{
  .topnav,.topbar,.quicknav,.view-tools,.chapbar,.pn-nav,.to-top,.dark-btn,.m-bar,
  .timeline,.idx-tools,.legend,.dx-jump,.orig-jump,footer,.note{display:none !important;}
  .dx-blk[data-b="lj"],.dx-blk[data-b="bt"],.dx-blk[data-b="pt"],.dx-blk[data-b="sy"],.dx-blk[data-b="sb"]{display:none !important;}
  body{background:#fff;font-size:12px;}
  header.top,header{background:#fff !important;color:#000 !important;border-bottom:2px solid #333;border-radius:0;padding:8px 0;margin-bottom:10px;}
  header *{color:#000 !important;background:none !important;border:none !important;}
  .dx-art,.orig-art{box-shadow:none;border-color:#bbb;break-inside:avoid;margin:6px 0;}
  .dx-hd,.orig-hd{background:#f2f2f2 !important;-webkit-print-color-adjust:exact;}
  a{color:#000 !important;text-decoration:none;}
}

/* ---------- G 暗色模式（变量级覆盖，非滤镜反色） ---------- */
html.dark{--u-ink:#d7dee8;--u-sub:#98a3b6;}/* 暗色正文 + 次要文字 5.5:1+ */
/* ↑ 2026-09-11 补 --u-ink：此前暗色只覆盖 --u-sub，导致所有使用 var(--u-ink) 的
   元素（如键盘快捷键浮层 .kbd-row）在暗色下仍为深色文字，实测仅 1.05:1。 */
html.dark body{background:#10161f;color:#d7dee8;}
html.dark header.top{background:linear-gradient(135deg,#4a100d,#7c1812);}
html.dark header{background:linear-gradient(135deg,#12234a,#1c3f80);}
html.dark .dx-art,html.dark .orig-art,html.dark .card{background:#1a2332;border-color:#2c3950;box-shadow:none;}
html.dark .dx-hd,html.dark .orig-hd{background:#212c40;border-bottom-color:#2c3950;}
html.dark .dx-no,html.dark .orig-hd,html.dark .dx-chap{color:#8fc1ff;}
html.dark .dx-ttl{color:#c3cede;}
html.dark .dx-lab{background:#1d3252;color:#9cc3f5;}
html.dark .dx-txt,html.dark .orig-body{color:#cdd6e2;}
html.dark h3.chap{background:#1b2941;color:#9cc3f5;}
html.dark h2.sec{color:#e0b4b0;border-left-color:#a33;}
html.dark .note{background:#2a2413;border-color:#4a3d17;color:#d8c07a;}
/* 页顶适用提示框（如立案追诉标准页的「入罪数额以法释〔2025〕5号为准」提示） */
.law-alert{margin:14px 0;padding:12px 16px;background:#fff8e6;border:1px solid #e8c66a;border-left:4px solid #d99b1c;border-radius:8px;font-size:13.5px;line-height:1.8;color:#5c4517;}
.law-alert b{color:#8a5a00;}
.law-alert a{color:#0e5fa8;font-weight:600;}
html.dark .law-alert{background:#2a2413;border-color:#5c4517;border-left-color:#c8912a;color:#e8c98a;}
html.dark .law-alert b{color:#f0c667;}
html.dark .law-alert a{color:#8fc1ff;}
html.sepia:not(.dark) .law-alert{background:#f6ecd5;border-color:#ddd0b8;border-left-color:#b8945a;color:#4a3c26;}
html.sepia.dark .law-alert{background:#2a2417;border-color:#4a3d17;color:#ddc98d;}
html.dark .timeline{background:#172238;border-color:#28395c;color:#aebcd2;}
html.dark .timeline b{color:#9cc3f5;}
html.dark .quicknav label{color:#93a3bd;}
html.dark .quicknav select,html.dark .idx-search input{background:#1a2332;color:#d7dee8;border-color:#2c3950;}
html.dark .topnav a,html.dark .topbar a{background:#1a2332;color:#9cc3f5;border-color:#2c3950;}
html.dark .gov-mini{background:#33270f !important;color:#e8b45a !important;border-color:#5c4517 !important;}
html.dark .chapbar{background:rgba(14,20,30,.94);border-color:#2c3950;}
html.dark .chapbar a{background:#1a2332;color:#aebcd2;border-color:#2c3950;}
html.dark .chapbar a.on{background:#2f6df0;color:#fff;border-color:#2f6df0;}
html.dark .pn-nav a,html.dark .dark-btn{background:#1a2332;color:#9cc3f5;border-color:#2c3950;}
html.dark .view-tools button{background:#1a2332;color:#aebcd2;border-color:#2c3950;}
html.dark .view-tools button.on{background:#2f6df0;color:#fff;}
html.dark .m-bar{background:#151d2b;border-top-color:#2c3950;}
html.dark .m-bar a{color:#aebcd2;}
html.dark .chip{background:#1a2332;color:#aebcd2;border-color:#2c3950;}
html.dark .chip.on{background:#2f6df0;color:#fff;border-color:#2f6df0;}
html.dark .idx-searchlink{background:#16223a;color:#9cc3f5;border-color:#2c3950;}
html.dark .idx-search .f-lab{background:#16223a;color:#8fa3c0;border-color:#2c3950;}
html.dark .idx-search input{border-left:0;}
html.sepia:not(.dark) .idx-search .f-lab{background:#f6efe0;color:#7d6a45;border-color:#d8c9a8;}
html.dark .group-h{color:#9cc3f5;border-left-color:#2f6df0;}
html.dark .card .tag{background:#1d3252;color:#9cc3f5;}
html.dark .btn.orig{background:#1d3252;color:#9cc3f5;border-color:#2c3950;}
html.dark .btn.dx{background:#12352c;color:#5fd0a8;border-color:#1e4a3c;}
html.dark .btn.gov{background:#33270f;color:#e8b45a;border-color:#5c4517;}
html.dark .meta{color:#6b7a92;}
html.dark .card .card-h a{color:#cfe0ff;}
html.dark .card p.desc{color:#aebcd2;}
html.dark .card .meta{color:#6b7a92;}
html.dark .btn{background:#1a2332;color:#9cc3f5;border-color:#2c3950;}
html.dark .btn:hover{border-color:#9cc3f5;}
html.dark footer{color:#6b7a92;border-top-color:#2c3950;}
html.dark .legend{color:#93a3bd;}
html.dark .idx-count{color:#6b7a92;}
html.dark p.subitem .sn{color:#8fc1ff;}
html.dark table.cmp th{background:#1b2941;color:#c3cede;}
html.dark table.cmp td{border-color:#2c3950;}
html.dark .pts{background:#1a2332;border-left-color:#2f6df0;color:#cdd6e2;}

/* ---------- H 宽屏动态排列优化（2026-08-25） ----------
   原逐条页 .toc 固定 columns:2，横屏宽屏下目录仅两列且两侧留白过大、浪费空间。
   改为基于列宽（column-width）的流式多列：列数随可用宽度自适应（窄屏1~2列、宽屏3~5列）。
   同时适度放宽容器上限，利用宽屏横向空间（正文阅读列仍控制在舒适宽度，不无限拉宽）。 */
.toc{columns:240px !important; column-gap:28px !important;}
@media (min-width:1200px){
  .wrap,header .wrap,header.top .inner,.inner{max-width:1140px !important;}
  .container{max-width:1140px !important;}
}
@media (min-width:1600px){
  .container{max-width:1380px !important;}
}

/* ---------- I 布局优化 v2（2026-08-28）：浏览效率提升 ----------
   1) 首页网格化：卡片多列自适应排布，一屏可见数量提升 2~3 倍
   2) 首页工具条吸顶：滚动至任意位置均可筛选/搜索
   3) 卡片分组色条 + 等高对齐：按法规类别快速视觉分区
   4) 内容页当前条号常显：条头在章节吸顶条下方 sticky
   5) 响应式：移动端单列、工具条不吸顶、间距收紧 */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:14px;align-items:stretch;}
.grid .card{margin:0;}
.card[data-cat]{display:flex;flex-direction:column;border-left:4px solid #c9d4e4;}
/* v8：左 4px 边框保留为中性造型（无语义）；旧位阶 10 条色规则已删 —— 位阶唯一编码 = 顶条 [data-wj]（单语义，通则 16） */
.card .card-actions{margin-top:auto;padding-top:10px;}
.card .card-h a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45;}
.idx-tools{position:sticky;top:0;z-index:55;background:rgba(247,248,250,.96);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);padding:10px 0 9px;margin-bottom:12px;border-bottom:1px solid #e3e8ef;}
html.dark .idx-tools{background:rgba(14,20,30,.95);border-bottom-color:#2c3950;}
/* 内容页：当前条号随滚动常显（章节吸顶条约 52px 高，条头停在其下方） */
.dx-hd,.orig-hd{position:sticky;top:52px;z-index:40;}
@media (max-width:860px){
  .idx-tools{position:static;padding:0;margin-bottom:10px;border-bottom:none;}
  .dx-hd,.orig-hd{top:0;}
  /* 2026-09-15 移动端修复：原为 `1fr`，但 1fr 的下限是 auto（= 子项 min-content），
     卡片内 nowrap 的沿革/状态片段会把轨道撑到 462px，导致首页在 375px 视口横向溢出 100px。
     改为 minmax(0,1fr) 并对子项置 min-width:0，使轨道可收缩到容器宽。 */
  .grid{grid-template-columns:minmax(0,1fr);gap:11px;}
  .grid>*{min-width:0;}
  .grid .card{padding:13px 14px;}

  /* ── 移动端可读性与触控目标（2026-09-15 实测补齐）──
     依据 `_check/_t_mobile.js`（375×812 / 360×800）：卡片索引号与沿革原为 11.5px、
     关联角标 11.5px、目录关闭按钮与速查卡引用链接高度 <36px。 */
  .card .docno,.card .tl-i,.card .tl-h,.card .meta,.card .tl{font-size:12.5px;}
  .idx-count{font-size:12.5px;}
  .rel-badge{font-size:12px;}
  /* 条号关联链接：内联链接在移动端点击偏难，加内边距扩大热区（不改变行高观感） */
  a.rel-link{padding:3px 4px;margin:-3px 0;}
  .toc-close{min-width:36px;min-height:36px;}
  .qr-refs a{min-height:34px;display:inline-flex;align-items:center;}
  .qr-item ul{font-size:14px;line-height:2;}
  .sc-hint{font-size:12.5px;}
  footer{font-size:12.5px;}
  .topnav a,.topbar a{min-height:36px;display:inline-flex;align-items:center;}
}


/* ============================================================
   J. 交互与布局优化 v3（2026-08-28）—— 手机端优先
   仅通过 site.css + site.js 生效，68 个内容页 HTML 不改动
   ============================================================ */

/* ---------- J1 令牌扩充 ---------- */
:root{
  --u-radius-lg:14px;
  --u-shadow-sm:0 1px 2px rgba(20,30,50,.05);
  --u-shadow-md:0 4px 14px rgba(20,40,80,.09);
  --u-shadow-lg:0 12px 34px rgba(20,40,80,.16);
  --chapbar-h:0px;                              /* 由 JS 实测章节吸顶条高度写入 */
  --safe-b:env(safe-area-inset-bottom,0px);
}
html{scroll-padding-top:calc(var(--chapbar-h) + 66px);}

/* ---------- J2 阅读进度条 ---------- */
#upg-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:200;
  background:linear-gradient(90deg,#2f6df0,#1a4f8b);transition:width .08s linear;pointer-events:none;}

/* ---------- J3 无障碍焦点可见 ---------- */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,
[tabindex]:focus-visible{outline:2px solid #2f6df0;outline-offset:2px;border-radius:8px;}

/* ---------- J4 块标签语义着色（视觉引导：一眼分辨块类型） ---------- */
.dx-blk[data-b="tw"]>.dx-lab{background:#e9eef7;color:#3a4a63;}
.dx-blk[data-b="zz"]>.dx-lab{background:#fdf1e2;color:#a35a08;}
.dx-blk[data-b="lj"]>.dx-lab{background:#e7f5f0;color:#0b6b58;}
.dx-blk[data-b="ct"]>.dx-lab{background:#f2ebfc;color:#6c3fc0;}
.dx-blk[data-b="rl"]>.dx-lab{background:#e4f3f8;color:#0b6a8a;}
.dx-blk[data-b="bt"]>.dx-lab{background:#fdebf1;color:#a83a63;}
.dx-blk[data-b="case"]>.dx-lab{background:#fbf1dd;color:#8a5a12;}

/* ---------- J5 表格：横滚 + 粘性表头 ---------- */
.tbl-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0;border-radius:10px;border:1px solid var(--u-line);}
.tbl-scroll>table{margin:0;min-width:520px;}
table.cmp th{position:sticky;top:0;z-index:1;background:#f5f8fc;}

/* ---------- J6 法规间导航（上一部 / 下一部） ---------- */
.law-nav{display:flex;gap:10px;margin:26px 0 8px;flex-wrap:wrap;}
.law-nav a{flex:1 1 250px;text-decoration:none;border:1px solid var(--u-line);border-radius:12px;
  padding:12px 14px;background:var(--u-card);box-shadow:var(--u-shadow-sm);transition:.18s;}
.law-nav a:hover{border-color:#2f6df0;box-shadow:var(--u-shadow-md);transform:translateY(-2px);}
.law-nav .ln-t{display:block;font-size:11.5px;color:var(--u-sub);letter-spacing:.5px;margin-bottom:2px;}
.law-nav .ln-n{display:block;font-weight:700;color:#1a4f8b;font-size:14px;line-height:1.5;}
.law-nav .ln-next{text-align:right;}

/* ---------- J7 目录抽屉（手机端核心：替代难用的下拉选条） ---------- */
.toc-fab{position:fixed;right:18px;bottom:172px;width:42px;height:42px;line-height:40px;text-align:center;
  border-radius:999px;background:#fff;border:1px solid #c9d4e4;color:#1a4f8b;font-size:17px;cursor:pointer;
  z-index:98;box-shadow:0 2px 8px rgba(0,0,0,.14);}
.toc-fab:hover{background:#eef3fb;}
.toc-mask{position:fixed;inset:0;background:rgba(10,18,32,.42);z-index:129;opacity:0;pointer-events:none;transition:opacity .22s;}
.toc-mask.open{opacity:1;pointer-events:auto;}
#toc-panel{position:fixed;top:0;right:0;bottom:0;width:min(360px,88vw);z-index:130;
  background:var(--u-card);border-left:1px solid var(--u-line);box-shadow:var(--u-shadow-lg);
  transform:translateX(101%);transition:transform .26s cubic-bezier(.4,0,.2,1);
  display:flex;flex-direction:column;}
#toc-panel.open{transform:none;}
.toc-hd{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--u-line);}
.toc-hd b{font-size:14px;color:#1f3a8a;white-space:nowrap;}
.toc-hd input{flex:1;min-width:0;padding:8px 12px;border:1px solid #c9d4e4;border-radius:9px;font-size:14px;outline:none;background:var(--u-card);color:inherit;min-height:40px;}
.toc-hd input:focus{border-color:#2f6df0;box-shadow:0 0 0 3px rgba(47,109,240,.12);}
.toc-close{border:none;background:transparent;font-size:22px;line-height:1;cursor:pointer;color:var(--u-sub);padding:4px 6px;}
.toc-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:10px 14px calc(24px + var(--safe-b));}
.toc-sec{font-weight:700;color:#1f3a8a;font-size:13px;margin:14px 0 8px;padding-left:2px;}
.toc-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:6px;}
.toc-links a{text-decoration:none;font-size:13px;color:#33475f;background:#f4f7fc;border:1px solid #e3e8ef;
  border-radius:8px;padding:8px 4px;text-align:center;min-height:38px;display:flex;align-items:center;justify-content:center;}
.toc-links a:hover{border-color:#1a4f8b;color:#1a4f8b;}
.toc-links a.on{background:#1a4f8b;color:#fff;border-color:#1a4f8b;}
.toc-empty{font-size:13px;color:var(--u-sub);padding:14px 2px;}

/* ---------- J8 快捷键帮助面板 ---------- */
.kbd-mask{position:fixed;inset:0;z-index:135;display:none;align-items:center;justify-content:center;background:rgba(10,18,32,.45);padding:20px;}
.kbd-mask.open{display:flex;}
.kbd-card{background:var(--u-card);border-radius:var(--u-radius-lg);padding:18px 20px;max-width:400px;width:100%;box-shadow:var(--u-shadow-lg);}
.kbd-card h4{margin:0 0 12px;font-size:15px;color:#1f3a8a;}
.kbd-row{display:flex;justify-content:space-between;gap:14px;padding:6px 0;font-size:13.5px;color:var(--u-ink);border-bottom:1px dashed var(--u-line);}
.kbd-row:last-child{border-bottom:none;}
kbd{display:inline-block;min-width:26px;text-align:center;padding:2px 7px;border:1px solid #c9d4e4;
  border-bottom-width:2px;border-radius:6px;background:#f7f9fc;font-size:12px;font-family:inherit;color:#33475f;}

/* ---------- J9 卡片与按钮美化（全端） ---------- */
.card[data-cat]{border-radius:var(--u-radius-lg);box-shadow:var(--u-shadow-sm);
  transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s,border-color .2s;}
.card[data-cat]:hover{transform:translateY(-4px);box-shadow:var(--u-shadow-lg);border-color:#b9cdf0;}
.card .card-h a{font-size:15.5px;line-height:1.5;}
.btn{border-radius:999px;padding:6px 14px;font-weight:600;}
.btn:hover{box-shadow:var(--u-shadow-sm);}

/* ---------- J10 桌面：正文限宽提升可读性 ---------- */
@media (min-width:1025px){
  .dx-blk,.orig-body,.note,.timeline,.legend{max-width:980px;}
  .wrap,.container{max-width:1180px !important;}
}
@media (min-width:1600px){
  .wrap,.container{max-width:1360px !important;}
}

/* ---------- J11 平板（641–1024）：两列网格 ---------- */
@media (min-width:641px) and (max-width:1024px){
  .grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:13px;}
  .wrap,.container{padding-left:18px !important;padding-right:18px !important;}
}

/* ============================================================
   J12 手机端重点优化（≤860px）
   1) 吸顶层叠修正：章节条 top:0，条文条头停在其下方（避免两者重叠）
   2) 底部操作栏 5 项：首页 / 目录 / 搜索 / 主题 / 顶部
   3) 触摸目标 ≥40px、正文字号 16px 级、行高 1.9
   4) 悬浮控件重排，避免遮挡正文
   ============================================================ */
@media (max-width:860px){
  /* 1) 吸顶层叠 */
  .chapbar{top:0;z-index:60;}
  .dx-hd,.orig-hd{top:var(--chapbar-h,0px) !important;z-index:40;}

  /* 2) 底部操作栏 */
  .m-bar{padding:4px 6px calc(4px + var(--safe-b));}
  .m-bar a{min-height:48px;font-size:11px;padding:4px 2px;}
  .m-bar a b{font-size:18px;line-height:1.1;}
  body{padding-bottom:calc(70px + var(--safe-b)) !important;}

  /* 3) 触摸目标与字号 */
  .chip{min-height:40px;padding:8px 14px;font-size:13px;}
  .btn{min-height:38px;padding:8px 15px;font-size:13.5px;}
  .view-tools button{min-height:40px;padding:8px 14px;font-size:13px;}
  .topnav a,.topbar a{min-height:44px;display:flex;align-items:center;justify-content:center;flex:1 1 auto;}
  .topnav,.topbar{display:flex;gap:8px;flex-wrap:wrap;}
  .dx-txt{font-size:15.5px;line-height:1.9;}
  .orig-body{font-size:15.5px;line-height:1.9;}
  .dx-no{font-size:15px;}
  .dx-lab{font-size:12.5px;padding:3px 9px;}

  /* 4) 悬浮控件重排（右侧：目录球→翻条球→回顶球；左下：主题） */
  .toc-fab{right:10px;bottom:210px;width:40px;height:40px;line-height:38px;font-size:16px;}
  .pn-nav{right:10px;bottom:118px;gap:7px;}
  .pn-nav a{width:40px;height:40px;line-height:38px;font-size:18px;}
  .to-top{right:10px !important;bottom:72px !important;width:40px !important;height:40px !important;line-height:38px !important;font-size:18px !important;}
  .dark-btn{left:10px;bottom:72px;width:40px;height:40px;font-size:16px;}

  /* 5) 首页工具条：chips 横滚不换行；查找区自成一组、窄屏各占整行
     ⚠️ 必须用 flex-basis 而非 width —— 在 flex 容器里 flex:1（basis:0）会压过 width，
        曾致 .idx-search 被挤到 94px，内部 182px 的输入框溢出、与「全文搜索」挤在一起。 */
  /* 横滚条带不加负边距：负边距值须与 .wrap 左右内边距完全相等，否则会多出 1px 横向溢出
     （曾用 -14px 而容器为 13px → 页面出现 1px 溢出）。此处直接留在内容框内。 */
  .idx-tools .chips{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .idx-tools .chips::-webkit-scrollbar{display:none;}
  .idx-tools .chips .chip{flex:0 0 auto;}
  .find-bar{flex:1 1 100%;flex-wrap:wrap;gap:8px;}
  /* 641–860（平板）：find-bar 独占一行，但**内部同排**——输入框自适应、按钮靠右 */
  .idx-search{flex:1 1 auto;min-width:0;min-height:42px;}
  .idx-search input{min-height:42px;}
  .idx-count{flex:1 1 auto;}
  .idx-search input{min-height:44px;font-size:15px;}
  .idx-searchlink{min-height:40px;display:inline-flex;align-items:center;}

  /* 6) 抽屉：底部弹出（bottom sheet）更符合手机操作习惯 */
  #toc-panel{top:auto;left:0;right:0;bottom:0;width:auto;max-height:70vh;
    border-left:none;border-top:1px solid var(--u-line);border-radius:16px 16px 0 0;
    transform:translateY(101%);}
  #toc-panel.open{transform:none;}
  .toc-hd{padding-top:14px;}
  .toc-hd::before{content:'';position:absolute;top:6px;left:50%;transform:translateX(-50%);
    width:38px;height:4px;border-radius:999px;background:#cbd5e1;}
  .toc-hd{position:relative;}
}

/* ---------- J13 窄屏手机（≤640px）细节 ---------- */
@media (max-width:640px){
  body{font-size:15.5px;line-height:1.85;}
  h1{font-size:19px !important;line-height:1.4 !important;}
  .wrap,.container{padding-left:13px !important;padding-right:13px !important;}
  header.top{padding:22px 18px;border-radius:12px;}
  header.top h1{font-size:20px;}
  .card[data-cat]{padding:14px 15px;border-radius:13px;}
  .card .card-h a{font-size:15px;}
  .card p.desc{font-size:12.5px;margin:5px 0 9px;}
  .card .card-actions{gap:6px;}
  .btn{padding:7px 12px;font-size:12.5px;}
  .grid{gap:10px;}
  .group-h{font-size:15px;margin:12px 0 0;}
  .dx-bd{padding:4px 12px 12px;}
  .orig-body{padding:6px 13px 13px;}
  .dx-hd,.orig-hd{padding:9px 12px;}
  .dx-ttl{font-size:13px;}
  .law-nav a{flex:1 1 100%;}
  .toc-links{grid-template-columns:repeat(auto-fill,minmax(62px,1fr));gap:5px;}
  .toc-links a{font-size:12.5px;padding:7px 3px;min-height:36px;}
  .quicknav{flex-direction:column !important;align-items:stretch !important;}
  .quicknav select{max-width:100% !important;width:100% !important;min-height:44px;font-size:15px;}
  .note,.timeline{font-size:13px;padding:10px 12px;}
  .legend{gap:6px 10px;font-size:11.5px;}
  footer{font-size:11.5px;margin-top:26px;}
}

/* ---------- J14 横屏手机（矮高度）：压缩纵向占用 ---------- */
@media (max-height:480px) and (max-width:900px){
  header.top{padding:16px 18px;margin-bottom:16px;}
  .m-bar a{min-height:42px;}
  .m-bar a b{font-size:16px;}
  body{padding-bottom:calc(58px + var(--safe-b)) !important;}
  .toc-fab{bottom:170px;}
  .pn-nav{bottom:100px;}
}

/* ---------- J15 减弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;}
}

/* ---------- J16 v3 新增元素的暗色适配 ---------- */
html.dark #toc-panel,html.dark .law-nav a,html.dark .kbd-card{background:#1a2332;border-color:#2c3950;}
html.dark .toc-hd{border-bottom-color:#2c3950;}
html.dark .toc-hd b,html.dark .kbd-card h4{color:#9cc3f5;}
html.dark .toc-hd input{background:#151d2b;border-color:#2c3950;color:#d7dee8;}
html.dark .toc-links a{background:#16202f;color:#aebcd2;border-color:#2c3950;}
html.dark .toc-links a:hover,html.dark .toc-links a.on{background:#2f6df0;color:#fff;border-color:#2f6df0;}
html.dark .toc-close{color:#93a3bd;}
html.dark .toc-fab{background:#1a2332;color:#9cc3f5;border-color:#2c3950;}
html.dark .law-nav .ln-n{color:#9cc3f5;}
html.dark kbd{background:#16202f;border-color:#2c3950;color:#c3cede;}
html.dark .tbl-scroll{border-color:#2c3950;}
html.dark table.cmp th{background:#1b2941;}
html.dark .dx-blk[data-b="tw"]>.dx-lab{background:#243149;color:#b9c8de;}
html.dark .dx-blk[data-b="zz"]>.dx-lab{background:#3a2a12;color:#f0b35c;}
html.dark .dx-blk[data-b="lj"]>.dx-lab{background:#123328;color:#5fd0a8;}
html.dark .dx-blk[data-b="ct"]>.dx-lab{background:#2a1f45;color:#c3a6ff;}
html.dark .dx-blk[data-b="rl"]>.dx-lab{background:#10333f;color:#6fd3ee;}
html.dark .dx-blk[data-b="bt"]>.dx-lab{background:#3a1b28;color:#f5a0bd;}
html.dark .dx-blk[data-b="case"]>.dx-lab{background:#3a2a0d;color:#e8b45a;}
html.dark #upg-progress{background:linear-gradient(90deg,#5da2ff,#2f6df0);}

/* ---------- J17 修正：条头吸顶位置跟随实测章节条高度（移动端规则带 !important，优先级更高） ---------- */
.dx-hd,.orig-hd{top:var(--chapbar-h,52px);}
/* 表格：窄表占满容器、宽表溢出横滚（避免固定 520px 拉伸窄表） */
.tbl-scroll>table{min-width:100%;width:max-content;}

/* ---------- J18 搜索页与全站协同（body.search-page） ---------- */
body.search-page .wrap{max-width:900px !important;}
html.dark body.search-page{--bg:#10161f;--card:#1a2332;--ink:#d7dee8;--sub:#93a3bd;--line:#2c3950;}
html.dark .item{border-color:#2c3950;}
html.dark .item .no{color:#9cc3f5;}
html.dark .item .prev{color:#cdd6e2;}
html.dark .item .law{background:#1d3252;color:#9cc3f5;}
html.dark .sbox input{background:#1a2332;color:#d7dee8;}
html.dark mark{background:#5c4a12;color:#f5d98a;}
html.dark .meta-line,html.dark .empty{color:#93a3bd;}
html.dark .sbox a.back{border-color:#3d4c66;color:#cfe0ff;}
html.dark body.search-page footer{color:#6b7a92;border-top-color:#2c3950;}
body.search-page header{padding-top:20px;}
@media (max-width:860px){
  body.search-page header{padding-top:16px;}
  body.search-page .sbox{max-width:100%;}
}


/* ============================================================
   K. 手机端法条阅读体验优化 v4（2026-08-29）
   聚焦"阅读本身"：只看原文 / 字号档位 / 款项视觉 / 位置记忆 / 条头压缩
   ============================================================ */

/* ---------- K1 正文字号档位（0小 1标准 2大 3特大） ---------- */
html{--fs-body:15px;}
@media (max-width:860px){ html{--fs-body:15.5px;} }
html.fs-0{--fs-body:14px;}
html.fs-2{--fs-body:17px;}
html.fs-3{--fs-body:18.5px;}
.dx-txt,.orig-body{font-size:var(--fs-body);}
.dx-txt p,.orig-body p{font-size:inherit;}
.dx-no,.orig-hd{font-size:calc(var(--fs-body) + .5px);}

/* ---------- K2 只看原文模式（现场查阅最常用） ---------- */
body.only-tw .dx-blk[data-b="lj"],
body.only-tw .dx-blk[data-b="ct"],
body.only-tw .dx-blk[data-b="rl"],
body.only-tw .dx-blk[data-b="bt"],
body.only-tw .dx-blk[data-b="case"]{display:none !important;}
body.only-tw .dx-bd{padding-bottom:8px;}
body.only-tw .dx-art{margin:10px 0;}
/* 只留原文时，主旨块弱化为一句话提示 */
body.only-tw .dx-blk[data-b="zz"]{margin:8px 0 4px;}

/* ---------- K3 款项（一）（二）视觉强化：长条文扫读性 ---------- */
.para-item{margin:7px 0;padding-left:10px;border-left:2px solid #cfe0f5;color:#243044;line-height:1.9;}
.para-item .sn{font-weight:700;color:#1a4f8b;}
html.dark .para-item{border-left-color:#33507a;color:#cdd6e2;}
html.dark .para-item .sn{color:#8fc1ff;}

/* ---------- K4 目录抽屉内的阅读设置 ---------- */
.toc-tools{display:flex;gap:6px;flex-wrap:wrap;align-items:center;padding:10px 14px;border-bottom:1px solid var(--u-line);}
.toc-tools .rt-lab{font-size:12px;color:var(--u-sub);margin-right:auto;}
.toc-tools button{font-size:12.5px;padding:7px 12px;border:1px solid #c9d4e4;background:var(--u-card);
  border-radius:8px;cursor:pointer;color:#33475f;min-height:38px;}
.toc-tools button:hover{border-color:#1a4f8b;color:#1a4f8b;}
.toc-tools button.on{background:#1a4f8b;color:#fff;border-color:#1a4f8b;}

/* ---------- K5 阅读位置恢复提示 ---------- */
.resume-tip{position:fixed;left:50%;transform:translateX(-50%);z-index:140;
  bottom:calc(84px + var(--safe-b));background:#1a3c6e;color:#fff;font-size:13px;
  padding:9px 16px;border-radius:999px;box-shadow:0 4px 14px rgba(0,0,0,.22);
  display:flex;align-items:center;gap:12px;max-width:92vw;}
.resume-tip a{color:#ffe08a;text-decoration:none;font-weight:600;white-space:nowrap;}
html.dark .resume-tip{background:#2f6df0;}
html.dark .resume-tip a{color:#ffe9b0;}

/* ---------- K6 手机端阅读细节微调 ---------- */
@media (max-width:860px){
  .dx-art{margin:12px 0;}
  .orig-art{margin:11px 0;}
  .dx-hd,.orig-hd{padding:8px 12px;}
  .dx-bd{padding:4px 12px 12px;}
  .orig-body{padding:6px 12px 13px;}
  /* 条头吸顶时加左侧色条，强化"当前条"指示 */
  .dx-hd{box-shadow:inset 3px 0 0 #1a4f8b;}
  .orig-hd{box-shadow:inset 3px 0 0 #1a4f8b;}
  .m-bar a{font-size:10.5px;}
  .m-bar a b{font-size:17px;}
  .resume-tip{bottom:calc(80px + var(--safe-b));font-size:12.5px;padding:8px 14px;}
}
@media (max-width:640px){
  .para-item{padding-left:9px;}
  .toc-tools button{flex:1 1 auto;min-height:40px;}
}

/* ---------- K7 v4 元素暗色适配 ---------- */
html.dark .toc-tools{border-bottom-color:#2c3950;}
html.dark .toc-tools .rt-lab{color:#93a3bd;}
html.dark .toc-tools button{background:#1a2332;color:#aebcd2;border-color:#2c3950;}
html.dark .toc-tools button:hover{border-color:#9cc3f5;color:#9cc3f5;}
html.dark .toc-tools button.on{background:#2f6df0;color:#fff;border-color:#2f6df0;}


/* ============================================================
   L. 全站综合升级 v5（2026-08-29）—— 性能 / 流畅性 / 触摸目标 / 细节
   体检依据：著作权法页高 133,400px、3358 节点（手机）；
            14/34 页 h1 重复；搜索页 .to-top 仅 24px；
            全局 smooth 滚动致超长页长距离跳转缓慢。
   ============================================================ */

/* ---------- L1 长页面渲染性能（结论：不使用 content-visibility） ----------
   曾尝试 .dx-bd{content-visibility:auto;contain-intrinsic-size:auto 420px} 以跳过
   视口外渲染，实测代价不可接受：
     · 页高由 133,400px 缩至 81,116px，但仅为"估算高度"；
     · 条文实际高度（800~2000px）与估算值 420px 差异巨大，误差沿文档累计，
       导致锚点跳转严重失准——跳第 60 条后条头距视口顶 704px（应≈90px），
       且原生 hash 导航同样受影响（浏览器按估算高度计算目标位置）。
   法规研习站的核心价值是"精确定位到条文"，定位失准属致命缺陷，故弃用。
   改为低成本优化：移除昂贵视觉效果（backdrop-filter）、限定过渡属性、GPU 合成提示。 */
.dx-art,.orig-art{contain:layout style;}
@media (min-width:1025px){
  /* 桌面宽屏：为可视区外的条文内容关闭动画，减少合成开销 */
  .dx-bd *,.orig-body *{animation:none !important;}
}

/* ---------- L2 滚动行为：取消全局平滑，避免超长页长距离跳转卡顿 ----------
   （平滑滚动由 JS 按距离智能选择：短距离 smooth、长距离 instant） */
html{scroll-behavior:auto;}

/* ---------- L3 .to-top 统一基础样式（此前仅各页内联定义，搜索页缺失） ---------- */
.to-top{position:fixed;right:18px;bottom:18px;width:42px;height:42px;line-height:40px;
  text-align:center;border-radius:999px;background:#1a3c6e;color:#fff;font-size:20px;
  text-decoration:none;box-shadow:0 2px 10px rgba(0,0,0,.2);z-index:99;opacity:.88;
  display:flex;align-items:center;justify-content:center;}
.to-top:hover{opacity:1;}
html.dark .to-top{background:#2f6df0;color:#fff;}

/* ---------- L4 触摸目标补足（手机端所有可点元素 ≥40px） ---------- */
@media (max-width:860px){
  .dx-jump{min-height:40px;display:inline-flex;align-items:center;}
  .chapbar a{min-height:40px;display:inline-flex;align-items:center;}
  footer a{min-height:40px;display:inline-flex;align-items:center;padding:0 4px;}
  .toc-links a{min-height:40px;}
  .idx-searchlink{min-height:44px;}
  .orig-jump a{min-height:40px;display:inline-flex;align-items:center;}
}

/* ---------- L5 美观细节 ---------- */
/* 卡片：更细腻的层次 */
.dx-art,.orig-art{border-radius:12px;}
.card[data-cat]{border-radius:14px;}
/* 头部：加深渐变、更精致 */
header.top{background:linear-gradient(135deg,#a81f18,#7c1812) !important;}
/* 悬浮控件：统一柔和阴影与过渡 */
.toc-fab,.pn-nav a,.dark-btn,.to-top{transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;}
.toc-fab:hover,.pn-nav a:hover,.dark-btn:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(20,40,80,.18);}
/* 块标签：轻微圆角与字重，提升可读性 */
.dx-lab{border-radius:6px;font-size:12.5px;}
/* 条文条头：吸顶时更明显（注意：不使用 backdrop-filter——长页面滚动时每个 sticky
   条头做模糊会显著掉帧，实测得不偿失） */
.dx-hd,.orig-hd{box-shadow:inset 0 -1px 0 rgba(20,40,80,.06);}
@media (max-width:860px){
  .dx-hd{box-shadow:inset 3px 0 0 #1a4f8b,inset 0 -1px 0 rgba(20,40,80,.06);}
  .orig-hd{box-shadow:inset 3px 0 0 #1a4f8b,inset 0 -1px 0 rgba(20,40,80,.06);}
}
/* 搜索页：结果数徽标 */
.meta-line{display:flex;align-items:center;gap:8px;}


/* ============================================================
   M. 修复：法律原文/逐条页正文首行被遮（2026-08-31，桌面端为主）
   根因一：各页内联样式残留 .orig-art/.dx-art{overflow:hidden}——
           sticky 的 .orig-hd/.dx-hd 在 overflow:hidden 父容器内失效，
           条头不再吸顶，滚动定位后正文首行暴露在章节吸顶条（z-index:60）之下被遮。
           （第15次曾改 site.css，但未清理各页内联样式，此处用同特异性后加载规则覆盖。）
   根因二：v1 的 .dx-art/.orig-art{scroll-margin-top:90px} 与 v3 的
           html{scroll-padding-top:calc(var(--chapbar-h) + 66px)} 叠加为 212px，
           跳转落点偏差。统一由 scroll-padding-top 管理。
   仅调整定位行为，不影响移动端/平板既有布局；条头圆角已由
   .dx-hd/.orig-hd 的 border-radius:9px 9px 0 0 承担（原先依赖父级裁剪）。
   ============================================================ */
.dx-art,.orig-art{overflow:visible;}
.dx-art,.orig-art{scroll-margin-top:0;}
/* 正文与条头之间保留呼吸空间，杜绝任何负边距穿越 */
.orig-body{position:relative;z-index:1;}
.dx-bd{position:relative;z-index:1;}


/* ============================================================
   N. 体验优化 v6（2026-09-02）：浮动「首页」钮 + 切页保留条文
   说明：桌面端右下操作簇新增常驻回首页圆钮（to-top ↑ → pn ‹› → home ⌂），
         toc-fab ☰ 同步上移一格；移动端隐藏（底栏 m-bar 已含「首页」）。
   ============================================================ */
.home-fab{position:fixed;right:18px;bottom:172px;width:42px;height:42px;line-height:38px;text-align:center;border-radius:999px;background:#fff;border:1px solid #c9d4e4;color:#1a4f8b;font-size:20px;text-decoration:none;cursor:pointer;z-index:98;box-shadow:0 2px 8px rgba(0,0,0,.14);display:flex;align-items:center;justify-content:center;transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;}
.home-fab:hover{background:#eef3fb;transform:translateY(-2px);box-shadow:0 6px 16px rgba(20,40,80,.18);}
.swap-fab{position:fixed;right:68px;bottom:172px;width:42px;height:42px;line-height:38px;text-align:center;border-radius:999px;background:#fff;border:1px solid #c9d4e4;color:#1a4f8b;font-size:17px;text-decoration:none;cursor:pointer;z-index:98;box-shadow:0 2px 8px rgba(0,0,0,.14);display:flex;align-items:center;justify-content:center;transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;}
.swap-fab:hover{background:#eef3fb;transform:translateY(-2px);box-shadow:0 6px 16px rgba(20,40,80,.18);}
html.dark .swap-fab{background:#1a2332;color:#9cc3f5;border-color:#2c3950;}
html.dark .swap-fab:hover{background:#223049;}

html.dark .home-fab{background:#1a2332;color:#9cc3f5;border-color:#2c3950;}
html.dark .home-fab:hover{background:#223049;}
@media (min-width:861px){
  .toc-fab{bottom:226px;}        /* 目录钮上移一格，让位给 home-fab */
}
@media (max-width:860px){
  .home-fab,.swap-fab{display:none;}  /* 移动端底栏已有首页 / 原文⇄解析切换 */
}
@media (max-height:560px){
  .home-fab{right:12px;bottom:150px;width:36px;height:36px;line-height:34px;font-size:17px;}
  .swap-fab{right:56px;bottom:150px;width:36px;height:36px;line-height:34px;font-size:15px;}
  .toc-fab{bottom:198px;}
}


/* ============================================================================
   O. 护眼模式（Eye-care / Sepia）2026-09-02
   机制：html.sepia = 暖色浅色；html.sepia.dark = 暖色深色（跟随系统深色偏好）
   位置：置于暗色块之后 —— 同时命中 dark 与 sepia 时护眼优先（同特异性后者胜；
   深色变体用 html.sepia.dark 更高特异性，避免被 html.dark 规则反向覆盖）。
   约束：仅覆盖配色（background/color/border-color 等 paint 属性），
        不改动任何尺寸/间距/字体/布局，切换只触发重绘不触发重排。
   对比度（WCAG AA，实测计算）：
     浅色：正文 #332b1f / 底 #f2e9d8 = 11.5:1；次要 #6d6152 = 4.99:1
     深色：正文 #e6d9bd / 底 #1c1811 = 12.5:1；次要 #b5a684 = 7.30:1
   ========================================================================== */

/* ---------- O1 令牌覆盖（暖色、降蓝光） ---------- */
html.sepia{
  --u-primary:#7d5320; --u-accent:#9a5b12; --u-ok:#4f7a34; --u-gov:#8a5a2b;
  --u-bg:#f2e9d8; --u-card:#fbf4e4; --u-line:#ddd0b8;
  --u-ink:#332b1f; --u-sub:#6d6152;
  --u-shadow:0 1px 3px rgba(80,60,25,.08);
}
html.sepia.dark{
  --u-primary:#e0b466; --u-accent:#e8b955; --u-ok:#8fbf6a; --u-gov:#d9a441;
  --u-bg:#1c1811; --u-card:#262019; --u-line:#3a3225;
  --u-ink:#e6d9bd; --u-sub:#b5a684;
  --u-shadow:none;
}

/* ---------- O2 页面与主要容器 ---------- */
html.sepia body{background:#f2e9d8;color:#332b1f;}
html.sepia.dark body{background:#1c1811;color:#e6d9bd;}
html.sepia:not(.dark) header,html.sepia:not(.dark) header.top{background:linear-gradient(135deg,#d4c2a0,#b89b6a);color:#3a2e1a;}
html.sepia.dark header,html.sepia.dark header.top{background:linear-gradient(135deg,#2b2416,#4a3a1c);}
html.sepia:not(.dark) .dx-art,html.sepia:not(.dark) .orig-art,html.sepia:not(.dark) .card{background:#fbf4e4;border-color:#ddd0b8;box-shadow:var(--u-shadow);}
html.sepia.dark .dx-art,html.sepia.dark .orig-art,html.sepia.dark .card{background:#262019;border-color:#3a3225;box-shadow:none;}
html.sepia:not(.dark) .dx-hd,html.sepia:not(.dark) .orig-hd{background:#efe4cd;border-bottom-color:#ddd0b8;}
html.sepia.dark .dx-hd,html.sepia.dark .orig-hd{background:#2f281c;border-bottom-color:#3a3225;}

/* ---------- O3 文字与标签 ---------- */
html.sepia .dx-no,html.sepia .orig-hd,html.sepia .dx-chap{color:#7d5320;}
html.sepia.dark .dx-no,html.sepia.dark .orig-hd,html.sepia.dark .dx-chap{color:#e0b466;}
html.sepia:not(.dark) .dx-ttl{color:#5c4a2c;}
html.sepia.dark .dx-ttl{color:#cbbb95;}
html.sepia:not(.dark) .dx-txt,html.sepia:not(.dark) .orig-body{color:#332b1f;}
html.sepia.dark .dx-txt,html.sepia.dark .orig-body{color:#e6d9bd;}
html.sepia:not(.dark) .dx-lab{background:#e8dcc0;color:#6b4a12;}
html.sepia.dark .dx-lab{background:#3a3225;color:#e0b466;}
html.sepia:not(.dark) p,html.sepia:not(.dark) li,html.sepia:not(.dark) td,html.sepia:not(.dark) th{color:#332b1f;}
html.sepia.dark p,html.sepia.dark li,html.sepia.dark td,html.sepia.dark th{color:#e6d9bd;}

/* ---------- O4 提示块 / 时间线 / 表格 ---------- */
html.sepia .note{background:#f6ecd5;border-color:#ddd0b8;color:#4a3c26;}
html.sepia.dark .note{background:#2a2417;border-color:#4a3d17;color:#ddc98d;}
html.sepia:not(.dark) .timeline{background:#f6ecd5;border-color:#ddd0b8;color:#4a3c26;}
html.sepia.dark .timeline{background:#221d13;border-color:#3a3225;color:#c8b98d;}
html.sepia:not(.dark) .timeline b{color:#7d5320;}
html.sepia.dark .timeline b{color:#e0b466;}
html.sepia:not(.dark) table.cmp th{background:#efe4cd;}
html.sepia.dark table.cmp th{background:#2f281c;}
html.sepia:not(.dark) table.cmp td{background:#fbf4e4;}
html.sepia.dark table.cmp td{background:#262019;border-color:#3a3225;}
html.sepia:not(.dark) .tbl-scroll{border-color:#ddd0b8;}
html.sepia.dark .tbl-scroll{border-color:#3a3225;}

/* ---------- O5 导航与控件 ---------- */
html.sepia .topnav a,html.sepia .topbar a{background:#fbf4e4;color:#7d5320;border-color:#ddd0b8;}
html.sepia.dark .topnav a,html.sepia.dark .topbar a{background:#262019;color:#e0b466;border-color:#3a3225;}
html.sepia:not(.dark) .gov-mini{background:#f2e3c2;color:#8a5a2b;border-color:#d8c49a;}
html.sepia.dark .gov-mini{background:#332a18;color:#e0b466;border-color:#4a3d17;}
html.sepia:not(.dark) .chapbar{background:rgba(242,233,216,.96);border-color:#ddd0b8;}
html.sepia.dark .chapbar{background:rgba(28,24,17,.96);border-color:#3a3225;}
html.sepia:not(.dark) .chapbar a{color:#6d6152;}
html.sepia.dark .chapbar a{color:#b5a684;}
html.sepia:not(.dark) .chapbar a.on{color:#7d5320;background:#efe4cd;}
html.sepia.dark .chapbar a.on{color:#1c1811;background:#e0b466;}
html.sepia:not(.dark) .quicknav label,html.sepia:not(.dark) .legend{color:#6d6152;}
html.sepia.dark .quicknav label,html.sepia.dark .legend{color:#b5a684;}
html.sepia:not(.dark) .quicknav select,html.sepia:not(.dark) .idx-search input,html.sepia:not(.dark) .toc-hd input{background:#fbf4e4;color:#332b1f;border-color:#ddd0b8;}
html.sepia.dark .quicknav select,html.sepia.dark .idx-search input,html.sepia.dark .toc-hd input{background:#262019;color:#e6d9bd;border-color:#3a3225;}
html.sepia:not(.dark) .btn,html.sepia:not(.dark) .view-tools button{background:#fbf4e4;color:#6d6152;border-color:#ddd0b8;}
html.sepia.dark .btn,html.sepia.dark .view-tools button{background:#262019;color:#b5a684;border-color:#3a3225;}
html.sepia:not(.dark) .view-tools button.on,html.sepia:not(.dark) .chip.on{background:#efe4cd;color:#7d5320;border-color:#c9b48a;}
html.sepia.dark .view-tools button.on,html.sepia.dark .chip.on{background:#4a3a1c;color:#e0b466;border-color:#6b5628;}
html.sepia:not(.dark) .chip{background:#fbf4e4;color:#6d6152;border-color:#ddd0b8;}
html.sepia.dark .chip{background:#262019;color:#b5a684;border-color:#3a3225;}

/* ---------- O6 浮动按钮 / 底栏 / 抽屉 / 页脚 ---------- */
html.sepia .dark-btn,html.sepia .home-fab,html.sepia .swap-fab,html.sepia .to-top,html.sepia .toc-fab,html.sepia .pn-nav a{background:#fbf4e4;border-color:#ddd0b8;color:#7d5320;}
html.sepia.dark .dark-btn,html.sepia.dark .home-fab,html.sepia.dark .swap-fab,html.sepia.dark .to-top,html.sepia.dark .toc-fab,html.sepia.dark .pn-nav a{background:#2f281c;border-color:#4a3d17;color:#e0b466;}
html.sepia:not(.dark) .to-top{background:#7d5320;color:#fbf4e4;border-color:#7d5320;}
html.sepia.dark .to-top{background:#e0b466;color:#1c1811;border-color:#e0b466;}
html.sepia:not(.dark) .m-bar{background:#f2e9d8;border-top-color:#ddd0b8;}
html.sepia.dark .m-bar{background:#1c1811;border-top-color:#3a3225;}
html.sepia:not(.dark) .m-bar a{color:#6d6152;}
html.sepia.dark .m-bar a{color:#b5a684;}
html.sepia:not(.dark) #toc-panel{background:#fbf4e4;}
html.sepia.dark #toc-panel{background:#262019;}
html.sepia:not(.dark) .toc-hd{background:#efe4cd;border-bottom-color:#ddd0b8;}
html.sepia.dark .toc-hd{background:#2f281c;border-bottom-color:#3a3225;}
html.sepia:not(.dark) .toc-hd b,html.sepia:not(.dark) .law-nav a{color:#7d5320;}
html.sepia.dark .toc-hd b,html.sepia.dark .law-nav a{color:#e0b466;}
html.sepia:not(.dark) .toc-links a{color:#4a3c26;}
html.sepia.dark .toc-links a{color:#cbbb95;}
html.sepia:not(.dark) .toc-links a:hover,html.sepia:not(.dark) .toc-links a.on{background:#efe4cd;}
html.sepia.dark .toc-links a:hover,html.sepia.dark .toc-links a.on{background:#3a3225;}
html.sepia:not(.dark) footer,html.sepia:not(.dark) .meta,html.sepia:not(.dark) .card p.desc,html.sepia:not(.dark) .card .meta{color:#6d6152;}
html.sepia.dark footer,html.sepia.dark .meta,html.sepia.dark .card p.desc,html.sepia.dark .card .meta{color:#b5a684;}
html.sepia:not(.dark) .group-h{background:#efe4cd;color:#7d5320;}
html.sepia.dark .group-h{background:#2f281c;color:#e0b466;}
html.sepia:not(.dark) .card .card-h a,html.sepia:not(.dark) .idx-searchlink,html.sepia:not(.dark) .idx-count{color:#7d5320;}
html.sepia.dark .card .card-h a,html.sepia.dark .idx-searchlink,html.sepia.dark .idx-count{color:#e0b466;}
html.sepia:not(.dark) .docno,html.sepia:not(.dark) .eff{color:#6d6152;}
html.sepia.dark .docno,html.sepia.dark .eff{color:#b5a684;}
html.sepia:not(.dark) h2.sec,html.sepia:not(.dark) h3.chap,html.sepia:not(.dark) h2.chap{color:#7d5320;}
html.sepia.dark h2.sec,html.sepia.dark h3.chap,html.sepia.dark h2.chap{color:#e0b466;}
html.sepia:not(.dark) mark,html.sepia:not(.dark) .hl{background:#f5dd9c;color:#332b1f;}
html.sepia.dark mark,html.sepia.dark .hl{background:#5c4a1c;color:#f0dfae;}

/* ---------- O7 平滑过渡（仅 paint 属性，不触发重排；尊重减少动效） ---------- */
html.sepia body,html.sepia .dx-art,html.sepia .orig-art,html.sepia .card,
html.sepia .dx-hd,html.sepia .orig-hd,html.sepia .dx-lab,html.sepia .note,
html.sepia .timeline,html.sepia .topnav a,html.sepia .topbar a,html.sepia .chapbar,
html.sepia .m-bar,html.sepia #toc-panel,html.sepia .toc-hd,html.sepia .quicknav select{
  transition:background-color .28s ease,color .28s ease,border-color .28s ease;
}


/* ---------- O8 护眼模式切换钮（与 dark-btn 同簇同款，仅配色随主题） ---------- */
.eye-btn{position:fixed;left:68px;bottom:18px;width:40px;height:40px;border-radius:50%;border:1px solid #c9d4e4;background:#fff;font-size:16px;cursor:pointer;z-index:98;box-shadow:0 2px 8px rgba(0,0,0,.14);line-height:1;display:flex;align-items:center;justify-content:center;transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;}
.eye-btn:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(20,40,80,.18);}
html.dark .eye-btn{background:#1a2332;color:#9cc3f5;border-color:#2c3950;}
html.sepia:not(.dark) .eye-btn{background:#fbf4e4;border-color:#ddd0b8;color:#7d5320;}
html.sepia.dark .eye-btn{background:#2f281c;border-color:#4a3d17;color:#e0b466;}
@media (max-width:860px){
  .eye-btn{left:58px;bottom:72px;width:38px;height:38px;font-size:15px;}
}
@media (max-height:560px){
  .eye-btn{left:52px;bottom:12px;width:34px;height:34px;font-size:14px;}
}


/* ============================================================================
   P. 渲染性能优化 v7（2026-09-02）—— 针对"内容页布局耗时占比 80%"的实测瓶颈
   前提：此前 content-visibility:auto 因"估算高度导致锚点跳转失准"已被明确否决
        （见 L1 注释），故本轮只采用**不改变高度计算**的隔离手段：
        contain: content / layout style —— 把卡片的布局与绘制影响封闭在容器内，
        浏览器可跳过跨容器的样式与布局传播，且不影响文档总高度与锚点定位精度。
   补充：限定 paint 层的合成提示，避免为纯色卡片创建多余合成层。
   ========================================================================== */
/* 条卡内部容器：布局+样式+绘制三重隔离（高度仍由内容决定，锚点不受影响） */
.dx-bd,.orig-body{contain:content;}
/* 释义块：块级隔离，长条文内多个块互不影响 */
.dx-blk,.chap-blk{contain:layout style;}
/* 章节吸顶条与浮层：限制重绘范围 */
.chapbar,.m-bar{contain:layout style;}
@media (min-width:1025px){
  /* 桌面宽屏：长文档下为视口外卡片标题减少昂贵的阴影绘制（不改变布局） */
  .dx-art,.orig-art{contain:layout style;}
}

/* ---------- O10 !important 对抗：原站 header.top / .gov-mini 带 !important，
             护眼覆盖必须同用 !important 且特异性更高才生效 ---------- */
html.sepia header.top{background:linear-gradient(135deg,#d4c2a0,#b89b6a) !important;}
html.sepia:not(.dark) header.top h1,html.sepia:not(.dark) header.top .docno,html.sepia:not(.dark) header.top .eff,
html.sepia:not(.dark) header.top .meta,html.sepia:not(.dark) header.top .pill{color:#3a2e1a !important;}
html.sepia:not(.dark) header.top .pill{background:rgba(255,255,255,.55) !important;border-color:#c3aa7c !important;}
html.sepia.dark header.top{background:linear-gradient(135deg,#2b2416,#4a3a1c) !important;}
html.sepia.dark header.top h1,html.sepia.dark header.top .docno,html.sepia.dark header.top .eff,
html.sepia.dark header.top .meta,html.sepia.dark header.top .pill{color:#e6d9bd !important;}
html.sepia.dark header.top .pill{background:rgba(0,0,0,.28) !important;border-color:#5c4a1c !important;}
html.sepia:not(.dark) .gov-mini{background:#f2e3c2 !important;color:#8a5a2b !important;border-color:#d8c49a !important;}
html.sepia.dark .gov-mini{background:#332a18 !important;color:#e0b466 !important;border-color:#4a3d17 !important;}
/* 官方发文号（patch_docno.py 注入 header）：用 opacity 继承 header 文字色——
   详情页 header 为深色渐变底（白字），护眼模式白底黑字（143 行），均自然适配；sepia 见 795 行 */
header .docno{font-size:13px;opacity:.82;margin-top:3px;letter-spacing:.3px;line-height:1.7;}

/* ==========================================================================
   法条关联跳转（2026-09-04 增量 · 数据源 rel-index.js，交互见 site.js 尾部模块）
   ========================================================================== */
.dx-art.has-rel,.orig-art.has-rel{border-left:3px solid #7c9cd8;}
.rel-link{color:#1a5fb4;text-decoration:underline dotted;text-underline-offset:3px;cursor:pointer;font-weight:700;border-radius:4px;padding:0 2px;}
.rel-link:hover{color:#0b57d0;text-decoration-style:solid;background:#eef4ff;}
.rel-badge{display:inline-block;font-size:11px;font-weight:600;color:#1a5fb4;background:#e8f1ff;border:1px solid #c5d9f5;border-radius:999px;padding:0 7px;margin-left:7px;cursor:help;vertical-align:2px;white-space:nowrap;}
.rel-pop{position:absolute;z-index:999;min-width:270px;max-width:430px;background:#fff;border:1px solid #c9d4e4;border-radius:10px;box-shadow:0 8px 28px rgba(20,30,60,.18);padding:6px;font-size:13px;}
.rel-pop-h{font-weight:700;color:#1a4f8b;padding:6px 8px 4px;font-size:13px;}
.rel-pop-i{display:block;padding:7px 9px;border-radius:7px;text-decoration:none;color:#243044;}
.rel-pop-i:hover{background:#f0f6ff;}
.rel-pop-i b{display:block;color:#1a4f8b;line-height:1.5;}
.rel-pop-i span{display:inline-block;font-size:11px;color:#8a94a3;background:#f2f5fa;border-radius:4px;padding:0 6px;margin-top:2px;}
.rel-pop-x{display:block;width:100%;margin-top:4px;border:1px dashed #c9d4e4;background:#fff;color:#5a6b8c;border-radius:7px;padding:5px;cursor:pointer;font-size:12px;}
.rel-target{animation:relFlash 2.6s ease 1;}
@keyframes relFlash{0%{background:#fff3bf;}55%{background:#fff8dc;}100%{background:transparent;}}
.rel-from{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 14px 4px;padding:6px 10px;background:#f0f6ff;border:1px solid #cfe0f3;border-radius:8px;font-size:12.5px;}
.rel-from-t{font-weight:700;color:#1a4f8b;background:#e2edfc;border-radius:5px;padding:1px 7px;white-space:nowrap;}
.rel-from-n{color:#33475f;}
.rel-from-a{margin-left:auto;color:#1a6ec9;text-decoration:none;font-weight:600;white-space:nowrap;}
.rel-from-a:hover{text-decoration:underline;}
.rel-back{position:fixed;left:18px;bottom:18px;z-index:98;border:1px solid #c5d9f5;background:#fff;color:#1a4f8b;border-radius:999px;padding:8px 14px;font-size:12.5px;cursor:pointer;box-shadow:0 4px 16px rgba(20,40,80,.15);max-width:70vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rel-back:hover{background:#f0f6ff;}
html.dark .dx-art.has-rel,html.dark .orig-art.has-rel{border-left-color:#3f6ea8;}
html.dark .rel-link{color:#8fc1ff;}
html.dark .rel-link:hover{background:#1d3252;}
html.dark .rel-badge{background:#1d3252;color:#9cc3f5;border-color:#2c3950;}
html.dark .rel-pop{background:#1a2332;border-color:#2c3950;}
html.dark .rel-pop-h{color:#8fc1ff;}
html.dark .rel-pop-i{color:#cdd6e2;}
html.dark .rel-pop-i:hover{background:#243149;}
html.dark .rel-pop-i b{color:#8fc1ff;}
html.dark .rel-pop-i span{background:#243149;color:#7c8aa0;}
html.dark .rel-pop-x{background:#1a2332;border-color:#2c3950;color:#9cc3f5;}
html.dark .rel-target{animation:relFlashD 2.6s ease 1;}
@keyframes relFlashD{0%{background:#4a4115;}55%{background:#3a3512;}100%{background:transparent;}}
html.dark .rel-from{background:#1d3252;border-color:#2c3950;}
html.dark .rel-from-t{background:#243149;color:#9cc3f5;}
html.dark .rel-from-n{color:#cdd6e2;}
html.dark .rel-back{background:#1a2332;border-color:#2c3950;color:#9cc3f5;}
@media print{.rel-badge,.rel-pop,.rel-back,.rel-from{display:none !important;}.rel-link{color:inherit !important;text-decoration:none !important;}}
/* 法条关联跳转 · 护眼模式适配（与 795/847 行 dx-lab 模式一致） */
html.sepia .rel-link{color:#6d4a1f;text-decoration-color:#b08d55;}
html.sepia:not(.dark) .rel-link:hover{background:#f3e8cd;}
html.sepia:not(.dark) .rel-badge{background:#f3e8cd;color:#7a5626;border-color:#dcc491;}
html.sepia:not(.dark) .rel-pop{background:#fbf5e8;border-color:#dcc491;}
html.sepia:not(.dark) .rel-pop-h{color:#6d4a1f;}
html.sepia:not(.dark) .rel-pop-i{color:#4a3d22;}
html.sepia:not(.dark) .rel-pop-i:hover{background:#f3e8cd;}
html.sepia:not(.dark) .rel-pop-i b{color:#6d4a1f;}
html.sepia:not(.dark) .rel-from{background:#f3e8cd;border-color:#dcc491;}
html.sepia:not(.dark) .rel-from-t{background:#ead9b0;color:#6d4a1f;}
html.sepia:not(.dark) .rel-from-n{color:#5c4a2a;}
html.sepia:not(.dark) .rel-back{background:#fbf5e8;border-color:#dcc491;color:#6d4a1f;}
html.sepia.dark .rel-link{color:#d8b878;text-decoration-color:#8a6f3a;}
html.sepia.dark .rel-badge{background:#3a2e18;color:#d8b878;border-color:#5c4a1c;}

/* 首页卡片文号小字：深色 / 护眼模式适配（2026-09-04） */
html.dark .card-h .docno{color:#7285a3;}
html.sepia:not(.dark) .card-h .docno{color:#8a7a5e;}

/* ==========================================================================
   v5 第二部分 · 标签体系与快捷筛选（2026-09-09）
   星级角标 .pri-badge / 首页筛选条 .tag-tools / 详情页标签面包屑 .tag-crumbs
   ========================================================================== */
/* 卡片右上角星级角标（★5–★1，执法办案使用频率） */
.card{position:relative;}
.pri-badge{position:absolute;top:10px;right:12px;font-size:11px;font-weight:700;color:#b45309;background:#fdf4e8;border:1px solid #f2d3a3;border-radius:999px;padding:2px 9px;line-height:1.5;letter-spacing:.5px;pointer-events:none;}
.pri-badge.pri-1{color:#8a94a3;background:#f1f3f6;border-color:#dde3ea;}
html.dark .pri-badge{color:#e8b45a;background:#2b2314;border-color:#57431c;}
html.dark .pri-badge.pri-1{color:#7285a3;background:#1d2636;border-color:#2c3950;}
html.sepia:not(.dark) .pri-badge{color:#8a6a20;background:#f7edd2;border-color:#dcc491;}
html.sepia:not(.dark) .pri-badge.pri-1{color:#8a7a5e;background:#f1e9d8;border-color:#dccdb0;}
html.sepia.dark .pri-badge{color:#d8b878;background:#3a2e18;border-color:#5c4a1c;}
html.sepia.dark .pri-badge.pri-1{color:#8fa0b8;background:#262f3f;border-color:#3a465c;}

/* 首页筛选条：快捷视图 + 条线 + 场景 + 星级 */
.tag-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:stretch;margin:-4px 0 16px;}
.tt-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;background:#fff;border:1px solid #e3e8ef;border-radius:10px;padding:8px 12px;box-shadow:0 1px 3px rgba(20,30,50,.05);}
.tt-lab{font-size:12px;color:#8a94a3;font-weight:700;letter-spacing:.5px;white-space:nowrap;}
.qv{font-family:inherit;font-size:13px;padding:6px 12px;min-height:36px;line-height:1.5;border-radius:8px;border:1px solid #c9d4e4;background:#f4f8ff;color:#1a4f8b;cursor:pointer;white-space:nowrap;}
.qv:hover{border-color:#2f6df0;}
.qv:focus-visible{outline:2px solid #2f6df0;outline-offset:2px;}
.qv.on{background:#2f6df0;color:#fff;border-color:#2f6df0;font-weight:600;}
.qv.tt-clear{background:#fff;border-style:dashed;color:#5a6573;}
#fLine{font-family:inherit;font-size:13px;min-height:36px;padding:5px 8px;border-radius:8px;border:1px solid #c9d4e4;background:#fff;color:#1f2733;}
.tag-tools .chip.sc,.tag-tools .chip[data-minpri]{cursor:pointer;user-select:none;}
html.dark .tt-row{background:#1a2332;border-color:#2c3950;box-shadow:none;}
html.dark .tt-lab{color:#7285a3;}
html.dark .qv{background:#1d3252;color:#9cc3f5;border-color:#2c3950;}
html.dark .qv.on{background:#2f6df0;color:#fff;border-color:#2f6df0;}
html.dark .qv.tt-clear{background:#1a2332;color:#aebcd2;}
html.dark #fLine{background:#1a2332;color:#cfe0ff;border-color:#2c3950;}
html.sepia:not(.dark) .tt-row{background:#faf4e4;border-color:#dcc491;box-shadow:none;}
html.sepia:not(.dark) .qv{background:#f3e8cd;color:#6d4a1f;border-color:#dcc491;}
html.sepia:not(.dark) .qv.on{background:#a3641c;color:#fff;border-color:#a3641c;}
html.sepia:not(.dark) .qv.tt-clear{background:#faf4e4;color:#7a6a4a;}
html.sepia:not(.dark) #fLine{background:#faf4e4;color:#4a3d22;border-color:#dcc491;}
html.sepia.dark .tt-row{background:#242b38;border-color:#3a465c;}
@media(max-width:640px){
  .tag-tools{gap:8px;}
  .tt-row{padding:7px 10px;width:100%;}
  .qv{min-height:40px;padding:7px 12px;}
  #fLine{min-height:40px;}
}

/* 详情页标签面包屑（标题下方）：条线 · 场景 · 办案频率 */
.tag-crumbs{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:8px 0 2px;font-size:12px;line-height:1.6;}
.tag-crumbs span{background:#f1f5fa;color:#44597a;border:1px solid #d9e2ee;border-radius:999px;padding:2px 10px;white-space:nowrap;}
.tag-crumbs span.tc-pri{color:#b45309;background:#fdf4e8;border-color:#f2d3a3;font-weight:600;}
html.dark .tag-crumbs span{background:#1d2636;color:#aebcd2;border-color:#2c3950;}
html.dark .tag-crumbs span.tc-pri{color:#e8b45a;background:#2b2314;border-color:#57431c;}
html.sepia:not(.dark) .tag-crumbs span{background:#f3e8cd;color:#6d4a1f;border-color:#dcc491;}
html.sepia:not(.dark) .tag-crumbs span.tc-pri{color:#8a6a20;background:#f7edd2;border-color:#dcc491;}
html.sepia.dark .tag-crumbs span{background:#262f3f;color:#aebcd2;border-color:#3a465c;}
html.sepia.dark .tag-crumbs span.tc-pri{color:#d8b878;background:#3a2e18;border-color:#5c4a1c;}
@media print{.tag-crumbs{display:none !important;}}

/* ==========================================================================
   v5.6 任务一 · 历史文本页星级角标灰化（2026-09-10）
   首页卡片：data-state 以 rep 开头者（已废止/历史文本）角标灰化；
   详情页：引擎为 .tc-pri 追加 .tc-hist（标签面包屑星级角标）。
   ========================================================================== */
.card[data-state^="rep"] .pri-badge{color:#9aa1ad;background:#f1f3f6;border-color:#dde3ea;filter:grayscale(1);opacity:.8;}
html.dark .card[data-state^="rep"] .pri-badge{color:#7285a3;background:#1d2636;border-color:#2c3950;}
html.sepia:not(.dark) .card[data-state^="rep"] .pri-badge{color:#8a7a5e;background:#f1e9d8;border-color:#dccdb0;}
.tag-crumbs .tc-pri.tc-hist{color:#9aa1ad;background:#f1f3f6;border-color:#dde3ea;text-decoration:line-through;}
html.dark .tag-crumbs .tc-pri.tc-hist{color:#7285a3;background:#1d2636;border-color:#2c3950;}
html.sepia:not(.dark) .tag-crumbs .tc-pri.tc-hist{color:#8a7a5e;background:#f1e9d8;border-color:#dccdb0;}
/* 历史文本页顶部状态条（已废止标识，醒目但不喧宾夺主） */
.hist-flag{display:inline-block;margin:8px 0 0;padding:5px 12px;border-radius:8px;font-size:12.5px;font-weight:700;color:#8a94a3;background:#f1f3f6;border:1px solid #dde3ea;letter-spacing:.3px;}
html.dark .hist-flag{color:#7285a3;background:#1d2636;border-color:#2c3950;}
html.sepia:not(.dark) .hist-flag{color:#8a7a5e;background:#f1e9d8;border-color:#dccdb0;}

/* v5.6 任务一 · 版本互链条（2026-09-10） */
.ver-link{margin:8px 0 2px;font-size:12.5px;line-height:1.9;}
.ver-link b{color:#8a94a3;font-weight:700;margin-right:8px;}
.ver-link a{display:inline-block;margin-right:10px;padding:2px 10px;border-radius:999px;background:#f1f5fa;color:#1a4f8b;border:1px solid #d9e2ee;text-decoration:none;}
.ver-link a:hover{border-color:#2f6df0;background:#eaf2ff;}
html.dark .ver-link b{color:#7285a3;}
html.dark .ver-link a{background:#1d2636;color:#9cc3f5;border-color:#2c3950;}
html.sepia:not(.dark) .ver-link a{background:#f3e8cd;color:#6d4a1f;border-color:#dcc491;}
html.sepia.dark .ver-link a{background:#262f3f;color:#aebcd2;border-color:#3a465c;}
@media print{.ver-link{display:none !important;}}

/* ══════════════════════════════════════════════════════════════════
   深色主题对比度补正（2026-09-11）
   背景：审计脚本 _check/_t_theme_contrast.js 实测（暗色 + 护眼叠加态），
   下列元素**从未获得暗色变体**，沿用浅色主题色值 → 对比度低于 WCAG 4.5:1
   （最差为 .chap-sub 1.83:1、.extra-h 1.86:1、.toc-sec 1.56:1）。
   本块追加于文件末尾：同特异性下靠后胜出，故可直接覆盖上游同选择器规则。
   ══════════════════════════════════════════════════════════════════ */
html.dark .card-h .docno{color:#a8bdd9;}          /* 4.30 → 8.1:1 */
html.dark .tt-lab{color:#a8bdd9;}                 /* 3.79 → 7.4:1 */
html.dark .toc-sec{color:#b9c6db;}                /* 1.56 → 9.6:1 */
html.dark .dx-jump{color:#7db3ff;}                /* 2.86 → 6.9:1 */
html.dark .extra-h{color:#b9c6db;}                /* 1.86 → 11.4:1 */
html.dark .tl-i{color:#9aa7b8;}                   /* 4.31 → 5.6:1 */
html.dark .st-cur,html.dark .tl-i.last{color:#45c9a8;}   /* 3.14 → 7.1:1 */
html.dark .st-pend,html.dark .tl-i.pend{color:#f0a24a;}  /* 3.21 → 6.8:1 */
html.dark .chap-sub{background:#1d232e;color:#e8b45a;border-color:#2c3950;} /* 1.83 → 9.2:1 */
html.dark .pre-h{color:#9cc3f5;}                  /* 1.44 → 8.4:1（.pre-h 由各页生成器内联
                                                     定义 color:#1a3c6e，特异性低于本条，故被覆盖） */

/* ── 次要文字对比度补正（2026-09-11）：浅色/护眼态实测 2.3–2.4:1，低于 WCAG AA 4.5:1 ──
   footer 的浅灰由**各内容页内联样式** footer{color:#94a3b8} 给出（特异性 0,0,1），
   与站内同名规则同级但靠后 → 须用 html body footer(0,0,2) 提高特异性方可覆盖。 */
html body footer{color:#5f6b7a;}                 /* 2.39 → 5.4:1 */
.idx-count{color:#5f6b7a;}                        /* 2.41 → 5.3:1 */
html.dark footer,html.dark .idx-count{color:#8b9cb3;}   /* 暗色 4.17 → 6.9:1 */

/* ══════════════════════════════════════════════════════════════════
   移动端排版优化（2026-09-15）
   依据 `_check/_t_mobile.js`（375×812 / 360×800 实测）。追加于文件末尾：
   同特异性下靠后胜出，可覆盖前文的同类规则（前文多处 11.5px 小字在此统一抬到 ≥12.5px）。
   触控目标按 WCAG 2.5.8（≥24×24 CSS px）为下限；主操作按钮仍走前文 40px 规则。
   ══════════════════════════════════════════════════════════════════ */
@media (max-width:860px){
  /* 1) 卡片内小字：索引号 / 沿革 / 状态 / 星级标签 */
  .card .card-h .docno,.card .docno{font-size:12.5px;}
  .card .tl,.card .tl-i,.card .tl-h,.card .meta{font-size:12.5px;}
  .grid .card .pri-badge,.card .pri-badge{font-size:12px;line-height:1.5;}
  .idx-count,.idx-search input,.law-nav .ln-t{font-size:12.5px;}
  /* 2) 条号关联链接与角标：内联热区偏小，加内边距到 ≥24px 高（WCAG 2.5.8） */
  .dx-hd a.rel-link,.orig-hd a.rel-link,a.rel-link{padding:4px 5px;margin:-4px 0;min-height:24px;}
  .dx-hd .rel-badge,.orig-hd .rel-badge,.rel-link .rel-badge{font-size:12px;}
  .timeline .now{font-size:12.5px;}
  /* 3) 其它小字与触控目标 */
  footer{font-size:12.5px;}
  .sc-hint{font-size:12.5px;}
  .toc-close{min-width:34px;min-height:34px;}
  .qr-refs a{min-height:34px;display:inline-flex;align-items:center;}
  .qr-item ul{font-size:14px;line-height:2;}
  .topnav a,.topbar a{min-height:34px;display:inline-flex;align-items:center;}
  .extra-h{font-size:13px;}
  .cn-no,.cn-more,.cn-t,.cn-list a,.chain-nav small{font-size:12.5px;}
  input[type=text],input[type=search],input:not([type]){min-height:34px;}
}
/* 第二轮：`cn-no/cn-more/collect-note/sc-hint` 等定义在**页内联样式**（位于 site.css 之后），
   须用「标签+类」提高特异性（html body .x = 0,1,2 > 内联 .x = 0,1,0）方可覆盖。 */
@media (max-width:860px){
  html body .cn-no,html body .cn-more,html body .cn-t,html body .cn-list a,html body .chain-nav small{font-size:12.5px;}
  html body .collect-note,html body .sc-hint{font-size:12.5px;}
  /* 线上实测新增：「非知产条线」徽标 11px（位于折叠区，本地审计未覆盖） */
  html body .non-ip-tag{font-size:12.5px;}
  html body small{font-size:12.5px;}
  html body input[type=text],html body input[type=search],html body input:not([type]){min-height:34px;}
}
/* ══════════════════════════════════════════════════════════════════
   小屏精简（2026-09-18，≤640px）
   依据 `_check/_t_noise.js` 实测：首页 28 屏、逐条页 39 屏；其中「编写说明」占 3.4 屏、
   首页公告栏占 0.81 屏、页头 199px 中约 147px 为内边距、筛选区第二行 177px、页脚收录说明 68px。
   原则：**只做减法与收紧，不删内容** —— 折叠项在 DOM 中完整保留，展开即可见；
   且折叠仅由 site.js 加类名 `m-simp` 后生效，**无 JS 时一切照旧可见**（稳妥降级）。
   ══════════════════════════════════════════════════════════════════ */
@media (max-width:640px){
  /* ① 页头：199px → ~110px（实测约 147px 是内边距；须用 html body 压过页内联样式） */
  html body header.top{padding-top:10px;padding-bottom:8px;}
  html body header.top .wrap{padding-top:6px;padding-bottom:8px;}
  html body header.top h1{font-size:18.5px;line-height:1.3;}
  html body header.top .meta{font-size:12.5px;margin-top:4px;}
  /* ② 列表卡片：去噪（沿革摘要在详情页仍有），收紧留白 */
  .card{padding:12px 13px;border-radius:10px;}
  .card .tl{display:none;}
  .card .desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13.5px;}
  .card-actions{margin-top:8px;padding-top:8px;}
  .card-actions .btn{flex:1 1 0;justify-content:center;min-width:0;}
  /* ③ 页脚：隐藏收录范围长说明（关于页仍在）；同样须 html body 提权 */
  html body footer{padding-top:12px;padding-bottom:16px;}
  html body footer .collect-note{display:none;}
  /* ④ 正文：减边框留白，突出条文本体 */
  .dx-art,.orig-art{margin-bottom:12px;}
  .dx-blk{padding:9px 11px;}
  .dx-lab{font-size:12.5px;}
  /* ⑥ 功能去重：底部导航栏已含「主题」（浅/深切换）与「顶部」，
     故隐藏与之重复的浮动钮；**护眼钮 .eye-btn 保留**——栏内无该功能，隐藏会丢功能。 */
  html body a.to-top,html body .dark-btn{display:none !important;}
  /* 查找区（≤640）：输入框整行、「全文搜索」独占下一行并居中——两入口不再挤在一行 */
  .find-bar{flex-wrap:wrap;}
  .idx-search{flex:1 1 100%;}
  .idx-searchlink{flex:1 1 100%;justify-content:center;}
  .idx-count{flex:1 1 100%;}
  .idx-search .f-lab{font-size:12px;padding:0 8px;}

  /* ⑦ 页底为「底栏 + 唯一保留的护眼钮」预留空间，避免浮动控件压住正文末尾；
       护眼钮略缩小（38→34px），视觉更轻。 */
  html body{padding-bottom:calc(112px + var(--safe-b, 0px)) !important;}
  html body .eye-btn{width:34px;height:34px;font-size:15px;}
  /* ⑧ 折叠态（仅当 site.js 标注 m-simp 时生效；无 JS → 不标注 → 一切照旧） */
  /* 见文件末全局规则 */
  .m-simp .m-fold-bar{display:flex;align-items:center;justify-content:center;gap:6px;
    width:100%;padding:9px 10px;margin:6px 0 0;border:1px dashed #c6d2e3;border-radius:9px;
    background:rgba(247,249,252,.85);color:#2b4a77;font-size:13px;cursor:pointer;}
  html.dark .m-simp .m-fold-bar{background:rgba(20,28,40,.7);border-color:#33445f;color:#9dbbe6;}
  .m-clamp{position:relative;max-height:150px;overflow:hidden;}
  .m-clamp::after{content:"";position:absolute;left:0;right:0;bottom:0;height:44px;
    background:linear-gradient(rgba(255,255,255,0),#fff);pointer-events:none;}
  html.dark .m-clamp::after{background:linear-gradient(rgba(14,20,30,0),#0e141e);}
}
/* ══════════════════════════════════════════════════════════════════
   「最近更新」(.bb-news) 与「修法跟踪」(.bb-track) 默认收起（2026-09-18）
   策略：**标题行常显**（保留模块锚点与语义）+ 正文只露首条并渐隐 + 「展开（N 条）」按钮。
   由 site.js 标注 m-simp 后才生效 → **无 JS 时两个模块照旧全展开可见**。
   `.bb` 的底色由 index.html 页内联样式给出（#fff），故渐隐色与之对齐；深色主题另配。
   ══════════════════════════════════════════════════════════════════ */
.bb.m-simp > ul{position:relative;max-height:52px;overflow:hidden;}
.bb.m-simp.m-open > ul{max-height:none;overflow:visible;}
.bb.m-simp:not(.m-open) > ul::after{content:"";position:absolute;left:0;right:0;bottom:0;height:26px;
  background:linear-gradient(rgba(255,255,255,0),#fff);pointer-events:none;}
html.dark .bb.m-simp:not(.m-open) > ul::after{background:linear-gradient(rgba(14,20,30,0),#0e141e);}
html body .bb-h{display:flex;align-items:center;gap:8px;}
.bb-toggle{margin-left:auto;flex:0 0 auto;font:inherit;font-size:12.5px;line-height:1.6;
  padding:3px 11px;cursor:pointer;white-space:nowrap;font-weight:500;
  color:#2f6df0;background:rgba(47,109,240,.08);border:1px solid rgba(47,109,240,.28);border-radius:999px;}
.bb-toggle:hover{background:rgba(47,109,240,.16);}
.bb-toggle:focus-visible{outline:2px solid #2f6df0;outline-offset:2px;}
html.dark .bb-toggle{color:#9cc3f5;background:rgba(47,109,240,.16);border-color:rgba(47,109,240,.4);}
html.sepia:not(.dark) .bb-toggle{color:#8a5a00;background:rgba(217,155,28,.12);border-color:rgba(217,155,28,.45);}
/* ══════════════════════════════════════════════════════════════════
   逐条页（≤640）：条文内**只默认展开核心块**，参读性块折到「展开本条其他内容」之后
   核心 = 条文原文(tw) / 条文主旨(zz) / 理解与适用(lj) / 关联条款(rl)（实测占页 55%+）
   参读 = 案例(case) / 制定争议与误区(ct) / 新旧对比(bt) 等（实测占页 22%）
   仅由 site.js 标注类名后生效 → **无 JS 时全部照旧可见**。
   ══════════════════════════════════════════════════════════════════ */
.dx-art.m-sec-fold:not(.m-open) > .dx-bd > .dx-blk.m-sec{display:none;}
.m-sec-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;
  margin:8px 0 2px;padding:9px 10px;cursor:pointer;font:inherit;font-size:13px;
  color:#2b4a77;background:rgba(47,109,240,.05);border:1px dashed #b9c9de;border-radius:9px;}
.m-sec-btn:hover{background:rgba(47,109,240,.1);border-color:#9db9e8;}
.m-sec-btn:focus-visible{outline:2px solid #2f6df0;outline-offset:2px;}
html.dark .m-sec-btn{color:#9dbbe6;background:rgba(47,109,240,.12);border-color:#33445f;}
html.sepia:not(.dark) .m-sec-btn{color:#7d5a1c;background:rgba(217,155,28,.08);border-color:#d8c9a8;}
/* ══════════════════════════════════════════════════════════════════
   桌面端最小字号下限 12px（2026-09-18）
   实测 1280px 首页有 149 个 <12px 元素，全部是**元信息徽标**（星级 pri-badge 11px、
   索引号 docno 11.5px、关联角标 rel-badge 11px、链条序号 cn-no 11px）与一处 10.4px 的 <small>。
   这些在桌面偏小；统一抬到 12px。**只在 ≥641px 生效**——小屏由更早的 12.5px 规则负责，互不干扰。
   用 `!important` 是因为其中多项定义在 index.html 的**页内联样式**中（同特异性靠后胜出，无法覆盖）。
   ══════════════════════════════════════════════════════════════════ */
@media (min-width:641px){
  .pri-badge,.docno,.rel-badge,.non-ip-tag,.cn-no,.cn-more,.cn-t,.ln-t,.now,
  .collect-note,.tl-i,.tl-h,.legend,.cn-list a,.cn-list span{font-size:12px !important;}
  small{font-size:12px !important;}
  footer a,footer span{font-size:12px !important;}
  /* 正文内联链接（条文头「← 法律原文」、条号关联链接）热区偏小（20–23px）；
     WCAG 2.5.8 对内联链接有豁免，此处仍加内边距以提升点击舒适度 */
  html body a.dx-jump,html body a.rel-link,html body a.orig-jump{padding:2px 4px;margin:-2px 0;}
}
/* 浮动控件静止态降噪（2026-09-18）：护眼钮与「上一条/下一条」箭头常悬于正文之上，
   半透明化以减轻视觉干扰；悬停/聚焦/按下时恢复不透明，功能与可发现性不受影响。 */
/* 实测类名：.eye-btn（护眼）、div.pn-nav（上一条/下一条箭头，40×87 贴右缘）、button.toc-fab（目录）
   → 前两者常悬于正文之上，降其静止态权重；toc-fab 为主导航入口，保持不变。 */
html body .eye-btn,html body .pn-nav,html body a.to-top,html body .dark-btn{
  opacity:.72;transition:opacity .16s ease;}
html body .eye-btn:hover,html body .pn-nav:hover,html body a.to-top:hover,html body .dark-btn:hover,
html body .eye-btn:focus-visible,html body .pn-nav:focus-within{opacity:1;}
@media (hover:none){
  /* 触屏无 hover：静止态略透，按下时给即时反馈 */
  html body .eye-btn:active,html body .pn-nav:active{opacity:1;}
}
/* ══════════════════════════════════════════════════════════════════
   P0-A 渲染优化：长列表项的「跳过屏外渲染」（2026-09-18）
   依据实测 A/B（规则写入初始 CSS 后测）：
     · 民法典逐条页 FCP 480→208ms（−57%）、TBT 534→383ms（−28%）
     · 首页 TBT 167→82ms（−51%）
   原理：`content-visibility:auto` 让屏外卡片跳过样式计算/布局/绘制；
   `contain-intrinsic-size:auto <估高>` 提供占位高度以免滚动条跳动，
   前缀 `auto` 表示「记住实测尺寸」，第二次滚动起位置即为真实高度。
   ⚠️ 只加在**重复的长列表项**上，勿加到 body/首屏区块（会反噬）。
   ══════════════════════════════════════════════════════════════════ */
.dx-art{content-visibility:auto;contain-intrinsic-size:auto 900px;}
.card{content-visibility:auto;contain-intrinsic-size:auto 220px;}
/* 目录/锚点跳转的落点：强制渲染目标项，避免估算高度导致的落点偏移 */
.dx-art:target,.dx-art:focus-within{content-visibility:visible;}
/* 条文「复制引用」按钮（2026-09-21）：写作案卷时的刚需，置于条头右侧 */
.cite-btn{margin-left:auto;flex:0 0 auto;font:inherit;font-size:12.5px;line-height:1.6;
  padding:3px 11px;cursor:pointer;white-space:nowrap;font-weight:500;
  color:#2f6df0;background:rgba(47,109,240,.07);border:1px solid rgba(47,109,240,.28);border-radius:999px;}
.cite-btn:hover{background:rgba(47,109,240,.16);}
.cite-btn:focus-visible{outline:2px solid #2f6df0;outline-offset:2px;}
.cite-btn.ok{color:#177245;background:rgba(23,114,69,.12);border-color:rgba(23,114,69,.4);}
html.dark .cite-btn{color:#9cc3f5;background:rgba(47,109,240,.15);border-color:rgba(47,109,240,.4);}
html.dark .cite-btn.ok{color:#7fd8a8;background:rgba(23,114,69,.25);border-color:rgba(23,114,69,.5);}
html.sepia:not(.dark) .cite-btn{color:#7d5a1c;background:rgba(217,155,28,.1);border-color:rgba(217,155,28,.45);}
/* 条头需为弹性行，按钮才能靠右 */
html body .dx-hd{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
@media (max-width:640px){
  /* 小屏条头已偏挤，按钮收窄为图标式文案 */
  .cite-btn{font-size:12px;padding:3px 9px;}
}
/* ══════════════════════════════════════════════════════════════════
   折叠按钮统一样式（2026-09-21 · 界面收敛第 1 步）
   站内原有 3 种折叠按钮（.bb-toggle 胶囊 / .m-sec-btn 虚线整行 / .m-fold-bar 虚线整行），
   视觉语言不统一。现归一为**同一套配色与形状**，仅保留「胶囊（标题行内）」与「整行」两种排布
   —— 排布差异由所在位置决定，颜色、边框、圆角、反馈态完全一致。
   ══════════════════════════════════════════════════════════════════ */
.bb-toggle,.m-sec-btn,.m-fold-bar{
  font:inherit;font-size:12.5px;line-height:1.6;font-weight:500;cursor:pointer;
  color:#2f6df0;background:rgba(47,109,240,.07);
  border:1px solid rgba(47,109,240,.28);border-radius:999px;
  padding:3px 11px;white-space:nowrap;
  transition:background .15s ease,border-color .15s ease;}
.bb-toggle:hover,.m-sec-btn:hover,.m-fold-bar:hover{background:rgba(47,109,240,.16);}
.bb-toggle:focus-visible,.m-sec-btn:focus-visible,.m-fold-bar:focus-visible{
  outline:2px solid #2f6df0;outline-offset:2px;}
/* 整行排布：仅这两者占满一行、内容居中（.bb-toggle 在标题行内靠右） */
.m-sec-btn,.m-fold-bar{display:flex;align-items:center;justify-content:center;gap:6px;
  width:100%;margin:8px 0 2px;padding:8px 10px;border-radius:9px;}
html.dark .bb-toggle,html.dark .m-sec-btn,html.dark .m-fold-bar{
  color:#9cc3f5;background:rgba(47,109,240,.15);border-color:rgba(47,109,240,.4);}
html.sepia:not(.dark) .bb-toggle,html.sepia:not(.dark) .m-sec-btn,
html.sepia:not(.dark) .m-fold-bar{
  color:#7d5a1c;background:rgba(217,155,28,.1);border-color:rgba(217,155,28,.45);}
/* ══════════════════════════════════════════════════════════════════
   筛选区收敛（2026-09-21 · 界面收敛第 2 步）
   实测首页有 5 套筛选并存（类别 chips / 快捷视图 / 条线 / 场景 / 星级），**首屏可点目标达 38 个**。
   收敛做法：保留高频的「类别 chips」与「快捷视图」；
   把**条线 / 场景 / 星级**三组次要筛选在**全视口默认收起**（原仅 ≤640 收起），
   由一个「更多筛选条件」入口展开。功能一个不少，只是不再同时摊在首屏。
   ══════════════════════════════════════════════════════════════════ */
/* 2026-10-22：快捷视图整行已移除，筛选区只剩一行内容。原规则写死「隐藏第 2 行」，
   删行后条线行变成第 1 行 → 桌面次要筛选默认展开，收敛失效。
   改为「折叠时隐藏所有筛选行」，对行数变化免疫。 */
.tag-tools.m-simp:not(.m-open) .tt-row{display:none;}
/* ══════════════════════════════════════════════════════════════════
   导航去重（2026-09-21 · 界面收敛第 3 步之一）
   实测「目录」在手机上并存 **3 个入口**：底部导航栏「目录」/ 浮动 ☰ (`.toc-fab`) / 抽屉本体。
   与之前处理「回顶」「暗色」重复钮同理 —— **底部栏存在时隐藏浮动 ☰**，功能不减（栏内可进）。
   `.pn-nav`（上一条/下一条）**保留**：栏内无对应功能，隐藏会丢能力。
   ══════════════════════════════════════════════════════════════════ */
@media (max-width:860px){
  html body .toc-fab{display:none !important;}
}
/* ══════════════════════════════════════════════════════════════════
   任务 10 · 移动端专项补齐（2026-09-29）
   现状核实：断点为 860/640（文档要求主断点 768 / 小屏 480）；触控最小 24px
   （文档要求 ≥44px）。本节**新增** 768/480 两档并抬高关键触控区，
   **不改动**已有断点内的任何规则，避免影响现有布局。
   ══════════════════════════════════════════════════════════════════ */
/* 触控区抬到 44px（仅作用于可点击控件，不影响正文） */
@media (pointer:coarse){
  nav.m-bar a,nav.m-bar button,
  .m-bar a,.m-bar button,
  .bb-toggle,.m-sec-btn,.m-fold-bar,
  .cite-btn,.to-top,
  .idx-searchlink,.sc-sel select,
  .chips .chip,.scene-chips .chip,.pri-chips .chip,
  .qv,.seg,.seg button{min-height:44px;}
  .bb-toggle,.m-sec-btn,.m-fold-bar,.cite-btn{display:inline-flex;align-items:center;justify-content:center;}
}

/* 主断点 768px：两栏网格转单列（与既有 860 断点协同，不覆盖其规则） */
@media (max-width:768px){
  .grid{grid-template-columns:minmax(0,1fr);}
  .grid>*{min-width:0;}
}
/* 小屏 480px：进一步压缩横向留白与卡片内边距 */
@media (max-width:480px){
  .wrap{padding-left:12px;padding-right:12px;}
  .card{padding:12px 12px;}
  .item{padding:10px 12px;}
  .qr-item{padding:10px 11px;}
  .aux-lab{line-height:34px;}
}
/* ══════════════════════════════════════════════════════════════════
   交互反馈补齐（2026-09-29 · UX 体检整改）
   体检发现：全站 367 个可点元素中 :active 仅 3 处、cursor:pointer 仅 22 处
   → 按压无响应感、整卡可点但光标仍是箭头。本节统一补齐：
   · 按压态：轻微下移 + 变暗（150ms 动效克制原则内）
   · 手型光标：所有可点元素（含整卡可点）
   ══════════════════════════════════════════════════════════════════ */
.card,.chip,.qv,.hot a,.hist button,.m-fold-bar,.bb-toggle,.m-sec-btn,
.cite-btn,.idx-searchlink,.card-h a,.card-actions a,.toc-fab,.to-top,
.idx-search input,.seg button,.more-toggle,.dark-btn{cursor:pointer;}

.btn:active,.chip:active,.qv:active,.hot a:active,.hist button:active,
.m-fold-bar:active,.bb-toggle:active,.m-sec-btn:active,.cite-btn:active,
.idx-searchlink:active,.card-actions a:active,.toc-fab:active,.to-top:active,
.seg button:active,.dark-btn:active,.more-toggle:active{
  transform:translateY(1px);
  filter:brightness(.955);
}
/* 触控设备上按下面积反馈更明显（无 hover，全靠按压态） */
@media (pointer:coarse){
  .chip:active,.qv:active,.btn:active,.card-actions a:active{filter:brightness(.93);}
}
/* ══════════════════════════════════════════════════════════════════
   公告区顶置瘦身（2026-09-29 · 用户要求：新闻卡放最顶 + 压缩占空间）
   · 位置：正文最顶（generate_index.py 模板已调整）
   · 双栏并排（桌面）/ 单栏（窄屏），每块默认只露一行（单行省略），点「展开（N 条）」看全文
   · 展开状态沿用 ux-fold 会话记忆（.bb-toggle 已纳入委托监听）
   ══════════════════════════════════════════════════════════════════ */
.idx-bulletin{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:0 0 10px;}
.idx-bulletin .bb{min-width:0;}
.idx-bulletin .bb ul{min-width:0;}
html body .idx-bulletin .bb{padding:4px 10px;}
html body .idx-bulletin .bb-h{font-size:12px;margin-bottom:3px;}
html body .idx-bulletin .bb ul{margin:0;padding-left:1.2em;max-height:20px;}
html body .idx-bulletin .bb li{font-size:12.5px;line-height:1.7;}
/* 收起态：只露一行，超出省略 */
html body .bb.m-simp:not(.m-open) li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
html body .bb.m-simp:not(.m-open) > ul{max-height:24px;}
html body .bb.m-simp:not(.m-open) > ul::after{height:12px;}
html body .bb-toggle{font-size:11.5px;line-height:22px;padding:0 8px;min-height:26px;}
@media (max-width:860px){
  .idx-bulletin{grid-template-columns:1fr;gap:5px;margin-bottom:8px;}
  html body .idx-bulletin .bb{padding:5px 9px;}
  html body .idx-bulletin .bb-h{margin-bottom:2px;}
}

/* ══════════════════════════════════════════════════════════════════
   v6.1 全站视觉与布局统一（2026-10-19）
   ──────────────────────────────────────────────────────────────────
   一、桌面适配：容器宽度分级 / 首页 4 列栅格 / 阅读行宽与字阶
   二、页头压缩：修正「正文 .wrap 的 80px 底部内边距被页头继承」的布局缺陷
   三、视觉统一：圆角、描边、阴影、间距节奏、交互反馈、焦点可见性
   四、移动端：页头、浮动控件、横滑筛选、底栏安全区
   仅样式层，不改动任何内容、结构与业务逻辑。
   ══════════════════════════════════════════════════════════════════ */

/* ---------- 统一令牌（在原 --u-* 基础上补齐层级） ---------- */
:root{
  --u-radius:12px;
  --u-radius-lg:14px;
  --u-line:#e2e8f0;
  --u-line-strong:#cfd9e6;
  --u-shadow:0 1px 2px rgba(16,24,40,.04),0 2px 8px rgba(16,24,40,.05);
  --u-shadow-hover:0 8px 24px rgba(16,40,80,.10);
  --u-brand-1:var(--c-brand);
  --u-brand-2:#6f1512;
  --u-blue:#2f6df0;
  --u-blue-deep:#1f5ad4;
  --u-focus:#ffd66b;
}
::selection{background:rgba(47,109,240,.18);}
html{-webkit-text-size-adjust:100%;scroll-padding-top:18px;scroll-padding-bottom:92px;}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
/* 全站统一焦点环：键盘可见、鼠标不打扰 */
a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible,
[tabindex]:focus-visible,summary:focus-visible{
  outline:2px solid var(--u-blue);outline-offset:2px;border-radius:6px;}

/* ---------- 一、桌面容器与栅格 ---------- */
/* 首页在超宽屏放开容器并升为 4 列，避免 1920 下右侧大片留白、卡片过宽 */
@media (min-width:1600px){
  body.idx-page .wrap{max-width:1400px !important;}
  body.idx-page .grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;}
}
@media (min-width:1280px) and (max-width:1599px){
  body.idx-page .grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
/* 大屏卡片内容不因变宽而松散 */
body.idx-page .card{min-height:100%;}

/* ---------- 二、页头压缩 ---------- */
/* ⚠ 真实缺陷：内容页 header 内复用了正文容器 .wrap，其 padding-bottom:80px
   直接变成页头底部空白（桌面页头 352px 中约 80px 是纯空白）。此处归零。 */
html body header.top{padding:20px 26px 16px !important;}
html body header.top .wrap{padding-top:4px !important;padding-bottom:2px !important;}
html body header.top h1{
  font-size:clamp(19px,1.45vw,24px);line-height:1.38;letter-spacing:.2px;margin:0 0 6px;}
html body header.top .docno{margin-top:2px;font-size:12px;opacity:.9;}
html body header.top .meta{gap:6px;margin-top:6px;}
html body header.top .pill{padding:3px 10px;font-size:12px;border-radius:999px;}
html body header.top .ver-link{margin-top:7px;gap:8px;}
html body header.top .tag-crumbs{margin-top:7px;padding-top:6px;}
/* 页头层级：品牌红更深、边框收细，去掉厚重投影 */
html body header.top{
  background:linear-gradient(135deg,var(--u-brand-1),var(--u-brand-2)) !important;
  border-bottom:1px solid rgba(0,0,0,.18);
  box-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 2px 10px rgba(40,10,10,.14);}

/* ---------- 三、视觉统一 ---------- */
/* 阅读字阶：正文 15px / 行高 1.9，长文更易读 */
.dx-txt{font-size:15px;line-height:1.92;}
.orig-body{font-size:15.2px;line-height:1.95;}
.dx-chap{font-size:18px;letter-spacing:.2px;margin:30px 0 10px;}

/* 条文卡片：统一圆角/描边/悬停层次 */
.dx-art,.orig-art{border-radius:var(--u-radius-lg);border-color:var(--u-line);box-shadow:var(--u-shadow);}
.dx-hd,.orig-hd{border-radius:13px 13px 0 0;background:linear-gradient(180deg,#f6f9fd,#f1f6fc);border-bottom-color:var(--u-line);}
.dx-hd{padding:11px 16px;}
.orig-hd{padding:11px 16px;}
.dx-bd{padding:8px 16px 16px;}
.orig-body{padding:10px 18px 16px;}
.dx-lab{border-radius:6px;padding:2px 9px;font-size:12.5px;letter-spacing:.2px;}

/* 首页卡片：统一圆角、悬停上浮、标题字重 */
.card{border-radius:var(--u-radius-lg);border-color:var(--u-line);box-shadow:var(--u-shadow);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;}
.card:hover{transform:translateY(-2px);box-shadow:var(--u-shadow-hover);border-color:var(--u-line-strong);}
.card .card-h{font-size:15.5px;line-height:1.55;}
.card .card-h a{letter-spacing:.1px;}

/* 按钮与胶囊：统一高度与圆角 */
.btn,.chip,.qv{min-height:36px;border-radius:999px;}
.btn{border-radius:9px;}
.chip{transition:background .15s,border-color .15s,color .15s;}
.btn{transition:transform .12s ease,filter .12s ease,background .15s,border-color .15s;}
.btn:active,.chip:active,.qv:active{transform:translateY(1px);}

/* 筛选条与查找区：桌面不再挤在一条里 */
@media (min-width:861px){
  .idx-tools{row-gap:11px;}
  .find-bar{flex:1 1 420px;}
}

/* 速查卡：分区标题去噪、条目间距与链接胶囊 */
.qr-sec{border-radius:var(--u-radius-lg);border-color:var(--u-line);box-shadow:var(--u-shadow);}
.qr-sec-h{align-items:center;}
.qr-item ul{line-height:1.85;}
.qr-refs a{min-height:26px;border-radius:7px;}

/* 工具页表格/表单的圆角与描边统一 */
input[type=text],input[type=search],select,textarea{border-radius:9px;}

/* ---------- 四、移动端专项 ---------- */
@media (max-width:860px){
  /* 页头：压缩内边距 + 药丸单行横滑，避免 3~4 行堆叠 */
  html body header.top{padding:11px 14px 9px !important;}
  html body header.top .wrap{padding:2px 0 0 !important;}
  html body header.top h1{font-size:17.5px;line-height:1.42;margin-bottom:3px;}
  html body header.top .docno{font-size:11.5px;margin-top:1px;}
  header.top .meta{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;margin-top:5px;padding-bottom:2px;-webkit-overflow-scrolling:touch;}
  header.top .meta::-webkit-scrollbar{display:none;}
  html body header.top .pill{flex:0 0 auto;font-size:11.5px;padding:2px 9px;}
  header.top .ver-link{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;margin-top:6px;padding-bottom:2px;-webkit-overflow-scrolling:touch;}
  header.top .ver-link::-webkit-scrollbar{display:none;}
  header.top .ver-link a{flex:0 0 auto;font-size:12px;padding:4px 9px;min-height:30px;}
  html body header.top .tag-crumbs{margin-top:5px;padding-top:5px;font-size:11.5px;}

  /* 浮动「上一页/下一页」缩小并下移，减少对正文控件遮挡 */
  .pn-nav{right:8px !important;bottom:72px !important;gap:6px !important;}
  .pn-nav a{width:32px !important;height:32px !important;line-height:30px !important;font-size:15px !important;opacity:.9;}

  /* 筛选条横滑，避免换行堆高首屏 */
  .idx-tools .chips,.scene-chips,.pri-chips,.quick-views{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px;}
  .idx-tools .chips::-webkit-scrollbar,.scene-chips::-webkit-scrollbar,
  .pri-chips::-webkit-scrollbar,.quick-views::-webkit-scrollbar{display:none;}
  .chip{flex:0 0 auto;}

  /* 首页「办案速查卡」入口：移动端收起长说明，只留标题与动作 */
  .qr-entry{padding:12px 14px !important;}
  .qr-entry-t{font-size:15px !important;}
  .qr-entry-d{display:none !important;}
  .qr-entry-a{margin-top:8px !important;}

  /* 底部安全区：正文与页脚不被固定底栏压住 */
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom));}
  footer{padding-bottom:calc(20px + env(safe-area-inset-bottom));}
}

/* 触屏：交互控件触控面 ≥44px（仅主要控件，正文内联链接不受影响） */
@media (pointer:coarse){
  .btn,.s-go,.m-bar a,.chip,.qv,.qr-refs a{min-height:44px;}
  .qr-refs a{display:inline-flex;align-items:center;}
}

/* 动效克制：尊重系统「减少动态效果」 */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;
    transition-duration:.01ms !important;scroll-behavior:auto !important;}
}

/* 深色 / 护眼适配（新增元素） */
html.dark .card:hover{border-color:#34435c;}
html.sepia:not(.dark) header.top .pill{background:rgba(255,255,255,.55) !important;}
html.sepia:not(.dark) .card,html.sepia:not(.dark) .dx-art,html.sepia:not(.dark) .orig-art{background:#fbf7ee;}

/* ---------- v6.1 修订 A：页头规则覆盖到「无 .top 类」的原文页，并强制单行 ---------- */
/* 原文页 header 无 class="top"，此前压缩规则未生效（318~348px） */
html body header:not(.s-head){padding:20px 26px 16px !important;}
html body header:not(.s-head) .wrap{padding-top:4px !important;padding-bottom:2px !important;}
html body header:not(.s-head) h1{font-size:clamp(19px,1.45vw,24px);line-height:1.38;margin:0 0 6px;}
html body header:not(.s-head) .docno{margin-top:2px;font-size:12px;}
html body header:not(.s-head) .meta{display:flex;flex-wrap:nowrap !important;flex-direction:row !important;
  overflow-x:auto;gap:6px;margin-top:6px;padding-bottom:2px;-webkit-overflow-scrolling:touch;}
html body header:not(.s-head) .meta::-webkit-scrollbar{display:none;}
html body header:not(.s-head) .pill{flex:0 0 auto;padding:3px 10px;font-size:12px;}
html body header:not(.s-head) .ver-link{display:flex;flex-wrap:nowrap !important;flex-direction:row !important;
  align-items:center;overflow-x:auto;gap:6px;margin-top:7px;padding-bottom:2px;-webkit-overflow-scrolling:touch;}
html body header:not(.s-head) .ver-link > b{flex:0 0 auto;font-size:12px;margin:0;white-space:nowrap;}
html body header:not(.s-head) .ver-link a{flex:0 0 auto;white-space:nowrap;}
html body header:not(.s-head) .ver-link::-webkit-scrollbar{display:none;}
html body header:not(.s-head){border-bottom:1px solid rgba(0,0,0,.18);}
@media (max-width:860px){
  html body header:not(.s-head){padding:11px 14px 9px !important;}
  html body header:not(.s-head) .wrap{padding:2px 0 0 !important;}
  html body header:not(.s-head) h1{font-size:17.5px;line-height:1.42;margin-bottom:3px;}
  html body header:not(.s-head) .docno{font-size:11.5px;margin-top:1px;}
  html body header:not(.s-head) .pill{font-size:11.5px;padding:2px 9px;}
  html body header:not(.s-head) .ver-link a{font-size:12px;padding:4px 9px;min-height:30px;}
  html body header:not(.s-head) .tag-crumbs{margin-top:5px;padding-top:5px;font-size:11.5px;}
}

/* 速查卡分区图标徽标（2026-10-19） */
.qr-sec-i{flex:0 0 auto;width:26px;height:26px;border-radius:8px;display:inline-flex;
  align-items:center;justify-content:center;background:#eef4ff;color:#1a4f8b;font-size:15px;line-height:1;}
.qr-sec-t{flex:1 1 auto;min-width:0;}
html.dark .qr-sec-i{background:#22314a;color:#9cc3f5;}
html.sepia:not(.dark) .qr-sec-i{background:#f3e8cd;color:#6d4a1f;}

/* ---------- v6.1 修订 B：工具栏与折叠入口视觉收敛（2026-10-19） ---------- */
@media (min-width:861px){
  /* 类别 chips 与计数同排，查找区独占一行 —— 避免 1280 下三者互挤 */
  .idx-tools{display:grid;grid-template-columns:1fr auto;grid-template-areas:"chips count" "find find";gap:10px 14px;}
  .idx-tools .chips{grid-area:chips;}
  .idx-tools .find-bar{grid-area:find;}
  .idx-tools .idx-count{grid-area:count;align-self:center;text-align:right;white-space:nowrap;color:var(--u-sub);font-size:12.5px;}
}
/* 「更多筛选条件」由整条浅蓝横幅改为细分隔线上的文字入口 */
.tag-tools > .m-fold-bar{
  background:transparent !important;border:0 !important;border-top:1px dashed var(--u-line) !important;
  border-radius:0 !important;color:var(--u-sub) !important;font-weight:500;
  min-height:34px;margin:8px 0 0 !important;justify-content:center;gap:6px;box-shadow:none !important;
}
.tag-tools > .m-fold-bar:hover{color:var(--u-blue) !important;background:transparent !important;}
.tag-tools > .m-fold-bar::after{content:"⌄";font-size:13px;line-height:1;transform:translateY(-1px);}
.tag-tools.m-open > .m-fold-bar::after{content:"⌃";}
/* 移动端：上一页/下一页 改为横向并更贴合底栏，减少纵向遮挡 */
@media (max-width:860px){
  .pn-nav{flex-direction:row !important;bottom:70px !important;right:8px !important;gap:6px !important;}
  /* 单行横滑区域右侧渐隐，提示「还有内容」 */
  header.top .meta,header:not(.s-head) .meta,header.top .ver-link{
    -webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 22px),transparent 100%);
    mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 22px),transparent 100%);}
}

/* 移动端首屏减负：快捷视图属次要筛选，收进「更多筛选条件」内（展开后仍可用） */
@media (max-width:640px){
  .tag-tools.m-simp:not(.m-open) .tt-row:nth-child(1){display:none;}
}

/* 触屏：页内折叠入口同样满足 44px 触控面 */
@media (pointer:coarse){
  .tag-tools > .m-fold-bar{min-height:44px !important;}
}

/* ---------- v6.1 修订 C：内容页「编写说明 / 立法沿革」可读性 ---------- */
/* 实测：说明区 12.5px、行宽 980px（≈78 汉字/行），长时间阅读吃力 */
html body .note{
  font-size:13.5px;line-height:2;color:#3f4c5e;
  background:#fbfcfe;border:1px solid var(--u-line);border-radius:12px;padding:14px 16px;}
html body .note p{margin:6px 0;}
html body .note b{color:#1a3c6e;}
html body .timeline{font-size:13px;line-height:1.95;border-radius:10px;}
@media (min-width:861px){
  html body .note{max-width:900px;}
}
@media (max-width:860px){
  html body .note{font-size:13px;line-height:1.9;padding:11px 12px;border-radius:10px;}
}
html.dark .note{background:#161f2d;border-color:#26344a;color:#aebcd2;}
html.dark .note b{color:#9cc3f5;}
html.sepia:not(.dark) .note{background:#fbf6ea;border-color:#e5d3a8;color:#4a3a24;}

/* ---------- v6.1 修订 D：对比度不足修正（WCAG AA 4.5:1） ---------- */
/* 实测：卡片沿革摘要 #7b8593 在白底仅 3.74:1；暗色下 meta 仅 3.63:1 */
html body .card .tl{color:#69747f;}
html.dark .card .meta,html.dark .card .tl{color:#9fb0c8;}
html.sepia:not(.dark) .card .tl{color:#6b5a3e;}
html body .card .docno{color:#7a8492;}
html.dark .card .docno{color:#9aa9bf;}

/* ---------- v6.1 修订 E：细节收口 ---------- */
/* 「更多筛选条件」加加减号，明确可展开 */
.tag-tools > .m-fold-bar::before{content:"＋";font-size:13px;line-height:1;color:var(--u-blue);}
.tag-tools.m-open > .m-fold-bar::before{content:"－";}
/* 横滑筛选条右侧渐隐，提示还有更多类别 */
@media (max-width:860px){
  .idx-tools .chips{-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 18px),transparent 100%);
    mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 18px),transparent 100%);}
}
/* 搜索页页脚：提高对比度（原 #8a94a3 在白底约 3.2:1） */
body.search-page footer,body.search-page .foot{color:#5a6573;font-size:12.5px;line-height:1.9;}
html.dark body.search-page footer,html.dark body.search-page .foot{color:#9aa9bf;}

/* 搜索页页脚：补足安全内边距，避免文字贴边/被底栏压住 */
body.search-page footer{padding:22px 16px calc(78px + env(safe-area-inset-bottom));
  text-align:center;font-size:12.5px;line-height:1.9;color:#5a6573;}
html.dark body.search-page footer{color:#9aa9bf;}

/* ══════════════════════════════════════════════════════════════════
   v6.2 视觉重构（2026-10-19 · 用户「整体还是太丑」）
   目标：减少配色数量与边框噪声，建立「红=品牌 / 蓝=操作 / 金=官方」三层语义。
   全部为样式层，不改动任何内容与结构。
   ══════════════════════════════════════════════════════════════════ */

/* ---------- 1. 页头：更深的酒红 + 高光 + 金色收边 ---------- */
html body header:not(.s-head){
  background:
    radial-gradient(130% 160% at 0% 0%, rgba(255,255,255,.12), rgba(255,255,255,0) 55%),
    linear-gradient(118deg,#7d1c18 0%,#992620 52%,#6c1411 100%) !important;
  border-bottom:0 !important;
  box-shadow:0 1px 0 rgba(255,255,255,.10) inset,0 3px 14px rgba(42,10,8,.16);
  position:relative;
}
html body header:not(.s-head)::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:2px;
  background:linear-gradient(90deg,rgba(201,155,63,.55),#f0d9a4 45%,rgba(201,155,63,.55));
  opacity:.85;
}
html body header.idx-hd{padding:20px 26px 18px !important;}
.hd-in{display:flex;align-items:center;justify-content:space-between;gap:24px;}
.hd-stats{display:flex;gap:26px;flex:0 0 auto;}
.hd-stats span{display:flex;flex-direction:column;align-items:flex-end;line-height:1;}
.hd-stats b{font-size:23px;font-weight:700;letter-spacing:.6px;}
.hd-stats i{font-style:normal;font-size:11px;letter-spacing:1.6px;opacity:.7;margin-top:6px;}
@media (max-width:860px){
  html body header.idx-hd{padding:12px 14px 11px !important;}
  .hd-in{gap:12px;}
  .hd-stats{gap:16px;}
  .hd-stats b{font-size:17px;}
  .hd-stats i{font-size:10px;letter-spacing:1px;margin-top:4px;}
}
@media (max-width:420px){ .hd-stats{display:none;} }

/* ---------- 2. 工具栏：白卡片分组，降低边框噪声 ---------- */
body.idx-page .idx-tools{
  background:#fff;border:1px solid var(--u-line);border-radius:16px;
  padding:14px 16px;box-shadow:0 1px 2px rgba(16,24,40,.04),0 6px 18px rgba(16,40,80,.05);
  margin:0 0 12px;}
body.idx-page .idx-tools .chips{gap:6px;}
body.idx-page .idx-tools .chip{
  background:#f5f7fa;border-color:transparent;color:#41506a;font-size:12.5px;
  padding:6px 13px;min-height:32px;}
body.idx-page .idx-tools .chip:hover{background:#eef2f8;color:#1f4f8b;}
body.idx-page .idx-tools .chip.on{background:#1f3f6e;border-color:#1f3f6e;color:#fff;box-shadow:0 2px 6px rgba(31,63,110,.22);}
body.idx-page .idx-tools .idx-count{color:#7a8492;font-size:12px;}

/* 全文搜索：常驻输入 + 仅原文勾选 + 主按钮（同一行，不再是一次跳转） */
body.idx-page .idx-fullsearch{
  grid-area:full;display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  background:#f7f9fc;border:1px solid #e6ecf4;border-radius:12px;padding:8px 10px;}
.fs-lab{font-size:12.5px;font-weight:600;color:#5a6573;white-space:nowrap;padding:0 2px 0 4px;}
body.idx-page .idx-fullsearch input[type=search]{
  flex:1 1 240px;min-width:0;height:36px;border:1px solid #d7e0ec;background:#fff;
  border-radius:8px;padding:0 12px;font-size:13.5px;color:#1f2733;outline:none;}
body.idx-page .idx-fullsearch input[type=search]:focus{border-color:var(--c-blue);box-shadow:0 0 0 3px var(--c-sel);}   /* v8：退役电光蓝清零 */
.fs-chk{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:#5a6573;
  white-space:nowrap;cursor:pointer;padding:0 4px;min-height:32px;}
.fs-chk input{width:15px;height:15px;accent-color:var(--c-brand);cursor:pointer;}
.fs-go{height:36px;padding:0 18px;border:0;border-radius:8px;background:var(--c-brand);color:#fff;
  font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,transform .12s;}
.fs-go:hover{background:var(--c-brand-deep);}
.fs-go:active{transform:translateY(1px);}
@media (min-width:861px){
  body.idx-page .idx-tools{grid-template-areas:"chips count" "find find" "full full";}
}
@media (max-width:860px){
  body.idx-page .idx-tools{padding:11px 12px;border-radius:14px;}
  .idx-fullsearch{padding:7px 8px;gap:7px;}
  .fs-lab{display:none;}
  body.idx-page .idx-fullsearch input[type=search]{flex:1 1 100%;height:38px;font-size:16px;}
  .fs-chk{flex:1 1 auto;min-height:34px;}
  .fs-go{flex:0 0 auto;height:38px;padding:0 16px;}
}

/* ---------- 3. 速查卡入口：深色横幅 → 浅色卡片 ---------- */
body.idx-page .qr-entry{
  background:linear-gradient(180deg,#ffffff,#fcfaf7) !important;
  color:var(--u-ink) !important;
  border:1px solid #ece3d8 !important;border-left:4px solid var(--c-brand) !important;
  border-radius:14px !important;padding:14px 18px !important;
  box-shadow:var(--u-shadow) !important;}
body.idx-page .qr-entry-t{font-size:15px;font-weight:700;color:#1f2733;}
body.idx-page .qr-entry-t small{color:#8a94a3;font-weight:400;}
body.idx-page .qr-entry-d{color:#5a6573;font-size:12.5px;line-height:1.85;}
body.idx-page .qr-entry-a .qr-btn{background:var(--c-brand);color:#fff;border-color:var(--c-brand);}
body.idx-page .qr-entry-a .qr-btn:hover{background:var(--c-brand-deep);}
body.idx-page .qr-entry-a .btn{background:#fff;color:var(--c-brand);border-color:#e3cbc8;}
html.dark body.idx-page .qr-entry{background:#161f2d !important;border-color:#2a3648 !important;border-left-color:#c25a52 !important;}
html.dark body.idx-page .qr-entry-t{color:#dbe8ff;}
html.dark body.idx-page .qr-entry-d{color:#9fb0c8;}
html.sepia:not(.dark) body.idx-page .qr-entry{background:#fbf5e8 !important;border-color:#e2d0ab !important;border-left-color:var(--c-brand) !important;}

/* ---------- 4. 办案链条：更轻的胶囊 + 品牌色序号 ---------- */
body.idx-page .cn-hd{color:#6b7787;font-size:12px;letter-spacing:.5px;}
body.idx-page .cn-node{background:#fff;border-color:#e6ebf3;box-shadow:0 1px 2px rgba(16,24,40,.04);}
body.idx-page .cn-go{color:#41506a;font-size:12.5px;padding:6px 12px 6px 7px;}
body.idx-page .cn-no{background:var(--c-brand);color:#fff;font-weight:600;width:18px;height:18px;font-size:10.5px;}
body.idx-page .cn-node:hover{border-color:#c9a29f;}
body.idx-page .cn-node:hover .cn-go{color:var(--c-brand);}

/* ---------- 5. 卡片：类别色顶条 + 收敛徽标 + 按钮分层 ---------- */
body.idx-page .card{position:relative;overflow:hidden;border-radius:14px;background:#fff;}
body.idx-page .card::before{
  content:"";position:absolute;left:0;right:0;top:0;height:3px;background:var(--cat,#94a3b8);}   /* v8：opacity 已删 —— getComputedStyle 必须等于渲染值（实测=渲染前提） */
body.idx-page .card .card-h{font-size:15px;line-height:1.55;padding-top:2px;}
body.idx-page .card .card-h .docno{display:block;font-size:11px;color:#8a94a3;font-weight:400;margin-top:3px;letter-spacing:.2px;}
body.idx-page .card .meta{font-size:12px;color:#6b7787;line-height:1.7;}
body.idx-page .card .desc{font-size:12.5px;color:#5a6573;line-height:1.8;}
body.idx-page .card .tl{display:none;}          /* 沿革移到详情页，卡片不再堆 5 行 */
body.idx-page .pri-badge{font-size:10.5px;padding:2px 7px;border-radius:999px;
  background:#fbf6ea;color:#a16207;border-color:#f1e2c4;}
body.idx-page .card-actions{display:flex;gap:6px;margin-top:auto;}
body.idx-page .card .btn{flex:1 1 0;justify-content:center;text-align:center;font-size:12px;
  min-height:36px;padding:0 6px;border-radius:8px;}
body.idx-page .card .btn.orig{background:var(--c-brand);color:#fff;border-color:var(--c-brand);font-weight:600;}
body.idx-page .card .btn.orig:hover{background:var(--c-brand-deep);}
body.idx-page .card .btn.dx{background:#fff;color:#1f4f8b;border-color:#cfdae8;}
body.idx-page .card .btn.dx:hover{background:#f3f7fd;}
body.idx-page .card .btn.gov{background:#fffaf0;color:#9a5b06;border-color:#eddcc0;}

/* 分组标题：细左条 + 计数弱化 */
body.idx-page .group-h{font-size:15px;color:#1f2733;border-left:3px solid var(--c-brand);
  padding-left:10px;margin:16px 0 2px;font-weight:700;}
body.idx-page .group-h small{color:#8a94a3;font-size:11.5px;font-weight:400;}

/* 深色 / 护眼适配 */
html.dark body.idx-page .idx-tools{background:#151d29;border-color:#26344a;}
html.dark body.idx-page .idx-tools .chip{background:#1d2736;color:#aebcd2;}
html.dark body.idx-page .idx-tools .chip.on{background:#2f6df0;border-color:#2f6df0;color:#fff;}
html.dark body.idx-page .idx-fullsearch{background:#111925;border-color:#26344a;}
html.dark body.idx-page .idx-fullsearch input[type=search]{background:#1a2332;border-color:#2c3950;color:#dbe8ff;}
html.dark body.idx-page .card .btn.orig{background:var(--c-brand);border-color:var(--c-brand);color:#fff;}
html.dark body.idx-page .card .btn.dx{background:#1a2332;border-color:#2c3950;color:#9cc3f5;}
html.dark body.idx-page .card .btn.gov{background:#241d10;border-color:#4a3a1c;color:#e0b466;}
html.sepia:not(.dark) body.idx-page .idx-tools{background:#fbf6ea;border-color:#e5d3a8;}
html.sepia:not(.dark) body.idx-page .card{background:#fbf7ee;}

/* ---------- v6.2 修订：筛选区与工具栏合并为一块面板 ---------- */
body.idx-page .idx-tools{
  border-radius:16px 16px 0 0 !important;margin-bottom:0 !important;
  box-shadow:0 1px 2px rgba(16,24,40,.04) !important;}
body.idx-page .tag-tools{
  background:#fff;border:1px solid var(--u-line);border-top:1px dashed #edf1f6;
  border-radius:0 0 16px 16px;padding:12px 16px 10px;
  margin:0 0 14px;box-shadow:0 8px 20px rgba(16,40,80,.05);}
body.idx-page .tag-tools .tt-lab{color:#7a8492;}
body.idx-page .tag-tools .qv{background:#f7f9fc;border-color:#e6ecf4;color:#41506a;}
body.idx-page .tag-tools .qv:hover{border-color:#c9a29f;color:var(--c-brand);}
body.idx-page .tag-tools select{border-color:#dfe6f0;background:#fff;color:#41506a;}
body.idx-page .tag-tools > .m-fold-bar{
  border-top:1px dashed #edf1f6 !important;margin-top:10px !important;min-height:38px;}
@media (max-width:860px){
  body.idx-page .tag-tools{padding:10px 12px 8px;border-radius:0 0 14px 14px;}
}
html.dark body.idx-page .tag-tools{background:#151d29;border-color:#26344a;}
html.dark body.idx-page .tag-tools .qv{background:#1d2736;border-color:#2c3950;color:#aebcd2;}
html.sepia:not(.dark) body.idx-page .tag-tools{background:#fbf6ea;border-color:#e5d3a8;}

/* ---------- v6.2 深色适配补齐 ---------- */
html.dark body.idx-page .card{background:#1a2332;border-color:#2c3950;}
html.dark body.idx-page .card .card-h a{color:#cfe0ff;}
html.dark body.idx-page .card .card-h .docno{color:#93a4bd;}
html.dark body.idx-page .card .meta{color:#9fb0c8;}
html.dark body.idx-page .card .desc{color:#aebcd2;}
html.dark body.idx-page .group-h{color:#dbe8ff;}
html.dark body.idx-page .group-h small{color:#8fa0b8;}
html.dark body.idx-page .idx-count{color:#9aa9bf !important;}
html.dark body.idx-page .fs-lab,html.dark body.idx-page .fs-chk{color:#aebcd2;}
html.dark body.idx-page .cn-go{color:#c2d2e8;}
html.dark body.idx-page .cn-node{background:#1a2332;border-color:#2c3950;}
html.dark body.idx-page .cn-hd{color:#9fb0c8;}
html.dark body.idx-page .hd-stats i{opacity:.75;}

/* ---------- v6.2 对比度补齐（AA 4.5:1） ---------- */
body.idx-page .card .card-h .docno{color:#6b7787;}
body.idx-page .tag-tools .tt-lab{color:#5a6573;}
body.idx-page .group-h small{color:#6b7787;}
body.idx-page .idx-count{color:#5a6573;}
html.dark body.idx-page .tag-tools .tt-lab{color:#9fb0c8;}
html.dark body.idx-page .card .card-h .docno{color:#9aa9bf;}
html.dark body.idx-page .group-h small{color:#9aa9bf;}

/* v6.2 对比度补齐（二次提权） */
body.idx-page .idx-tools .idx-count{color:#5a6573;}
body.idx-page .group-h small{color:#5c6878;}

/* 卡片第三键改为轻量文字入口，降低按钮密度 */
body.idx-page .card .btn.gov{background:transparent;border-color:transparent;color:#9a5b06;
  font-weight:500;box-shadow:none;}
body.idx-page .card .btn.gov:hover{background:#fff6e6;border-color:#f0dfc2;}
html.dark body.idx-page .card .btn.gov{background:transparent;border-color:transparent;color:#e0b466;}
html.dark body.idx-page .card .btn.gov:hover{background:#241d10;}

/* 卡片细节收口：标题避开星级徽标、简介限 2 行，减少等高留白 */
body.idx-page .card .card-h{padding-right:46px;}
body.idx-page .card .desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}

/* ---------- v6.2 条文块标签：7 色底 → 统一中性底 + 彩色圆点 ---------- */
html body .dx-blk[data-b] > .dx-lab{
  background:#f1f5fb !important;color:#1f4f8b !important;font-weight:600;
  border-radius:6px;padding:3px 10px 3px 9px;}
html body .dx-blk[data-b] > .dx-lab::before{
  content:"";display:inline-block;width:6px;height:6px;border-radius:50%;
  margin-right:6px;vertical-align:1.5px;background:#64748b;}
html body .dx-blk[data-b="tw"] > .dx-lab::before{background:#64748b;}
html body .dx-blk[data-b="zz"] > .dx-lab::before{background:#b45309;}
html body .dx-blk[data-b="lj"] > .dx-lab::before{background:#0f766e;}
html body .dx-blk[data-b="ct"] > .dx-lab::before{background:#7c3aed;}
html body .dx-blk[data-b="rl"] > .dx-lab::before{background:#1d4ed8;}
html body .dx-blk[data-b="bt"] > .dx-lab::before{background:#be123c;}
html body .dx-blk[data-b="case"] > .dx-lab::before{background:#a16207;}
html.dark body .dx-blk[data-b] > .dx-lab{background:#1d3252 !important;color:#9cc3f5 !important;}
html.sepia:not(.dark) body .dx-blk[data-b] > .dx-lab{background:#f3e9d3 !important;color:#6d4a1f !important;}

/* 触屏：分类胶囊恢复 44px 触控面（v6.2 的 32px 仅用于鼠标端） */
@media (pointer:coarse){
  body.idx-page .idx-tools .chip{min-height:44px;}
}

/* 移动端「更多筛选条件」改为浅底按钮，避免看起来像空白 */
@media (max-width:860px){
  body.idx-page .tag-tools > .m-fold-bar{
    background:#f5f8fc !important;border:0 !important;border-radius:10px !important;
    margin:2px 0 0 !important;color:#41506a !important;font-weight:600;}
  body.idx-page .tag-tools > .m-fold-bar::before{color:var(--c-brand);}
}

/* ══════════════════════════════════════════════════════════════════
   v6.3 移动端系统性重构（2026-10-19 · 用户「手机端也太丑了」）

   问题诊断（360–390px 实机截图）：
     ① 页头 110px 却只装一行标题，副标题与统计挤成一团；
     ② 分类胶囊横滑溢出、被硬切（"地方性法规"半截），没有可滑提示；
     ③ 筛选面板 5 层纵向堆叠（分类/筛选本站/全文搜索/统计/更多），
        两个输入框各带一个文字标签，标签在窄屏被压成两行；
     ④ "83 部法规 · 官方工具 2 件"孤立悬空在面板底部；
     ⑤ 办案链条胶囊横滑溢出，"调查取证 +1"被裁掉；
     ⑥ 卡片标题两行、按钮行"官方链接 ↗"换行、描述占 3 行。

   重构策略（纯样式层 + 一处结构微调）：
     · 页头压缩为「标题 + 规模」两行，隐藏副标题（信息价值低于规模数据）；
     · 分类胶囊改 3 列等宽网格，一屏看全 6 类，不再横滑；
     · 两个搜索入口纵向各占整行，标签改为「眼睛能看见的图标」：
       法规名筛选 → 放大镜；条文检索 → 内嵌按钮的 App 式搜索栏；
     · 勾选与统计合并为同一行两端对齐，消除孤立小字；
     · 链条与卡片全面瘦身，按钮行 nowrap 三等分不换行。
   配色收敛：枣红（品牌/主操作/选中）＋ 中性灰（底）＋ 金（官方），
   蓝色只保留在链接文字上；选中态由「实心深蓝块」改为「浅红底+红字」。
   ══════════════════════════════════════════════════════════════════ */

/* ---------- 0. 全文搜索内嵌输入栏（全尺寸通用） ---------- */
body.idx-page .fs-box{
  display:flex;align-items:center;min-width:0;
  border:1px solid #d7e0ec;border-radius:10px;background:#fff;
  padding:0 0 0 12px;transition:border-color .15s,box-shadow .15s;}
body.idx-page .fs-box:focus-within{border-color:#c08b86;box-shadow:0 0 0 3px var(--c-sel);}
body.idx-page .fs-box input[type=search]{
  flex:1 1 auto;min-width:0;border:0 !important;background:transparent !important;
  box-shadow:none !important;outline:none !important;padding:0 !important;
  height:36px;font-size:13.5px;color:#1f2733;-webkit-appearance:none;appearance:none;}
body.idx-page .fs-box input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;}
body.idx-page .fs-box .fs-go{
  flex:0 0 auto;height:34px;min-height:34px;margin:0 3px 0 8px;padding:0 14px;
  border:0;border-radius:7px;background:var(--c-brand);color:#fff;
  font-size:12.5px;font-weight:600;cursor:pointer;}
body.idx-page .fs-box .fs-go:hover{background:var(--c-brand-deep);}
body.idx-page .fs-box .fs-go:active{transform:translateY(1px);}
/* 桌面/平板：输入栏自适应撑满，统计靠最右 */
@media (min-width:641px){
  body.idx-page .fs-box{flex:1 1 260px;}
  body.idx-page .idx-fullsearch .idx-count{margin-left:auto;}
  body.idx-page .idx-tools{grid-template-areas:"chips chips" "find find" "full full" !important;}
}
html.dark body.idx-page .fs-box{background:#1a2332;border-color:#2c3950;}
html.dark body.idx-page .fs-box input[type=search]{color:#dbe8ff;}
html.sepia:not(.dark) body.idx-page .fs-box{background:#fbf6ea;border-color:#d9c9a6;}
html.sepia:not(.dark) body.idx-page .fs-box input[type=search]{color:#332b1f;}
html.sepia.dark body.idx-page .fs-box{background:#262019;border-color:#3a3225;}

/* ---------- 1. 移动端主重构（≤700px） ---------- */
@media (max-width:700px){

  /* — 1.1 基础节奏：横向留白 13px，卡片间距 10px — */
  body.idx-page .wrap{padding-left:13px !important;padding-right:13px !important;}

  /* — 1.2 页头：两行（标题 / 规模），去掉拥挤的副标题 — */
  html body header.idx-hd{padding:11px 13px 9px !important;}
  html body header.idx-hd .hd-in{
    display:grid !important;grid-template-columns:minmax(0,1fr);
    grid-template-areas:"t" "s";gap:4px !important;align-items:center;}
  html body header.idx-hd .hd-main{display:contents !important;}
  html body header.idx-hd h1{
    grid-area:t;font-size:16.5px !important;line-height:1.3 !important;
    letter-spacing:.4px;margin:0 !important;font-weight:700;}
  html body header.idx-hd .meta{display:none !important;}
  html body header.idx-hd .hd-stats{
    grid-area:s;display:flex !important;gap:0 !important;align-items:baseline;}
  html body header.idx-hd .hd-stats span{
    flex-direction:row !important;align-items:baseline !important;gap:2px !important;}
  html body header.idx-hd .hd-stats span + span::before{
    content:"·";margin:0 6px;opacity:.45;font-weight:400;}
  html body header.idx-hd .hd-stats b{font-size:12.5px !important;letter-spacing:0 !important;font-weight:700;}
  html body header.idx-hd .hd-stats i{
    font-size:9.5px !important;letter-spacing:0 !important;margin:0 !important;opacity:.62;}

  /* — 1.3 速查卡入口：一屏内两行（标题 / 双按钮） — */
  body.idx-page .qr-entry{
    padding:11px 12px !important;border-radius:12px !important;margin-bottom:10px !important;
    border-left-width:3px !important;}
  body.idx-page .qr-entry-t{
    font-size:14.5px !important;display:flex !important;align-items:baseline;
    gap:6px;flex-wrap:wrap;line-height:1.4;}
  body.idx-page .qr-entry-t small{font-size:10.5px !important;color:#8a94a3 !important;font-weight:400;}
  body.idx-page .qr-entry-d{display:none !important;}
  body.idx-page .qr-entry-a{margin-top:9px !important;display:flex !important;gap:8px;}
  body.idx-page .qr-entry-a .btn{
    flex:1 1 0 !important;min-height:38px !important;font-size:12.5px !important;
    padding:0 8px !important;justify-content:center;white-space:nowrap;}

  /* — 1.4 筛选面板：三层（分类网格 / 法规名 / 条文检索） — */
  body.idx-page .idx-tools{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-areas:"chips" "find" "full" !important;
    gap:10px !important;padding:11px !important;
    border-radius:14px 14px 0 0 !important;margin:0 !important;}

  /* 分类：3 列等宽网格，6 类一屏看全，彻底去掉横滑与被切边 */
  body.idx-page .idx-tools .chips{
    grid-area:chips !important;display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:6px !important;overflow:visible !important;flex-wrap:nowrap !important;
    padding:0 !important;
    -webkit-mask-image:none !important;mask-image:none !important;}
  body.idx-page .idx-tools .chip{
    display:flex !important;align-items:center;justify-content:center;
    min-height:38px !important;height:auto;padding:0 2px !important;
    font-size:12px !important;line-height:1 !important;letter-spacing:0;
    border-radius:9px !important;background:#f4f6f9 !important;
    border:1px solid transparent !important;color:#465569 !important;
    white-space:nowrap;box-shadow:none !important;}
  body.idx-page .idx-tools .chip.on{
    background:var(--c-brand-wash) !important;border-color:var(--c-brand-line) !important;
    color:var(--c-brand) !important;font-weight:700 !important;}

  /* 法规名筛选：整行，标签改为内嵌放大镜图标 */
  body.idx-page .find-bar{
    grid-area:find !important;display:block !important;flex:none !important;
    width:100% !important;min-width:0 !important;}
  body.idx-page .idx-search{
    display:flex !important;align-items:center;min-height:42px;
    border:1px solid #e2e8f0;border-radius:10px;background:#fff;
    overflow:hidden;transition:border-color .15s,box-shadow .15s;}
  body.idx-page .idx-search .f-lab{display:none !important;}
  body.idx-page .idx-search::before{
    content:"";flex:0 0 auto;width:15px;height:15px;margin:0 7px 0 12px;opacity:.5;
    background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6573' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.2-4.2'/%3E%3C/svg%3E") center/15px 15px no-repeat;}
  body.idx-page .idx-search input{
    flex:1 1 auto !important;min-width:0 !important;min-height:40px !important;
    border:0 !important;border-radius:0 !important;background:transparent !important;
    box-shadow:none !important;padding:0 12px 0 0 !important;font-size:14px !important;}
  body.idx-page .idx-search:focus-within{border-color:#c08b86;box-shadow:0 0 0 3px var(--c-sel);}

  /* 条文检索：App 式内嵌搜索栏 + 下一行「勾选 / 统计」两端对齐 */
  body.idx-page .idx-fullsearch{
    grid-area:full !important;display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:"box box" "chk count" !important;
    gap:8px !important;padding:0 !important;background:transparent !important;
    border:0 !important;border-radius:0 !important;}
  body.idx-page .idx-fullsearch .fs-lab{display:none !important;}
  body.idx-page .idx-fullsearch .fs-box{
    grid-area:box;min-height:48px;padding:0 3px 0 12px;border-color:#e2e8f0;}
  body.idx-page .idx-fullsearch .fs-box input[type=search]{height:40px;font-size:14px;}
  body.idx-page .idx-fullsearch .fs-box .fs-go{height:38px;min-height:38px;padding:0 16px;font-size:13px;}
  body.idx-page .fs-chk{
    grid-area:chk;display:inline-flex !important;align-items:center;gap:6px;
    min-height:26px !important;font-size:12px !important;color:#5a6573 !important;
    padding:0 !important;flex:none !important;}
  body.idx-page .fs-chk input{width:16px !important;height:16px !important;margin:0;accent-color:var(--c-brand);}
  body.idx-page .idx-tools .idx-count{
    grid-area:count !important;justify-self:end;align-self:center;
    font-size:11px !important;color:#8a94a3 !important;white-space:nowrap;letter-spacing:.2px;}

  /* — 1.5 快捷筛选（折叠区内部）：标签定宽，胶囊换行 — */
  body.idx-page .tag-tools{
    padding:9px 11px 8px !important;border-radius:0 0 14px 14px !important;margin-bottom:12px !important;}
  body.idx-page .tag-tools > .m-fold-bar{
    min-height:38px !important;font-size:12.5px !important;border-radius:9px !important;}
  body.idx-page .tag-tools .tt-row{padding:8px 10px !important;gap:6px !important;border-radius:9px !important;}
  body.idx-page .tag-tools .tt-lab{font-size:11px !important;min-width:42px;letter-spacing:0;}
  body.idx-page .tag-tools .qv{
    min-height:34px !important;font-size:12px !important;padding:0 11px !important;border-radius:8px !important;}
  body.idx-page .tag-tools select{font-size:12.5px !important;min-height:34px !important;}

  /* — 1.6 办案链条：紧凑胶囊 + 右侧渐隐，明确「还能滑」 — */
  body.idx-page .chain-nav{margin:0 0 12px !important;}
  body.idx-page .cn-hd{
    font-size:11.5px !important;margin-bottom:7px !important;letter-spacing:.2px;
    display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;}
  body.idx-page .cn-hd small{font-size:10.5px !important;opacity:.8;}
  body.idx-page .cn-track{
    gap:6px !important;padding-bottom:2px !important;scroll-snap-type:x proximity;
    -webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 26px),transparent 100%);
    mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 26px),transparent 100%);}
  body.idx-page .cn-wrap{scroll-snap-align:start;}
  body.idx-page .cn-go{
    font-size:11.5px !important;padding:0 11px 0 6px !important;
    min-height:44px !important;gap:5px;}
  body.idx-page .cn-no{width:16px !important;height:16px !important;font-size:9.5px !important;}

  /* — 1.7 分组标题 — */
  body.idx-page .group-h{
    font-size:13.5px !important;margin:14px 0 8px !important;
    padding-left:9px !important;border-left-width:3px !important;letter-spacing:.2px;}
  body.idx-page .group-h small{font-size:10.5px !important;}

  /* — 1.8 卡片：收紧标题/元信息行高，按钮行三等分不换行 — */
  body.idx-page .grid{gap:10px;}
  body.idx-page .card{padding:13px !important;border-radius:13px !important;}
  body.idx-page .card .card-h{
    font-size:14.5px !important;line-height:1.48 !important;padding-right:40px !important;}
  body.idx-page .card .card-h .docno{
    font-size:10.5px !important;margin-top:3px !important;letter-spacing:.2px;}
  body.idx-page .card .meta{font-size:11.5px !important;line-height:1.62 !important;margin-top:5px !important;}
  body.idx-page .card .desc{
    font-size:12px !important;line-height:1.72 !important;margin:7px 0 0 !important;}
  body.idx-page .card-actions{
    gap:6px !important;margin-top:10px !important;padding-top:10px !important;
    border-top:1px solid #f2f5f9;}
  body.idx-page .card .btn{
    min-height:34px !important;font-size:11.5px !important;letter-spacing:.1px;
    padding:0 6px !important;border-radius:8px !important;white-space:nowrap;}
  body.idx-page .card .btn.gov{padding:0 4px !important;}
  body.idx-page .pri-badge{
    top:8px !important;right:8px !important;font-size:9.5px !important;
    padding:1px 6px !important;line-height:1.6 !important;}

  /* — 1.9 折叠入口 / 低频分组 — */
  body.idx-page .more-toggle{font-size:12.5px !important;min-height:40px !important;}
  body.idx-page .extra-h{font-size:12.5px !important;}

  /* — 1.10 底栏：图标与字号收紧，6 项不挤 — */
  body.idx-page .m-bar a{font-size:10px !important;gap:2px !important;}
  body.idx-page .m-bar b{font-size:16px !important;line-height:1.2 !important;}
}

/* ---------- 2. 超窄屏（≤360px）再收一档 ---------- */
@media (max-width:360px){
  body.idx-page .idx-tools .chip{font-size:11.5px !important;min-height:36px !important;}
  body.idx-page .card .card-h{font-size:14px !important;}
  body.idx-page .card .btn{font-size:11px !important;}
  body.idx-page .qr-entry-a .btn{font-size:12px !important;}
}

/* ---------- 3. 深色 / 护眼：补齐 v6.3 新增元素 ---------- */
html.dark body.idx-page .idx-tools .chip{background:#1d2736 !important;color:#aebcd2 !important;border-color:transparent !important;}
html.dark body.idx-page .idx-tools .chip.on{background:#2a1a19 !important;border-color:#5e3330 !important;color:#e8a9a2 !important;}
html.dark body.idx-page .idx-search{background:#1a2332;border-color:#2c3950;}
html.dark body.idx-page .idx-search input{color:#dbe8ff;}
html.dark body.idx-page .idx-search::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb0c8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.2-4.2'/%3E%3C/svg%3E");}
html.dark body.idx-page .card-actions{border-top-color:#243149;}
html.dark body.idx-page .fs-chk{color:#aebcd2 !important;}
html.sepia:not(.dark) body.idx-page .idx-tools .chip{background:#f4ead4 !important;color:#6d5a38 !important;}
html.sepia:not(.dark) body.idx-page .idx-tools .chip.on{
  background:#f7e4d4 !important;border-color:#d3a98e !important;color:var(--c-brand) !important;}
html.sepia:not(.dark) body.idx-page .idx-search{background:#fbf6ea;border-color:#ddceab;}
html.sepia:not(.dark) body.idx-page .card-actions{border-top-color:#ece0c6;}
html.sepia:not(.dark) body.idx-page .fs-chk{color:#6d5a38 !important;}

/* ---------- 4. 触屏：网格胶囊保持 44px 触控面 ---------- */
@media (max-width:700px) and (pointer:coarse){
  body.idx-page .idx-tools .chip{min-height:44px !important;}
}

/* ── v6.3.1 二次打磨（2026-10-19）─────────────────────────────────
   第一轮重构后实机复查发现：
     · 卡片同时有 4px 左边条与 3px 顶条，形成笨重的 "L" 形；
     · 三个按钮里「法律原文」实心红块过重，抢走标题的视觉主位；
     · 「更多筛选条件」仍是整行灰块，像一块补丁；
     · 输入框 placeholder 比可用宽度长 60px，被截断；
     · 分类网格 44px 略笨重。
   本轮统一回调为「标题为主、操作为辅」的轻量语法。
   ─────────────────────────────────────────────────────────────── */

/* 1. 卡片：去掉左边条，只留顶条 */
body.idx-page .card[data-cat]{border-left:0 !important;}
html.dark body.idx-page .card[data-cat]{border-left:0 !important;}

/* 2. 卡片标题回到近黑，hover 才显品牌红 */
body.idx-page .card .card-h a{color:#1b2430;}
body.idx-page .card .card-h a:hover{color:var(--c-brand);}
html.dark body.idx-page .card .card-h a{color:#cfe0ff;}
html.dark body.idx-page .card .card-h a:hover{color:#f0b8b2;}
html.sepia:not(.dark) body.idx-page .card .card-h a{color:#33291c;}
html.sepia:not(.dark) body.idx-page .card .card-h a:hover{color:var(--c-brand);}

/* 3. 三个入口等重：浅红 / 描边 / 纯文字 */
body.idx-page .card .btn.orig{
  background:var(--c-brand-wash) !important;color:var(--c-brand) !important;
  border:1px solid #e9cbc7 !important;font-weight:600;}
body.idx-page .card .btn.orig:hover{background:#fae6e3 !important;border-color:#dcb0ab !important;}
body.idx-page .card .btn.dx{
  background:#fff !important;color:#3d4a5c !important;border:1px solid #e0e6ef !important;font-weight:500;}
body.idx-page .card .btn.dx:hover{background:#f7f9fc !important;border-color:#c9d4e3 !important;}
body.idx-page .card .btn.gov{
  background:transparent !important;border:1px solid transparent !important;
  color:#9a6a1a !important;font-weight:500;}
body.idx-page .card .btn.gov:hover{background:#fdf7ea !important;border-color:#efdfbf !important;}
html.dark body.idx-page .card .btn.orig{background:#3a1c1a !important;color:var(--c-brand-fg) !important;border-color:#5e3330 !important;}
html.dark body.idx-page .card .btn.dx{background:#1a2332 !important;color:#c2d2e8 !important;border-color:#2c3950 !important;}
html.dark body.idx-page .card .btn.gov{background:transparent !important;color:#e0b466 !important;}
html.sepia:not(.dark) body.idx-page .card .btn.orig{background:#f8e6d9 !important;color:var(--c-brand) !important;border-color:#dcb9a8 !important;}
html.sepia:not(.dark) body.idx-page .card .btn.dx{background:#fbf6ea !important;color:#4a3d22 !important;border-color:#ddd0b8 !important;}
html.sepia:not(.dark) body.idx-page .card .btn.gov{background:transparent !important;color:#8a6a20 !important;}

/* 4. 「现行有效」做成状态胶囊，不再是一串绿字 */
body.idx-page .card .meta .st-cur{
  display:inline-block;background:#edf7f2;color:#0f6b5a;
  border-radius:5px;padding:0 6px;font-size:10.5px;font-weight:600;
  line-height:1.7;vertical-align:baseline;letter-spacing:.2px;}
html.dark body.idx-page .card .meta .st-cur{background:#12332c;color:#5fd3b4;}
html.sepia:not(.dark) body.idx-page .card .meta .st-cur{background:#e8f0e4;color:#3f6b3a;}

/* 5. 「更多筛选条件」：整行灰块 → 居中文字入口 */
@media (max-width:700px){
  body.idx-page .tag-tools{padding:0 11px 4px !important;}
  body.idx-page .tag-tools > .m-fold-bar{
    background:transparent !important;border:0 !important;
    margin:8px 0 0 !important;min-height:38px !important;
    font-size:12px !important;font-weight:600 !important;color:#6b7787 !important;
    letter-spacing:.2px;gap:4px;}
  body.idx-page .tag-tools > .m-fold-bar::before{color:var(--c-brand) !important;font-weight:700;}
  body.idx-page .tag-tools > .m-fold-bar::after{color:#8a94a3 !important;}
  body.idx-page .tag-tools.m-open > .m-fold-bar{margin-bottom:4px !important;}
  /* 分类网格：44px → 40px，两行更齐整 */
  body.idx-page .idx-tools .chip{min-height:44px !important;}
}

/* 6. 链条右侧渐隐加宽到 40px，明确「还能滑」 */
body.idx-page .cn-track{
  -webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 40px),transparent 100%);
  mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 40px),transparent 100%);}

/* 7. 页头规模：数字提亮、分隔点更轻 */
html body header.idx-hd .hd-stats i{opacity:.78 !important;}
html body header.idx-hd .hd-stats span + span::before{opacity:.38 !important;}

/* 8. 速查卡副标题对比度（原 #8a94a3 在米白底仅 3.4:1） */
body.idx-page .qr-entry-t small{color:#6b7787 !important;}
html.dark body.idx-page .qr-entry-t small{color:#9fb0c8 !important;}
html.sepia:not(.dark) body.idx-page .qr-entry-t small{color:#7a6a4a !important;}

/* ── v6.3.2 首屏节奏（2026-10-19）─────────────────────────────────
   实测页头→速查卡之间堆积了 50px 空白：header.top 自带 26px 下边距
   （来自生成器内联样式），.wrap 又带 24px 上内边距。手机首屏只有 800px，
   这 50px 相当于一张卡片的位置，故在移动端归零。
   ─────────────────────────────────────────────────────────────── */
@media (max-width:700px){
  html body header.idx-hd{margin-bottom:0 !important;}
  body.idx-page .wrap{padding-top:10px !important;}
  /* 卡片按钮：34 → 36px，字号回到 12px（360px 下曾被 11px 压得过小） */
  body.idx-page .card .btn{min-height:36px !important;font-size:12px !important;}
  body.idx-page .card-actions{margin-top:9px !important;padding-top:9px !important;}
  body.idx-page .card .meta{line-height:1.75 !important;}
  body.idx-page .card .meta .st-cur{margin-top:2px;}
}
@media (max-width:360px){
  body.idx-page .card .btn{font-size:11.5px !important;}
  body.idx-page .qr-entry-a .btn{font-size:11.5px !important;}
}

/* ── v6.3.3 卡片类别标记：通栏色条 → 左上短标（2026-10-19）─────────
   通栏 3px 色条在密集列表中连成横纹，读起来像表格分隔线；
   收成 44px 短标后，卡片顶部只剩一个"书签"，类别仍可辨但更安静。
   同时把「法规名筛选」改为浅灰内嵌底，与白底条文检索框形成分工。
   ─────────────────────────────────────────────────────────────── */
body.idx-page .card::before{left:13px;right:auto;width:44px;height:3px;border-radius:0 0 2px 2px;}
html.dark body.idx-page .card::before{}   /* v8：dark 专属 opacity:.85 一并删（半修补齐，全皮肤一致） */

body.idx-page .idx-search{background:#f6f8fb;border-color:#e9eef5;}
body.idx-page .idx-search:focus-within{background:#fff;}
html.dark body.idx-page .idx-search{background:#141d2a;border-color:#26344a;}
html.dark body.idx-page .idx-search:focus-within{background:#1a2332;}
html.sepia:not(.dark) body.idx-page .idx-search{background:#f6efdd;border-color:#e2d3b0;}

html body header.idx-hd .hd-stats i{opacity:.85 !important;}

/* 状态徽标与分隔点同组，禁止拆行 */
body.idx-page .card .meta .st-wrap{white-space:nowrap;}
/* 卡片标题两行长度均衡，避免末行只剩「正）」一个孤字 */
body.idx-page .card .card-h a{font-weight:600;}
html body .card-h a{font-weight:600;}

/* 标题里的年份括号整体不可断（避免「商标法」被拆成「商标 / 法》」） */
body.idx-page .card .card-h .yr{white-space:nowrap;}

/* meta 按「段」换行：每段内部不断（日期不会被拆成「修正施 / 行」） */
body.idx-page .card .meta .mi{white-space:nowrap;}

/* ── v6.3.4 折叠入口收口（2026-10-19）─────────────────────────────
   「更多筛选条件」原来同时带「＋」和「⌄」两个符号，语义重复且占宽；
   折叠态只需要一个方向指示。同时把这一行压到 34px，减少面板底部空转。
   ─────────────────────────────────────────────────────────────── */
@media (max-width:700px){
  body.idx-page .tag-tools{padding:0 11px 2px !important;}
  body.idx-page .tag-tools > .m-fold-bar::before{content:"" !important;display:none !important;}
  body.idx-page .tag-tools > .m-fold-bar{
    min-height:44px !important;margin:2px 0 0 !important;font-size:12px !important;}
  body.idx-page .tag-tools > .m-fold-bar::after{font-size:12px;}
}

/* ── v6.3.5 桌面端与深色收口（2026-10-19）─────────────────────────
   ① 分类胶囊选中态在手机端已改为「浅红底+红字」，桌面仍是 v6.2 的实心深蓝，
      跨端不一致；这里统一（桌面用同样语法，只是尺寸更大）。
   ② 深色/护眼模式下「更多筛选条件」被 v6.3.4 的 #6b7787 压到 3.72:1，
      补一套暗色/暖色值。
   ─────────────────────────────────────────────────────────────── */
body.idx-page .idx-tools .chip.on{
  background:var(--c-brand-wash) !important;border-color:var(--c-brand-line) !important;
  color:var(--c-brand) !important;font-weight:700 !important;box-shadow:none !important;}
body.idx-page .idx-tools .chip:hover{background:#eef2f8 !important;color:#1f4f8b !important;}
body.idx-page .idx-tools .chip.on:hover{background:#fbe9e6 !important;color:var(--c-brand) !important;}

html.dark body.idx-page .tag-tools > .m-fold-bar{color:#a9b7ca !important;}
html.dark body.idx-page .tag-tools > .m-fold-bar::before{color:#e08a82 !important;}
html.dark body.idx-page .tag-tools > .m-fold-bar::after{color:#8fa0b8 !important;}
html.sepia:not(.dark) body.idx-page .tag-tools > .m-fold-bar{color:#6d5a38 !important;}
html.sepia:not(.dark) body.idx-page .tag-tools > .m-fold-bar::before{color:var(--c-brand) !important;}
html.sepia.dark body.idx-page .tag-tools > .m-fold-bar{color:#c9b78e !important;}

/* iOS Safari 对 font-size<16px 的输入框会在聚焦时自动放大页面 —— 
   两个首页输入框在手机端统一 16px（视觉靠字距与色阶控制，不靠缩字号）。 */
@media (max-width:700px){
  body.idx-page .idx-search input{font-size:16px !important;}
  body.idx-page .idx-fullsearch .fs-box input[type=search]{font-size:16px !important;}
}

/* 手机端折叠区不再用虚线切割：整块面板向下延伸到「更多筛选条件」，
   虚线会把面板劈成两半，让底部那行入口看起来像另一个模块的残留。 */
@media (max-width:700px){
  body.idx-page .tag-tools{border-top-color:transparent !important;margin-bottom:10px !important;}
  html.dark body.idx-page .tag-tools{border-top-color:transparent !important;}
  html.sepia:not(.dark) body.idx-page .tag-tools{border-top-color:transparent !important;}
}

@media (max-width:700px){
  body.idx-page .idx-tools{border-bottom:0 !important;}
}

/* 状态胶囊自带底色，无需再挂分隔点；换行时第二行只剩一枚干净的状态标签 */
body.idx-page .card .meta .st-wrap{white-space:nowrap;margin-left:6px;}
