/* ========================================
   点亮梦想公益社区 · 公益法规频道
   依赖平台 style.css 的 :root 变量
   --primary:#FF6B35  --secondary:#F7931E  --dark:#1a1a2e
   --text:#333  --text-light:#666  --text-muted:#999
   --bg-gray:#f7f8fa  --border:#e8e8e8  --radius:12px  --radius-lg:20px
   ======================================== */

.law-page { /* 外壳背景与内边距由 .page-shell 提供 */ }

/* ---------- 频道横幅 ----------
   20261202 版式统一：横幅结构已由 /style.css 的
   .page-banner / .page-crumb / .page-icon 统一提供，
   法规频道不再单独定义，避免两套样式打架。
   -------------------------------------------------- */

/* ---------- 搜索区 ---------- */
.law-search { margin-top: -26px; position: relative; z-index: 3; }
.law-search-box {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  padding: 20px 22px; display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap;
}
.law-search-box input {
  flex: 1; min-width: 220px; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; font-size: 14.5px;
  font-family: inherit; color: var(--text); outline: none; transition: .18s;
}
.law-search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.10); }
.law-search-box button {
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  border-radius: var(--radius); padding: 12px 30px; font-size: 14.5px;
  font-weight: 700; font-family: inherit; transition: .18s;
}
.law-search-box button:hover { background: var(--primary-dark); }
.law-search-tip {
  font-size: 12.5px; color: var(--text-muted); margin-top: 10px; line-height: 1.8;
}
.law-search-tip em { color: var(--primary); font-style: normal; }

/* ---------- 通用板块 ---------- */
.law-sec { padding-top: 44px; }
.law-sec-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.law-sec-head h2 {
  font-size: 21px; font-weight: 900; color: var(--text); letter-spacing: .5px;
}
.law-sec-head .law-sec-sub { font-size: 13px; color: var(--text-muted); }
.law-sec-head .law-more {
  margin-left: auto; font-size: 13.5px; color: var(--primary);
  text-decoration: none; font-weight: 600;
}
.law-sec-head .law-more:hover { text-decoration: underline; }

.law-bar {
  width: 4px; height: 18px; border-radius: 2px;
  background: var(--primary); display: inline-block;
}

/* ---------- 统计条 ---------- */
.law-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 16px;
}
.law-stat {
  background: #fff; border-radius: var(--radius); padding: 14px 16px;
  text-align: center; border: 1px solid var(--border);
  display: flex; align-items: baseline; justify-content: center; gap: 7px;
}
.law-stat b {
  font-size: 24px; font-weight: 900;
  color: var(--primary); line-height: 1.15;
}
.law-stat span { font-size: 12.5px; color: var(--text-light); }

