/* 《民法典》理解与适用 · 子站样式（浅色主题，无外部依赖） */
:root{
  --bg:#f5f6f8; --card:#fff; --line:#e6e8ec; --line2:#eef0f3;
  --txt:#1f2329; --txt2:#5c636e; --txt3:#8a9099;
  --red:#0a2e5c; --red2:#07203f; --blue:#1a4a7c; --green:#1f9254;
  --head:#0a2e5c; --gold:#a6853d;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--txt);
  font:15px/1.78 -apple-system,"Segoe UI","Microsoft YaHei",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline}

/* 顶部 */
.hd{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 1px 3px rgba(0,0,0,.04)}
.hd-in{max-width:1440px;margin:0 auto;padding:8px 16px;display:flex;align-items:center;gap:16px}
.brand{display:flex;align-items:center;gap:9px;color:var(--txt)}
.brand:hover{text-decoration:none}
.logo{font-size:22px;line-height:1}
.bt{display:flex;flex-direction:column;line-height:1.25}
.bt b{font-size:14px;font-weight:700}
.bt i{font-size:12px;color:var(--head);font-style:normal;font-weight:600}
.tabs{display:flex;gap:2px;flex:1}
.tab{border:0;background:transparent;padding:7px 13px;border-radius:7px;cursor:pointer;font-size:14px;color:var(--txt2);font-family:inherit;text-decoration:none}
.tab:hover{background:#f2f4f7;color:var(--txt);text-decoration:none}
.tab.on{background:#eef3f9;color:var(--head);font-weight:600}
.hd-r{display:flex;align-items:center;gap:10px}
.q{width:260px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;font-size:13.5px;font-family:inherit;outline:none;background:#fafbfc}
.q:focus{border-color:var(--head);background:#fff;box-shadow:0 0 0 3px rgba(10, 46, 92, .08)}
.back{font-size:13px;color:var(--txt2);white-space:nowrap}

/* 布局 */
.wrap{max-width:1440px;margin:0 auto;display:flex;gap:16px;padding:16px;align-items:flex-start}
.side{width:286px;flex:0 0 286px;position:sticky;top:70px;max-height:calc(100vh - 92px);overflow:auto;
  background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 8px}
.side-t{font-size:12px;color:var(--txt3);padding:4px 10px 8px;letter-spacing:.5px}
.main{flex:1;min-width:0}
.tree{font-size:13.5px}
.tn{padding:6px 10px;border-radius:7px;cursor:pointer;color:var(--txt2);display:flex;justify-content:space-between;gap:6px;align-items:center}
.tn:hover{background:#f4f6f9;color:var(--txt)}
.tn.on{background:#eef3f9;color:var(--head);font-weight:600}
.part>.tn{font-weight:700;color:var(--txt);margin-top:4px}
.tc{color:var(--txt3);font-size:11.5px;flex:0 0 auto}
.tk{padding:5px 10px 5px 20px;border-radius:7px;cursor:pointer;color:var(--txt2);font-size:13px;display:flex;gap:6px;justify-content:space-between}
.tk:hover{background:#f4f6f9;color:var(--txt)}
.tk.on{background:#eef3f9;color:var(--head);font-weight:600}
.hide{display:none}
/* 侧栏条目单行省略：法规名较长时不再换行撑高，完整名称见 title 提示 */
.tk>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tk>.tc{flex:0 0 auto}


/* 卡片 */
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:20px 22px;margin-bottom:16px}
.card h1{margin:0 0 6px;font-size:22px;letter-spacing:.5px}
.card h2{margin:22px 0 10px;font-size:17px;padding-left:10px;border-left:3px solid var(--head)}
.card h3{margin:16px 0 8px;font-size:15px;color:var(--txt)}
.sub{color:var(--txt2);font-size:13.5px;margin:0 0 4px}
.muted{color:var(--txt3);font-size:12.5px}

/* 统计 */
.stats{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 4px}
.stat{flex:1 1 130px;background:#fafbfc;border:1px solid var(--line2);border-left:3px solid var(--head);border-radius:9px;padding:10px 13px}
.stat b{display:block;font-size:21px;line-height:1.2;color:var(--head)}
.stat span{font-size:12.5px;color:var(--txt2)}

/* 册卡片 */
.bgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:12px;margin-top:10px}
.bcard{border:1px solid var(--line);border-radius:11px;padding:13px 15px;cursor:pointer;transition:.15s;background:#fff}
.bcard:hover{border-color:var(--head);box-shadow:0 3px 12px rgba(10, 46, 92, .09);transform:translateY(-1px)}
.bcard h4{margin:0 0 6px;font-size:14.5px;display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.bcard h4 em{font-style:normal;font-size:12px;color:var(--txt3);font-weight:400;white-space:nowrap}
.bcard p{margin:0 0 6px;font-size:12.5px;color:var(--txt2)}
.bcard .bmeta{font-size:12px;color:var(--txt3)}
.bno{display:inline-block;background:#eef3f9;color:var(--head);border-radius:6px;min-width:22px;text-align:center;padding:1px 6px;font-weight:700;margin-right:6px}

/* 阅读 */
.rd-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.rd-title{font-size:21px;margin:0 0 4px}
.rd-nav{display:flex;gap:8px;flex-wrap:wrap}
.btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 13px;font-size:13px;cursor:pointer;color:var(--txt2);font-family:inherit;text-decoration:none;display:inline-block}
.btn:hover{border-color:var(--head);color:var(--head);text-decoration:none}
.btn.p{background:var(--head);color:#fff;border-color:var(--head)}
.btn.p:hover{background:var(--red2);color:#fff}
.btn:disabled{opacity:.45;cursor:not-allowed}

.official{background:#fdf8f4;border:1px solid #f0e2d8;border-left:3px solid var(--head);border-radius:9px;padding:12px 15px;margin:12px 0 4px}
.official .ol{font-size:12px;color:var(--head);font-weight:600;margin-bottom:5px;display:flex;justify-content:space-between;gap:10px}
.official .ot{font-size:14.5px;line-height:1.85;color:#3a2b22;white-space:pre-wrap}

.art-body{margin-top:6px}
.art-body p{margin:0 0 13px;font-size:15px;line-height:1.95;color:#23282f;text-align:justify}
.art-body p.ind{text-indent:2em}
.art-body .sh{margin:20px 0 9px;font-size:15px;font-weight:700;color:var(--head);padding-left:9px;border-left:3px solid var(--head);line-height:1.6}
.art-body p.fn{font-size:12.5px;color:#7b828c;line-height:1.7;margin:0 0 10px}

/* 索引 */
.fbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0 4px}
.fbar .q{width:230px}
.chip{display:inline-block;padding:2px 9px;border-radius:20px;border:1px solid var(--line);background:#fafbfc;font-size:12.5px;color:var(--txt2);cursor:pointer;margin:0 6px 6px 0}
.chip:hover{border-color:var(--head);color:var(--head)}
.chip.on{background:var(--head);color:#fff;border-color:var(--head)}
.chip.r{background:#eef3f9;border-color:#c6d7e8;color:var(--head)}
.chip.g{background:#e8f6ee;border-color:#c6e6d5;color:var(--green)}

.ixlist{margin-top:8px}
.ixitem{border:1px solid var(--line2);border-radius:10px;padding:11px 14px;margin-bottom:9px;background:#fff}
.ixitem .ih{display:flex;justify-content:space-between;gap:10px;align-items:baseline;flex-wrap:wrap;margin-bottom:5px}
.ixitem .ih b{font-size:14.5px;color:var(--head)}
.ixitem .ih .meta{font-size:12px;color:var(--txt3)}
.ixitem .it{font-size:13.8px;line-height:1.85;color:#333;white-space:pre-wrap}
.ixitem .ix-b{padding:2px 8px;border-radius:6px;font-size:11.5px;background:#f2f4f7;color:var(--txt2);margin-left:6px}

.lawblk{border:1px solid var(--line);border-radius:11px;margin-bottom:11px;overflow:hidden}
.lawhd{padding:11px 15px;background:#fafbfc;cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center}
.lawhd:hover{background:#f4f6f9}
.lawhd b{font-size:14.5px}
.lawhd .lm{font-size:12px;color:var(--txt3);font-weight:400}
.lawbd{padding:2px 15px 12px;border-top:1px solid var(--line2)}
.st-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px;vertical-align:middle}
.st-on{background:var(--green)}
.st-off{background:#b0b6bf}

/* 全文页 */
.lawwrap{max-width:1100px;margin:0 auto;padding:16px}
.lawmeta{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}
.lawmeta span{font-size:12.5px;background:#fafbfc;border:1px solid var(--line);border-radius:7px;padding:3px 10px;color:var(--txt2)}
.ft-art{margin:0 0 11px;font-size:15px;line-height:1.9;color:#23282f;text-align:justify}
.ft-art .no{color:var(--head);font-weight:700;margin-right:6px}
.ft-art.hl{background:#fff8e6;border-radius:8px;box-shadow:0 0 0 8px #fff8e6}
.ft-ch{margin:20px 0 10px;font-size:16px;font-weight:700;color:var(--txt);padding-left:10px;border-left:3px solid var(--head)}
.ft-p{font-size:13.5px;color:var(--txt2);line-height:1.8;margin:0 0 10px}
.reftab{width:100%;border-collapse:collapse;font-size:12.5px;margin-top:8px}
.reftab th{background:#f2f5f9;padding:7px 9px;text-align:left;font-weight:600;color:#33415c;border-bottom:1px solid var(--line)}
.reftab td{padding:6px 9px;border-bottom:1px solid var(--line2);color:#444;vertical-align:top}
.reftab tbody tr:nth-child(even){background:#fafbfc}
.reftab td.c{text-align:center;color:var(--txt3);white-space:nowrap}

/* 检索 */
.res{border:1px solid var(--line);border-radius:10px;padding:11px 14px;margin-bottom:9px;cursor:pointer;background:#fff}
.res:hover{border-color:var(--head)}
.res .t{font-size:14px;font-weight:600;margin-bottom:4px}
.res .c{font-size:13px;color:#444;line-height:1.8;margin-bottom:4px}
.res em{background:#fff3a3;font-style:normal;border-radius:2px;padding:0 1px}
.rlist{margin-top:8px}
.ritem{border:1px solid var(--line);border-radius:9px;padding:10px 13px;margin-bottom:8px;display:flex;justify-content:space-between;gap:12px;cursor:pointer;background:#fff}
.ritem:hover{border-color:var(--head)}
.ritem b{font-size:13.8px}
.ritem span{font-size:12.5px;color:var(--txt2);text-align:right;flex:0 0 auto}

.crumb{font-size:12.5px;color:var(--txt3);margin-bottom:6px}
.crumb a{color:var(--txt3)}

/* 学习参考提示条 */
.noticebar{max-width:1440px;margin:12px auto 0;padding:11px 16px;background:#fff9ec;border:1px solid #f3e2bf;
  border-left:4px solid #c98a10;border-radius:10px;font-size:12.8px;line-height:1.85;color:#6b5217}
.noticebar b{color:#a5701a}
.noticebar a{color:#a5701a;text-decoration:underline}
.footnote{background:#fafbfc;border:1px solid var(--line2);border-left:3px solid var(--txt3);border-radius:9px;
  padding:9px 13px;margin-top:14px;font-size:12.5px;line-height:1.8;color:var(--txt3)}
@media (max-width:900px){.noticebar{margin:10px 10px 0}}
.ft{margin-top:20px;padding:18px 16px 30px;text-align:center;color:var(--txt3);font-size:12.5px;line-height:2;border-top:1px solid var(--line);background:#fff}
.empty{padding:40px;text-align:center;color:var(--txt3)}

/* ===== 法条引用标记（点击弹出浮层） ===== */
a.cite{border-bottom:1px dashed #c08f24;color:#8a5b00;cursor:pointer;text-decoration:none;
  background:linear-gradient(transparent 60%,#fdf1cf 60%);border-radius:2px;padding:0 1px;transition:background .12s}
a.cite:hover{background:#fbe6ac;border-bottom-style:solid}
a.cite.cur{background:#ffdc7d;box-shadow:inset 0 0 0 1px #e0a92a}
a.cite.cite-na{border-bottom-color:#c9ccd1;color:#7b8088;background:none}
a.cite.cite-na:hover{background:#f1f2f4}
.cite-hint{font-size:12.2px;color:var(--txt3);margin:2px 0 10px}
.cite-hint b{color:#8a5b00}
.ixacts{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}
.ixacts .btn{font-size:12.5px;padding:5px 12px}
.ixitem .ih b a.cite{font-weight:700}
.cp-body a.cite{color:#8a5b00}
/* 折叠态高频条号芯片：一次点击即在本页展开原文 */
.lawchips{display:flex;flex-wrap:wrap;gap:6px;padding:2px 14px 12px;align-items:center}
.cchip{font-size:12.2px;padding:3px 9px;border:1px solid #e8dbb9;background:#fdfaf1;color:#8a5b00;
  border-radius:20px;cursor:pointer;line-height:1.5;transition:background .12s,border-color .12s}
.cchip:hover{background:#fbe6ac;border-color:#d8bb70}
.cchip i{font-style:normal;color:#ab9569;font-size:10.5px;margin-left:3px}
.cmore{font-size:12px;color:var(--txt3)}

/* ===== 法条浮层 ===== */
.cite-mask{position:fixed;inset:0;background:rgba(22,26,34,.44);opacity:0;visibility:hidden;
  transition:opacity .16s;z-index:900}
.cite-mask.on{opacity:1;visibility:visible}
.cite-pop{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(780px,93vw);
  max-height:84vh;display:none;flex-direction:column;background:#fff;border:1px solid var(--line);
  border-radius:14px;box-shadow:0 20px 60px rgba(16,20,28,.26);z-index:901;overflow:hidden;
  animation:cpIn .18s ease-out}
.cite-pop.on{display:flex}
@keyframes cpIn{from{opacity:0;transform:translate(-50%,-47%) scale(.985)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
.cp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:14px 16px 10px;border-bottom:1px solid var(--line2);background:#fcfcfd}
.cp-t{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.cp-t b{font-size:15.5px;line-height:1.5}
.cp-no{font-size:14px;font-weight:600;color:#8a5b00;background:#fdf1cf;border-radius:6px;padding:1px 8px}
.cp-badge{font-size:12px;border-radius:20px;padding:2px 9px;white-space:nowrap;border:1px solid transparent}
.cp-badge.b-on{background:#eaf7ee;color:#1f7a3d;border-color:#c6e6d1}
.cp-badge.b-off{background:#fdf1e3;color:#a15c10;border-color:#f0dcc0}
.cp-badge.b-rule{background:#eef3fd;color:#2b5aa8;border-color:#cfdcf5}
.cp-badge.b-na{background:#f0f5fa;color:#0a2e5c;border-color:#c6d7e8}
.cp-badge.b-gone{background:#fdf6e3;color:#a6853d;border-color:#ecd9a8}
.cp-note a.cp-succ{color:#8a5b00;border-bottom:1px dashed #c08f24}
a.cite[data-hint="self"]{border-bottom-style:dotted;border-bottom-color:#9aa4b2;color:#5b6472}
a.cite[data-hint="self"]:hover{background:#eef1f5}
.cp-badge.b-wait{background:#f2f3f5;color:#6b7078;border-color:#e3e5e9}
.cp-x{border:0;background:none;font-size:17px;line-height:1;color:var(--txt3);cursor:pointer;padding:3px 6px;border-radius:6px;flex:0 0 auto}
.cp-x:hover{background:#f0f1f3;color:#333}
.cp-meta{display:flex;flex-wrap:wrap;gap:4px 14px;padding:8px 16px;font-size:12.3px;color:var(--txt3);
  border-bottom:1px solid var(--line2);background:#fff}
.cp-meta .cp-src{color:#7a7f88}
.cp-note{margin:10px 16px 0;padding:9px 12px;background:#fff9ec;border:1px solid #f3e2bf;
  border-left:3px solid #c98a10;border-radius:8px;font-size:12.6px;line-height:1.8;color:#6b5217}
.cp-body{padding:14px 18px 18px;overflow:auto;flex:1 1 auto;font-size:14.6px;line-height:2;color:#222}
.cp-body .cp-art{margin:0;text-indent:0}
.cp-body .cp-art .no{font-weight:700;color:#8a5b00;margin-right:4px}
.cp-body .muted{color:var(--txt3)}
.cp-foot{display:flex;flex-wrap:wrap;gap:8px;padding:11px 16px;border-top:1px solid var(--line2);background:#fcfcfd}
.cp-foot .btn{font-size:12.8px;padding:6px 13px}
.cp-foot .cp-go[style*="display: none"]{display:none!important}

@media (max-width:900px){
  .cite-pop{width:96vw;max-height:88vh}
  .cp-body{font-size:14px;padding:12px 14px 16px}
  .cp-foot .btn{flex:1 1 auto;text-align:center}
}

@media (max-width:900px){
  .wrap{flex-direction:column;align-items:stretch;padding:10px}
  .side{width:100%;flex:1 1 auto;position:static;max-height:280px}
  .q{width:150px}
  .hd-in{flex-wrap:wrap;gap:8px}
}

/* ================= 关联司法解释与法规（v2.45.0 新增独立区块） ================= */
.regstat{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 2px}
.regstat .rst{font-size:12.5px;color:var(--txt2);background:#f4f6fa;border:1px solid var(--line);border-radius:7px;padding:3px 10px}
.regstat .rst b{color:var(--head);font-size:13.5px;margin-right:2px}
.regbox{border:1px solid var(--line);border-radius:10px;background:#fff;margin:9px 0;overflow:hidden}
.regbox>summary{cursor:pointer;padding:10px 13px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;list-style:none;font-size:14px}
.regbox>summary::-webkit-details-marker{display:none}
.regbox>summary::before{content:'▸';color:var(--head);font-size:11px;flex:0 0 auto}
.regbox[open]>summary::before{content:'▾'}
.regbox[open]>summary{border-bottom:1px solid var(--line2);background:#fcfdff}
.rb-name{font-weight:600;color:var(--txt);flex:1 1 auto;min-width:0}
.rb-tag{flex:0 0 auto;font-size:11px;padding:1px 7px;border-radius:5px;border:1px solid #cdd7e6;background:#f2f6fc;color:#3a5680}
.rb-tag.rb-ver{background:#fdf6ec;border-color:#f0dfc0;color:#a6853d}
.rb-n{flex:0 0 auto;font-size:12px;color:var(--txt3);font-variant-numeric:tabular-nums}
.rb-idx{flex:0 0 auto;font-size:11.5px;color:#0f3d7a;background:#eef4ff;border:1px solid #cfdff7;border-radius:5px;padding:1px 7px}
.rb-body{padding:11px 14px;background:#fcfdff}
.rb-meta{margin:0 0 5px;font-size:12.8px;color:var(--txt2);line-height:1.85}
.rb-arts{margin-top:8px;border-top:1px dashed var(--line2);padding-top:8px;max-height:340px;overflow:auto}
.rb-art{font-size:13px;line-height:1.9;padding:4px 0;border-bottom:1px dotted var(--line2);display:flex;gap:9px;align-items:baseline}
.rb-art:last-child{border-bottom:0}
.rb-no{flex:0 0 auto;font-weight:600;color:var(--head);font-size:12.5px;min-width:66px}
.rb-tx{flex:1 1 auto;min-width:0;color:var(--txt2)}

/* 条文释义页：关联区块 */
.ar-reg{margin-top:14px}
.ar-reg-h{margin:14px 0 7px;font-size:14px;color:var(--head);font-weight:600}
.ar-reg-ul{margin:0;padding-left:18px}
.ar-reg-ul li{font-size:13.5px;line-height:2.05;margin-bottom:3px}
.ar-reg-ul li b{color:var(--txt);font-weight:600}
.ar-reg-lv{font-size:11.5px;color:var(--txt3);margin-left:6px;background:#f4f6fa;border:1px solid var(--line);border-radius:5px;padding:1px 6px}
a.ar-reg-art,a.ar-reg-art:visited{color:#1a4a7c;border-bottom:1px solid #9dbdea;text-decoration:none}
a.ar-reg-art:hover{background:#eaf2fd}
span.ar-reg-art{color:var(--txt3);border-bottom:1px dotted #c9ced6}
.ar-cases{margin-top:2px}
.ar-case{font-size:13px;line-height:1.95;padding:6px 0;border-bottom:1px dashed var(--line2);display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.ar-case:last-child{border-bottom:0}
.ar-csrc{flex:0 0 auto;font-size:11px;padding:1px 6px;border-radius:5px;border:1px solid #c2e5d2;background:#e8f6ee;color:#166b3e}
.ar-ct{flex:1 1 auto;min-width:0}
.ar-cno{flex:0 0 auto;font-size:11.5px;color:var(--txt3);font-variant-numeric:tabular-nums}
.ar-cy{flex:0 0 auto;font-size:11.5px;color:var(--txt3)}
.ar-ccourt{flex:1 0 100%;font-size:11.5px;color:var(--txt3)}
.ar-reg-tip{margin:10px 0 0;padding-top:8px;border-top:1px dashed var(--line2);font-size:12px;color:var(--txt3);line-height:1.75}

/* v4.4.17：窄屏下网格最小列宽（300/340/310px）超出 320px 视口，改单列铺满。
   实测残量：civil-code +55 / civil-company +55 / understand +23 / understand-company +23 */
@media (max-width:520px){
  .pgrid,.rlist,.bgrid{grid-template-columns:1fr}
}

/* v4.4.17：320px 下 .ritem 内说明文字右缘溢出 1px（w249 + 左右内边距），窄屏收窄内边距并允许断行 */
@media (max-width:380px){
  .ritem{padding-left:10px;padding-right:10px}
  .ritem span,.ritem p{overflow-wrap:anywhere}
}
