/* ============================================================
   知识产权法律法规研习站 · 全站统一升级样式 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{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;}
.idx-search{flex:1;min-width:210px;display:flex;align-items:center;gap:8px;}
.idx-search input{flex:1;padding:9px 14px;border:1px solid #c9d4e4;border-radius:9px;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-count{font-size:12.5px;color:#94a3b8;white-space:nowrap;}
.idx-searchlink{font-size:13px;text-decoration:none;color:#2f6df0;border:1px dashed #9db9e8;border-radius:9px;padding:8px 13px;white-space:nowrap;background:#f4f8ff;min-height:38px;display:inline-flex;align-items:center;}
.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 1.6s ease 1;}
.dx-art:target>.dx-hd,.orig-art:target>.orig-hd{animation:upg-flash 1.6s 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;}
  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-sub:#98a3b6;}/* 暗色次要文字 5.5: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;}
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 .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;}
.card[data-cat="law"]{border-left-color:#b3261e;}
.card[data-cat="reg"]{border-left-color:#0b5fa5;}
.card[data-cat="local"]{border-left-color:#0e7c66;}
.card[data-cat="rule"]{border-left-color:#b45309;}
.card[data-cat="judicial"]{border-left-color:#7c3aed;}
html.dark .card[data-cat="law"]{border-left-color:#e0863b;}
html.dark .card[data-cat="reg"]{border-left-color:#5da2ff;}
html.dark .card[data-cat="local"]{border-left-color:#4dd0a8;}
html.dark .card[data-cat="rule"]{border-left-color:#f0b35c;}
html.dark .card[data-cat="judicial"]{border-left-color:#b79aff;}
.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;}
  .grid{grid-template-columns:1fr;gap:11px;}
  .grid .card{padding:13px 14px;}
}


/* ============================================================
   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 横滚不换行，搜索框独立一行 */
  .idx-tools .chips{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;-ms-overflow-style:none;padding-bottom:2px;}
  .idx-tools .chips::-webkit-scrollbar{display:none;}
  .idx-tools .chips .chip{flex:0 0 auto;}
  .idx-search{width:100%;min-width:0;}
  .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 header,html.sepia 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 .dx-art,html.sepia .orig-art,html.sepia .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 .dx-hd,html.sepia .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 .dx-ttl{color:#5c4a2c;}
html.sepia.dark .dx-ttl{color:#cbbb95;}
html.sepia .dx-txt,html.sepia .orig-body{color:#332b1f;}
html.sepia.dark .dx-txt,html.sepia.dark .orig-body{color:#e6d9bd;}
html.sepia .dx-lab{background:#e8dcc0;color:#6b4a12;}
html.sepia.dark .dx-lab{background:#3a3225;color:#e0b466;}
html.sepia p,html.sepia li,html.sepia td,html.sepia 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 .timeline{background:#f6ecd5;border-color:#ddd0b8;color:#4a3c26;}
html.sepia.dark .timeline{background:#221d13;border-color:#3a3225;color:#c8b98d;}
html.sepia .timeline b{color:#7d5320;}
html.sepia.dark .timeline b{color:#e0b466;}
html.sepia table.cmp th{background:#efe4cd;}
html.sepia.dark table.cmp th{background:#2f281c;}
html.sepia table.cmp td{background:#fbf4e4;}
html.sepia.dark table.cmp td{background:#262019;border-color:#3a3225;}
html.sepia .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 .gov-mini{background:#f2e3c2;color:#8a5a2b;border-color:#d8c49a;}
html.sepia.dark .gov-mini{background:#332a18;color:#e0b466;border-color:#4a3d17;}
html.sepia .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 .chapbar a{color:#6d6152;}
html.sepia.dark .chapbar a{color:#b5a684;}
html.sepia .chapbar a.on{color:#7d5320;background:#efe4cd;}
html.sepia.dark .chapbar a.on{color:#1c1811;background:#e0b466;}
html.sepia .quicknav label,html.sepia .legend{color:#6d6152;}
html.sepia.dark .quicknav label,html.sepia.dark .legend{color:#b5a684;}
html.sepia .quicknav select,html.sepia .idx-search input,html.sepia .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 .btn,html.sepia .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 .view-tools button.on,html.sepia .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 .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 .to-top{background:#7d5320;color:#fbf4e4;border-color:#7d5320;}
html.sepia.dark .to-top{background:#e0b466;color:#1c1811;border-color:#e0b466;}
html.sepia .m-bar{background:#f2e9d8;border-top-color:#ddd0b8;}
html.sepia.dark .m-bar{background:#1c1811;border-top-color:#3a3225;}
html.sepia .m-bar a{color:#6d6152;}
html.sepia.dark .m-bar a{color:#b5a684;}
html.sepia #toc-panel{background:#fbf4e4;}
html.sepia.dark #toc-panel{background:#262019;}
html.sepia .toc-hd{background:#efe4cd;border-bottom-color:#ddd0b8;}
html.sepia.dark .toc-hd{background:#2f281c;border-bottom-color:#3a3225;}
html.sepia .toc-hd b,html.sepia .law-nav a{color:#7d5320;}
html.sepia.dark .toc-hd b,html.sepia.dark .law-nav a{color:#e0b466;}
html.sepia .toc-links a{color:#4a3c26;}
html.sepia.dark .toc-links a{color:#cbbb95;}
html.sepia .toc-links a:hover,html.sepia .toc-links a.on{background:#efe4cd;}
html.sepia.dark .toc-links a:hover,html.sepia.dark .toc-links a.on{background:#3a3225;}
html.sepia footer,html.sepia .meta,html.sepia .card p.desc,html.sepia .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 .group-h{background:#efe4cd;color:#7d5320;}
html.sepia.dark .group-h{background:#2f281c;color:#e0b466;}
html.sepia .card .card-h a,html.sepia .idx-searchlink,html.sepia .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 .docno,html.sepia .eff{color:#6d6152;}
html.sepia.dark .docno,html.sepia.dark .eff{color:#b5a684;}
html.sepia h2.sec,html.sepia h3.chap,html.sepia h2.chap{color:#7d5320;}
html.sepia.dark h2.sec,html.sepia.dark h3.chap,html.sepia.dark h2.chap{color:#e0b466;}
html.sepia mark,html.sepia .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 .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 header.top h1,html.sepia header.top .docno,html.sepia header.top .eff,
html.sepia header.top .meta,html.sepia header.top .pill{color:#3a2e1a !important;}
html.sepia 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 .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 .rel-link:hover{background:#f3e8cd;}
html.sepia .rel-badge{background:#f3e8cd;color:#7a5626;border-color:#dcc491;}
html.sepia .rel-pop{background:#fbf5e8;border-color:#dcc491;}
html.sepia .rel-pop-h{color:#6d4a1f;}
html.sepia .rel-pop-i{color:#4a3d22;}
html.sepia .rel-pop-i:hover{background:#f3e8cd;}
html.sepia .rel-pop-i b{color:#6d4a1f;}
html.sepia .rel-from{background:#f3e8cd;border-color:#dcc491;}
html.sepia .rel-from-t{background:#ead9b0;color:#6d4a1f;}
html.sepia .rel-from-n{color:#5c4a2a;}
html.sepia .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 .card-h .docno{color:#8a7a5e;}