/* ---------- 分层入口卡 ---------- */
.law-layers {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.law-layer {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 18px; text-decoration: none; color: inherit;
  transition: .2s; display: flex; flex-direction: column;
}
.law-layer:hover {
  border-color: var(--primary); box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.law-layer-id {
  font-size: 12px; font-weight: 900; color: var(--primary);
  letter-spacing: 1px; margin-bottom: 8px;
}
.law-layer-t { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.law-layer-d { font-size: 12.5px; color: var(--text-light); line-height: 1.75; flex: 1; }
.law-layer-n {
  font-size: 12px; color: var(--text-muted); margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--border);
}

/* ---------- 场景问答卡 ---------- */
.law-qa-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.law-qa {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; text-decoration: none; color: inherit;
  transition: .2s; display: block;
}
.law-qa:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); }
.law-qa-q {
  font-size: 15.5px; font-weight: 700; color: var(--text);
  line-height: 1.6; margin-bottom: 10px;
}
.law-qa:hover .law-qa-q { color: var(--primary); }
.law-qa-a {
  font-size: 13.5px; color: var(--text-light); line-height: 1.85;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.law-qa-tags { margin-top: 12px; display: flex; gap: 7px; flex-wrap: wrap; }
.law-chip {
  display: inline-block; font-size: 11.5px; color: var(--primary);
  background: #fff5f0; border: 1px solid #ffe2d3;
  border-radius: 20px; padding: 2px 10px; line-height: 1.7;
}
.law-chip-gray { color: var(--text-light); background: var(--bg-gray); border-color: var(--border); }

/* ---------- 法规列表 ---------- */
.law-list { display: flex; flex-direction: column; gap: 12px; }
.law-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; text-decoration: none; color: inherit;
  transition: .2s; display: flex; gap: 18px; align-items: flex-start;
}
.law-item:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); }
.law-item-lv {
  flex-shrink: 0; font-size: 11.5px; font-weight: 700; text-align: center;
  border-radius: 6px; padding: 5px 0; width: 62px; line-height: 1.5;
  color: #fff; background: var(--text-muted);
}
.lv-法律 { background: #c62828; }
.lv-行政法规 { background: var(--primary); }
.lv-部门规章 { background: var(--secondary); }
.lv-规范性文件 { background: var(--text-muted); }
.law-item-main { flex: 1; min-width: 0; }
.law-item-t {
  font-size: 15.5px; font-weight: 700; color: var(--text);
  line-height: 1.55; margin-bottom: 6px;
}
.law-item:hover .law-item-t { color: var(--primary); }
.law-item-meta {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.85;
}
.law-item-meta em { font-style: normal; color: var(--text-light); }
.law-item-s {
  font-size: 13px; color: var(--text-light); line-height: 1.8;
  margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 详情页 ---------- */
.law-panel {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px 36px; border: 1px solid var(--border);
}
.law-panel h1 {
  font-size: 24px; font-weight: 900; color: var(--text);
  line-height: 1.5; margin-bottom: 16px;
}
.law-panel h3 {
  font-size: 17px; font-weight: 800; color: var(--text);
  margin: 30px 0 14px; padding-left: 12px;
  border-left: 4px solid var(--primary); line-height: 1.5;
}
.law-panel h3:first-of-type { margin-top: 8px; }

.law-concl {
  background: #fff8f4; border: 1px solid #ffe2d3; border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 8px;
}
.law-concl b { color: var(--primary); font-size: 12.5px; letter-spacing: 1.5px; display: block; margin-bottom: 9px; }
.law-concl p { font-size: 16.5px; color: var(--text); line-height: 1.95; font-weight: 700; }

.law-basis { display: flex; flex-direction: column; gap: 16px; }
.law-basis-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.law-basis-head {
  background: var(--bg-gray); padding: 11px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.law-basis-head .law-basis-law { font-size: 13.5px; font-weight: 700; color: var(--text); }
.law-basis-head .law-basis-no {
  font-size: 12px; color: #fff; background: var(--primary);
  border-radius: 20px; padding: 2px 11px; font-weight: 600;
}
.law-basis-head a {
  margin-left: auto; font-size: 12.5px; color: var(--primary);
  text-decoration: none; font-weight: 600;
}
.law-basis-head a:hover { text-decoration: underline; }
.law-basis-body { padding: 16px 18px; }
.law-quote {
  font-size: 14.5px; color: #3a3a3a; line-height: 2.05;
  background: #fafafa; border-left: 3px solid var(--secondary);
  border-radius: 0 8px 8px 0; padding: 14px 18px;
}
.law-basis-note { font-size: 13px; color: var(--text-light); line-height: 1.85; margin-top: 12px; }
.law-basis-note b { color: var(--text); font-weight: 600; }

.law-steps { counter-reset: ls; list-style: none; }
.law-steps li {
  counter-increment: ls; position: relative;
  padding-left: 36px; margin-bottom: 14px;
  font-size: 14.5px; color: var(--text-light); line-height: 1.9;
}
.law-steps li::before {
  content: counter(ls); position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.law-pitfalls { list-style: none; }
.law-pitfalls li {
  position: relative; padding-left: 28px; margin-bottom: 12px;
  font-size: 14.5px; color: var(--text-light); line-height: 1.9;
}
.law-pitfalls li::before {
  content: "×"; position: absolute; left: 4px; top: 0;
  color: #c62828; font-weight: 900; font-size: 16px;
}

/* ---------- 详情元数据表 ---------- */
.law-meta {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.law-meta th, .law-meta td {
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: top; line-height: 1.8;
}
.law-meta tr:last-child th, .law-meta tr:last-child td { border-bottom: none; }
.law-meta th {
  background: var(--bg-gray); color: var(--text-light);
  font-weight: 600; width: 120px; white-space: nowrap;
}
.law-meta td { color: var(--text); }

/* ---------- 修订沿革 ---------- */
.law-rev-list { list-style: none; }
.law-rev-list li {
  position: relative; padding: 0 0 16px 22px;
  border-left: 2px solid var(--border); margin-left: 6px;
  font-size: 14px; color: var(--text-light); line-height: 1.9;
}
.law-rev-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.law-rev-list li::before {
  content: ""; position: absolute; left: -6px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); border: 2px solid #fff;
}

/* ---------- 条文浏览 ---------- */
.law-art-toolbar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.law-art-toolbar input {
  flex: 1; min-width: 180px; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 9px 14px; font-size: 13.5px;
  font-family: inherit; outline: none;
}
.law-art-toolbar input:focus { border-color: var(--primary); }
.law-art-toolbar span { font-size: 12.5px; color: var(--text-muted); }

.law-arts { font-size: 14.5px; line-height: 2.05; color: #3a3a3a; }
.law-art { padding: 14px 0; border-bottom: 1px dashed var(--border); }
.law-art:last-child { border-bottom: none; }
.law-art-no {
  font-weight: 800; color: var(--primary); margin-right: 6px;
}
.law-art.hl { background: #fff8f4; border-radius: 8px; padding: 14px; margin: 0 -14px; border-bottom-color: transparent; }
.law-art-hint {
  font-size: 12.5px; color: var(--text-muted); background: var(--bg-gray);
  border-radius: 8px; padding: 12px 16px; line-height: 1.85; margin-bottom: 18px;
}

/* ---------- 官方源提示 ---------- */
.law-src-note {
  background: #f0f7ff; border: 1px solid #d6e8ff; border-radius: var(--radius);
  padding: 16px 20px; font-size: 13px; color: #2b4d70; line-height: 1.85;
  margin-top: 20px;
}
.law-src-note a { color: #185fa5; font-weight: 600; }
.law-src-title {
  font-size: 14px; font-weight: 800; color: #14496f;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed #c9e0f7;
}
.law-src-row {
  display: flex; gap: 10px; padding: 3px 0; align-items: flex-start;
}
.law-src-row > span {
  flex: 0 0 72px; color: #6b8aa8; font-size: 12.5px; line-height: 1.85;
}
.law-src-row > b {
  flex: 1; font-weight: 500; color: #2b4d70; word-break: break-all;
}
.law-copyright {
  margin-top: 12px; padding: 11px 13px; background: #fff;
  border-radius: 6px; border-left: 3px solid #8fbde4;
  font-size: 12.5px; line-height: 1.9; color: #4a6b88;
}
.law-copyright-sub {
  margin-top: 9px; font-size: 12px; color: #7e97ac; line-height: 1.8;
}

/* ---------- 免责声明 ---------- */
.law-disclaimer {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--text-muted);
  border-radius: var(--radius); padding: 20px 24px; margin-top: 36px;
}
.law-disclaimer h4 { font-size: 14px; color: var(--text); font-weight: 700; margin-bottom: 10px; }
.law-disclaimer p { font-size: 12.5px; color: var(--text-muted); line-height: 1.95; }

/* ---------- 侧栏 ---------- */
.law-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.law-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; }
.law-side-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.law-side-card h4 {
  font-size: 14px; font-weight: 800; color: var(--text);
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.law-side-card ul { list-style: none; }
.law-side-card li { margin-bottom: 10px; }
.law-side-card li:last-child { margin-bottom: 0; }
.law-side-card a {
  font-size: 13.5px; color: var(--text-light); text-decoration: none;
  line-height: 1.75; display: block; transition: .15s;
}
.law-side-card a:hover { color: var(--primary); }

/* ---------- 层级筛选 ---------- */
.law-filter { display: flex; gap: 10px; flex-wrap: wrap; }
.law-tab {
  border: 1px solid var(--border); background: #fff; color: var(--text-light);
  border-radius: 20px; padding: 7px 18px; font-size: 13.5px;
  font-family: inherit; cursor: pointer; transition: .18s;
}
.law-tab:hover { border-color: var(--primary); color: var(--primary); }
.law-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ---------- 章节导航 ---------- */
.law-toc {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fcfcfc; padding: 16px 20px; margin-bottom: 16px;
}
.law-toc-head {
  font-size: 13.5px; font-weight: 800; color: var(--text);
  margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.law-toc-head span { font-weight: 400; font-size: 12px; color: var(--text-muted); margin-left: 8px; }
.law-toc-list {
  list-style: none; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 12px;
}
.law-toc-list li { min-width: 0; }
.law-toc-list a {
  font-size: 13px; color: var(--text-light); text-decoration: none;
  padding: 6px 10px; border-radius: 6px; transition: .15s; line-height: 1.55;
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid transparent;
}
.law-toc-list a:hover { background: #fff2ea; color: var(--primary); border-color: #ffe2d3; }

/* 锚点跳转时避开吸顶导航 */
.law-art, .law-art-chap, .law-art-sec { scroll-margin-top: 96px; }

/* ---------- 条文区章节 ---------- */
.law-art-chap {
  font-size: 15.5px; font-weight: 800; color: var(--text);
  margin: 26px 0 12px; padding: 9px 14px;
  background: var(--bg-gray); border-radius: 8px; line-height: 1.6;
}
.law-art-chap:first-child { margin-top: 0; }
.law-art-sec {
  font-size: 14.5px; font-weight: 700; color: var(--primary);
  margin: 18px 0 10px; padding-left: 10px;
  border-left: 3px solid var(--primary); line-height: 1.6;
}

/* 首页频道导读：6 张卡排 3 列 2 行 */
.law-layers-home { grid-template-columns: repeat(3, 1fr); }

/* ---------- L4 办事指南 ---------- */
.law-guide-note {
  background: #fff8f4; border: 1px solid #ffe2d3; border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 15px 20px; margin-bottom: 20px;
  font-size: 13.5px; color: #8a4a2a; line-height: 1.95;
}
.law-guide-note b { color: var(--primary-dark); font-weight: 800; }

.law-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.law-guide-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; display: block; text-decoration: none;
  transition: .18s; position: relative;
}
.law-guide-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.law-guide-no {
  position: absolute; right: 20px; top: 18px;
  font-size: 12px; font-weight: 800; color: var(--primary);
  background: #fff2ea; border-radius: 20px; padding: 2px 10px; letter-spacing: .5px;
}
.law-guide-t {
  font-size: 16px; font-weight: 800; color: var(--text);
  line-height: 1.55; margin-bottom: 10px; padding-right: 56px;
}
.law-guide-card:hover .law-guide-t { color: var(--primary); }
.law-guide-who {
  font-size: 12.5px; color: var(--text-light); line-height: 1.85;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.law-guide-who b { color: var(--text); font-weight: 600; margin-right: 6px; }
.law-guide-tags { margin-top: 12px; display: flex; gap: 7px; flex-wrap: wrap; }
.law-guide-more {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--primary); font-weight: 600;
}

.law-chip-strong { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

.law-hardlines { list-style: none; }
.law-hardlines li {
  position: relative; padding: 9px 14px 9px 38px; margin-bottom: 9px;
  font-size: 14px; color: #8a2d2d; line-height: 1.85;
  background: #fdf3f3; border-radius: 8px; border-left: 3px solid #c62828;
}
.law-hardlines li::before {
  content: "!"; position: absolute; left: 14px; top: 10px;
  width: 17px; height: 17px; border-radius: 50%;
  background: #c62828; color: #fff; font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

.law-mat th { width: auto; }
.law-mat .law-mat-n { width: 44px; text-align: center; color: var(--text-muted); font-size: 12.5px; }
.law-mat td b { font-weight: 700; color: var(--text); font-size: 14px; }
.law-mat-note { font-size: 12.5px; color: var(--text-light); font-weight: 400; line-height: 1.75; display: inline-block; margin-top: 4px; }

.law-fields { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 6px; }
.law-field {
  font-size: 13px; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 14px; line-height: 1.4; counter-increment: none;
}

.law-timeline { list-style: none; }
.law-timeline li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 0 0 18px 0; position: relative;
}
.law-timeline li::before {
  content: ""; position: absolute; left: 13px; top: 26px; bottom: 0;
  width: 2px; background: var(--border);
}
.law-timeline li:last-child::before { display: none; }
.law-timeline li:last-child { padding-bottom: 0; }
.law-tl-idx {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary); color: var(--primary);
  font-size: 12.5px; font-weight: 800; line-height: 24px; text-align: center;
  position: relative; z-index: 1;
}
.law-tl-main { flex: 1; min-width: 0; padding-top: 3px; }
.law-tl-main b { font-size: 14.5px; color: var(--text); font-weight: 700; display: block; line-height: 1.6; }
.law-tl-note { display: block; font-size: 12.5px; color: var(--text-light); line-height: 1.8; margin-top: 3px; }
.law-tl-time {
  flex: 0 0 190px; text-align: right; font-size: 13px; font-weight: 700;
  color: var(--primary); line-height: 1.7; padding-top: 4px;
}

.law-online { list-style: none; }
.law-online li {
  padding: 11px 16px; margin-bottom: 9px; background: #f0f7ff;
  border: 1px solid #d6e8ff; border-radius: 8px;
}
.law-online a { font-size: 13.5px; font-weight: 700; color: #185fa5; text-decoration: none; }
.law-online a:hover { text-decoration: underline; }
.law-online span { display: block; font-size: 12.5px; color: #5b7b99; line-height: 1.75; margin-top: 4px; }

.law-guide-linklist { list-style: none; }
.law-guide-linklist li { margin-bottom: 8px; padding-left: 16px; position: relative; }
.law-guide-linklist li:last-child { margin-bottom: 0; }
.law-guide-linklist li::before {
  content: "→"; position: absolute; left: 0; top: 0;
  color: #185fa5; font-weight: 700; font-size: 12.5px;
}
.law-guide-linklist a { font-size: 13.5px; color: #185fa5; font-weight: 600; text-decoration: none; line-height: 1.75; }
.law-guide-linklist a:hover { text-decoration: underline; }

/* ---------- 空态 ---------- */
.law-empty {
  background: #fff; border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 48px 20px; text-align: center;
  font-size: 13.5px; color: var(--text-muted);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .law-layout { grid-template-columns: 1fr; }
  .law-side { position: static; }
  .law-layers, .law-layers-home { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .law-qa-list { grid-template-columns: 1fr; }
  .law-guide-grid { grid-template-columns: 1fr; }
  .law-timeline li { flex-wrap: wrap; gap: 8px; }
  .law-tl-time { flex: 0 0 100%; text-align: left; padding-left: 42px; font-size: 12.5px; }
  .law-tl-note { padding-left: 0; }
  .law-tl-idx { margin-bottom: 0; }
  .law-layers, .law-layers-home { grid-template-columns: repeat(2, 1fr); }
  .law-stats { grid-template-columns: repeat(2, 1fr); }
  .law-panel { padding: 22px 18px; }
  .law-panel h1 { font-size: 20px; }
  .law-item { flex-direction: row; gap: 12px; padding: 15px 16px; }
  .law-item-lv { width: 54px; font-size: 11px; }
}
@media (max-width: 560px) {
  .law-layers { grid-template-columns: 1fr; }
  .law-search-box { padding: 16px; }
  .law-search-box button { width: 100%; }
}
