﻿/* ============================================================
   佛山政策通 · 视觉体系「窗 · 桥」
   Design Token + 组件库（纯静态、零外部依赖）
   主色：琉璃青 #1F5C70 / 纸白 #FBF8F1 / 朱砂 #B23A2E
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* 适老化字号缩放系数：由 accessibility.css 按用户选择覆盖 */
  --a11y-text: 1;

  /* 品牌色 */
  --primary: #1f5c70;
  --primary-hover: #16444f;
  --primary-soft: #e8f1f2;
  --primary-lighter: #f3f8f8;
  --seal: #b23a2e;
  --seal-deep: #8e2a21;
  --seal-soft: #f6e7e4;
  --brass: #a9854b;
  --brass-soft: #f1e9da;

  /* 语义色 */
  --accent-teal: #3f6f5a;
  --success: #2e7d57;
  --success-soft: #e6efe9;
  --warning: #a9762a;
  --warning-soft: #f7eddb;
  --danger: #b3261e;
  --danger-soft: #f8e6e3;

  /* 间距刻度：全站统一使用 */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-section: 56px;
  --space-section-tight: 36px;

  /* 基底 */
  --bg: #fbf8f1;
  --surface: #fffdf8;
  --surface-2: #f7f2e7;
  --border: #ddd6c6;
  --border-strong: #c9c0ac;
  --text: #1b2f33;
  --text-sub: #566662;
  --text-muted: #6f736d;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  /* 形状与阴影 */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-window: 14px;
  --shadow-sm: 0 1px 2px rgba(27, 47, 51, .05);
  --shadow: 0 12px 30px -18px rgba(27, 47, 51, .28);
  --shadow-lg: 0 24px 48px -24px rgba(27, 47, 51, .38);

  --header-h: 68px;
  --container: 1180px;
  --ease: cubic-bezier(.33, .66, .4, 1);

  /* 五区地域色：仅用于地域标识，不与效力状态混用 */
  --dc-city: #5c6b68; --dc-city-soft: #eef0ed;
  --dc-cc: #a8553d;   --dc-cc-soft: #f7ede8;
  --dc-nh: #b23a2e;   --dc-nh-soft: #f6e7e4;
  --dc-sd: #2e7d74;   --dc-sd-soft: #e5f0ee;
  --dc-ss: #3b7ea8;   --dc-ss-soft: #e9f1f7;
  --dc-gm: #6b8e4e;   --dc-gm-soft: #eef3e8;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: calc(16px * var(--a11y-text));
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; transition: color .18s var(--ease), border-color .18s var(--ease); }
a:hover { color: var(--primary-hover); }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: calc(15px * var(--a11y-text)); color: var(--text); }
ul, ol { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: .02em;
  text-wrap: balance;
}

/* 滚动条与选中态 */
::-webkit-scrollbar { width: 13px; height: 13px; }
::-webkit-scrollbar-track { background: #f3eee3; }
::-webkit-scrollbar-thumb { background: #cfc5b0; border-radius: 8px; border: 3px solid #f3eee3; }
::-webkit-scrollbar-thumb:hover { background: #b3a88f; }
::selection { background: var(--seal-soft); color: var(--seal-deep); }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }
.section { padding: var(--space-section) 0; }
.section-tight { padding: var(--space-section-tight) 0; }
/* 相邻区块只保留一次纵向间距，避免上下内边距叠加 */
.section + .section,
.section + .section-tight,
.section-tight + .section,
.section-tight + .section-tight { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: var(--space-lg); }
.section-title { font-size: calc(26px * var(--a11y-text)); display: flex; align-items: center; gap: 11px; font-weight: 600; }
.section-title::before {
  content: ""; width: 9px; height: 9px; flex-shrink: 0;
  background: var(--seal); border-radius: 1px;
  box-shadow: 0 0 0 3px var(--seal-soft);
}
.section-sub { font-size: calc(14px * var(--a11y-text)); color: var(--text-sub); margin-top: 7px; padding-left: 20px; }
.section-more { font-size: calc(13.5px * var(--a11y-text)); color: var(--text-sub); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.section-more:hover { color: var(--seal); gap: 7px; }
.section-more svg { width: 15px; height: 15px; flex-shrink: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(251, 248, 241, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 26px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: inherit; }
.brand:hover { color: inherit; }
.brand-logo { width: 40px; height: 40px; flex-shrink: 0; }
.brand-logo svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name {
  font-family: var(--font-serif);
  font-size: calc(19px * var(--a11y-text)); font-weight: 600; color: var(--text);
  letter-spacing: .1em;
}
.brand-tag { font-size: calc(10px * var(--a11y-text)); color: var(--brass); letter-spacing: .18em; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.main-nav a {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  font-size: calc(14.5px * var(--a11y-text)); color: var(--text-sub); white-space: nowrap;
  transition: color .18s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; background: var(--seal); transform: scaleX(0);
  transform-origin: left; transition: transform .2s var(--ease);
}
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--text); font-weight: 600; }
.main-nav a.active::after { transform: scaleX(1); }
.main-nav a svg { width: 16px; height: 16px; }
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }
.header-link { font-size: calc(13px * var(--a11y-text)); color: var(--text-sub); display: inline-flex; align-items: center; gap: 5px; }
.header-link:hover { color: var(--seal); }
.header-link svg { width: 15px; height: 15px; color: var(--brass); }
.header-icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--text-sub);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.header-icon-link:hover { border-color: var(--primary); color: var(--primary); }
.header-icon-link svg { width: 17px; height: 17px; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: var(--radius);
  align-items: center; justify-content: center; color: var(--text);
  border: 1px solid var(--border);
}
.nav-toggle:hover { border-color: var(--primary); color: var(--primary); }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: calc(14.5px * var(--a11y-text)); font-weight: 600; line-height: 1.2;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap; border: 1px solid transparent;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-primary:active { transform: translateY(1px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--primary-lighter); border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: var(--surface-2); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: calc(13px * var(--a11y-text)); border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 30px; font-size: calc(16px * var(--a11y-text)); border-radius: var(--radius-lg); }
.btn:disabled, .btn.is-disabled { background: #e7e2d6; color: var(--text-muted); box-shadow: none; cursor: not-allowed; transform: none; }
.btn:focus-visible, a:focus-visible, .chip:focus-visible, .input:focus-visible, button:focus-visible {
  outline: 2px solid var(--seal); outline-offset: 2px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}
.card-hover { cursor: pointer; display: block; color: inherit; height: 100%; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #bfb49c; color: inherit; }
.card-title { font-size: calc(17px * var(--a11y-text)); margin-bottom: 9px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.card-title svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--brass); }
.card-desc { font-size: calc(14px * var(--a11y-text)); color: var(--text-sub); line-height: 1.75; }
.card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--primary);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; margin-bottom: 15px;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.card-icon svg { width: 22px; height: 22px; }
.card-hover:hover .card-icon { background: var(--primary); color: #fff; border-color: var(--primary); }
.card-icon.teal { background: var(--success-soft); color: var(--accent-teal); border-color: #cfded4; }
.card-hover:hover .card-icon.teal { background: var(--accent-teal); color: #fff; border-color: var(--accent-teal); }

/* ---------- Content card（解读 / 问答） ---------- */
.content-card {
  position: relative; display: flex; flex-direction: column;
  min-height: 172px; padding: 22px 24px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.content-card:hover { transform: translateY(-2px); border-color: #bfb49c; box-shadow: var(--shadow); color: inherit; }
.content-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.content-card-date { font-size: calc(12px * var(--a11y-text)); color: var(--text-muted); font-family: var(--font-mono); }
.content-card-title {
  font-size: calc(16.5px * var(--a11y-text)); font-weight: 600; line-height: 1.6; color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: pretty;
}
.content-card-desc {
  font-size: calc(14px * var(--a11y-text)); line-height: 1.75; color: var(--text-sub);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.content-card-go {
  margin-top: auto; padding-top: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: calc(13px * var(--a11y-text)); font-weight: 600; color: var(--seal);
}
.content-card-go svg { width: 15px; height: 15px; flex-shrink: 0; transition: transform .2s var(--ease); }
.content-card:hover .content-card-go svg { transform: translateX(4px); }

/* ---------- Tags / 印章状态 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 3px;
  font-size: calc(12px * var(--a11y-text)); font-weight: 600; line-height: 1.6;
  background: var(--surface-2); color: var(--text-sub);
  border: 1px solid transparent; white-space: nowrap;
}
.tag svg { width: 12px; height: 12px; }
.tag-blue { background: var(--primary-soft); color: var(--primary-hover); border-color: #cfdee1; }
.tag-teal { background: var(--success-soft); color: #2c5544; border-color: #cfded4; }
.tag-green { background: var(--success-soft); color: #2c5544; border-color: #cfded4; }
.tag-amber { background: var(--warning-soft); color: #7c5518; border-color: #e8d6b5; }
.tag-red { background: var(--seal-soft); color: var(--seal-deep); border-color: #eccfc9; }
.tag-gray { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.tag-status::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.table .nowrap { white-space: nowrap; }

/* ---------- 五区地域标识 ---------- */
.district-city { --dc: var(--dc-city); --dc-soft: var(--dc-city-soft); }
.district-cc   { --dc: var(--dc-cc);   --dc-soft: var(--dc-cc-soft); }
.district-nh   { --dc: var(--dc-nh);   --dc-soft: var(--dc-nh-soft); }
.district-sd   { --dc: var(--dc-sd);   --dc-soft: var(--dc-sd-soft); }
.district-ss   { --dc: var(--dc-ss);   --dc-soft: var(--dc-ss-soft); }
.district-gm   { --dc: var(--dc-gm);   --dc-soft: var(--dc-gm-soft); }
.tag-district { background: var(--dc-soft, var(--surface-2)); color: var(--dc, var(--text-sub)); font-weight: 700; border-color: transparent; }
.district-bar { display: block; width: 3px; border-radius: 2px; background: var(--dc, var(--primary)); }
.region-card { position: relative; overflow: hidden; }
.region-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dc, var(--primary)); }
.region-card .card-icon { background: var(--dc-soft, var(--surface-2)); color: var(--dc, var(--primary)); border-color: transparent; }
.tab.district-city.active, .tab.district-cc.active, .tab.district-nh.active,
.tab.district-sd.active, .tab.district-ss.active, .tab.district-gm.active {
  background: var(--surface); border-color: var(--border); border-top: 2px solid var(--dc); color: var(--dc);
}

/* ---------- 聚合页：统计 / 镇街导航 / 专题 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.stat-num { font-family: var(--font-serif); font-size: calc(30px * var(--a11y-text)); font-weight: 600; line-height: 1.2; color: var(--primary); }
.stat-label { font-size: calc(13px * var(--a11y-text)); color: var(--text-sub); margin-top: 4px; }
.town-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.town-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: calc(14px * var(--a11y-text));
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
.town-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lighter); }
.town-link svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.topic-card { display: flex; flex-direction: column; height: 100%; }
.topic-card .card-title { font-size: calc(16px * var(--a11y-text)); margin-bottom: 6px; }
.topic-card-foot { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.topic-card-count { font-size: calc(12.5px * var(--a11y-text)); color: var(--text-muted); }
.topic-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: calc(13px * var(--a11y-text)); color: var(--text-sub);
}
.topic-nav a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 政策日历 ---------- */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.calendar-card { padding: 18px 18px 12px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: calc(12.5px * var(--a11y-text)); color: var(--text-sub); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.cal-bg-apply-start { background: #2e7d74; }
.cal-bg-apply-end { background: var(--seal); }
.cal-bg-publish { background: var(--primary); }
.cal-bg-expire { background: var(--warning); }
.calendar-scroll { overflow-x: auto; padding-bottom: 4px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(86px, 1fr)); gap: 6px; min-width: 640px; }
.calendar-weekdays { margin-bottom: 6px; }
.calendar-weekdays span { padding: 4px 0; text-align: center; font-size: calc(12px * var(--a11y-text)); color: var(--text-muted); letter-spacing: .08em; }
.calendar-cell {
  display: flex; flex-direction: column; gap: 4px;
  min-height: 92px; padding: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.calendar-cell.is-outside { background: var(--surface-2); opacity: .55; }
.calendar-cell.is-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.calendar-date { font-size: calc(12px * var(--a11y-text)); font-weight: 600; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.calendar-cell.is-today .calendar-date { color: var(--primary); }
.calendar-events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calendar-event {
  display: block; padding: 1px 5px; border-radius: 3px;
  font-size: calc(11.5px * var(--a11y-text)); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calendar-event.cal-apply-start { background: var(--success-soft); color: #2c5544; }
.calendar-event.cal-apply-end { background: var(--seal-soft); color: var(--seal-deep); }
.calendar-event.cal-publish { background: var(--primary-soft); color: var(--primary-hover); }
.calendar-event.cal-expire { background: var(--warning-soft); color: #7c5518; }
.calendar-more { font-size: calc(11px * var(--a11y-text)); color: var(--text-muted); }
.calendar-side {
  padding: 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.calendar-side > h3 { display: flex; align-items: center; gap: 8px; font-size: calc(15px * var(--a11y-text)); margin-bottom: 12px; }
.calendar-day { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.calendar-day:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.calendar-day h4 { margin-bottom: 8px; font-size: calc(13px * var(--a11y-text)); color: var(--text-sub); }
.calendar-node { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.calendar-node:last-child { border-bottom: 0; }
.calendar-node:hover { color: var(--text); }
.calendar-node:hover .calendar-node-title { color: var(--primary); }
.calendar-node-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: calc(13px * var(--a11y-text)); font-weight: 600; line-height: 1.55;
}
.deadline-badge {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 3px;
  font-size: calc(11.5px * var(--a11y-text)); font-weight: 600; background: var(--primary-soft); color: var(--primary-hover);
}
.deadline-badge.is-urgent { background: var(--seal-soft); color: var(--seal-deep); }
.deadline-badge.is-past { background: var(--surface-2); color: var(--text-muted); }
@media (max-width: 1080px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-card { min-width: 0; }
}
@media (max-width: 560px) {
  .calendar-weekdays, .calendar-grid { min-width: 560px; }
  .calendar-cell { min-height: 76px; }
  .calendar-event { pointer-events: none; }
  .calendar-scroll { -webkit-overflow-scrolling: touch; }
  .input, select.input { font-size: calc(16px * var(--a11y-text)); }
  .pagination { gap: 4px; }
  .page-btn { min-width: 32px; padding: 0 7px; }
}
@media (max-width: 920px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .town-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .town-grid { grid-template-columns: 1fr; }
}
.list-item { position: relative; }
.list-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dc, transparent); }
.detail-header { position: relative; overflow: hidden; }
.detail-header::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--dc, var(--seal)); }

/* ---------- Hero（首页） ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 0 var(--space-xl);
  background:
    radial-gradient(760px 300px at 88% 0%, rgba(31, 92, 112, .07), transparent 68%),
    radial-gradient(560px 240px at 6% 96%, rgba(178, 58, 46, .05), transparent 70%),
    linear-gradient(180deg, #f8f3e8 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(31, 92, 112, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 92, 112, .09) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(115deg, #000 0%, rgba(0, 0, 0, .3) 46%, transparent 68%);
  mask-image: linear-gradient(115deg, #000 0%, rgba(0, 0, 0, .3) 46%, transparent 68%);
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-kicker { font-size: calc(11.5px * var(--a11y-text)); letter-spacing: .22em; color: var(--brass); font-weight: 600; margin-bottom: 16px; }
.hero-title { font-size: calc(46px * var(--a11y-text)); font-weight: 600; letter-spacing: .05em; line-height: 1.45; margin-bottom: 16px; }
.hero-title .hl { color: var(--seal); }
.hero-sub { font-size: calc(16.5px * var(--a11y-text)); color: var(--text-sub); margin-bottom: 28px; max-width: 620px; line-height: 1.8; }
.hero .search-box { max-width: 620px; }
.hero-count-note { margin-top: 28px; font-size: calc(12.5px * var(--a11y-text)); color: var(--text-muted); letter-spacing: .04em; }
.hero-panel {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 4px; padding: 7px;
  background: var(--surface); border: 3px solid var(--text);
  border-radius: var(--radius-window);
  box-shadow: 12px 12px 0 -2px rgba(178, 58, 46, .14);
}
.window-pane {
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; min-height: 132px; padding: 16px 16px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: inherit;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.window-pane:nth-child(2) { background: var(--primary-soft); }
.window-pane:nth-child(3) { background: var(--seal-soft); }
.window-pane:nth-child(4) { background: var(--success-soft); }
.window-pane:hover { border-color: var(--primary); background: var(--surface); color: inherit; }
.window-label { font-size: calc(12.5px * var(--a11y-text)); font-weight: 600; color: var(--text-sub); letter-spacing: .06em; }
.window-num { font-family: var(--font-serif); font-size: calc(34px * var(--a11y-text)); font-weight: 600; line-height: 1.1; color: var(--text); }
.window-note { font-size: calc(10.5px * var(--a11y-text)); color: var(--text-muted); letter-spacing: .04em; }

/* ---------- Forms / Search ---------- */
.input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input::placeholder { color: var(--text-muted); }
.input:hover { border-color: var(--primary); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 92, 112, .14); }
.search-box {
  display: flex; background: var(--surface);
  border-radius: var(--radius); border: 1px solid var(--text);
  overflow: hidden; transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.search-box:focus-within { box-shadow: 0 0 0 3px rgba(31, 92, 112, .16); border-color: var(--primary); }
.search-box .search-input { flex: 1; min-width: 0; border: none; background: transparent; padding: 14px 18px; font-size: calc(15px * var(--a11y-text)); }
.search-box .search-input:focus { outline: none; box-shadow: none; }
.search-box .btn { border-radius: var(--radius-sm); margin: 4px; padding: 10px 22px; }
.search-box .search-icon { display: flex; align-items: center; padding-left: 16px; color: var(--text-muted); }
.search-box .search-icon svg { width: 19px; height: 19px; }
.hot-keywords { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; font-size: calc(13px * var(--a11y-text)); color: var(--text-muted); }
.hot-keywords a { color: var(--text-sub); border-bottom: 1px dotted var(--border-strong); padding-bottom: 1px; }
.hot-keywords a:hover { color: var(--seal); border-color: var(--seal); }

/* ---------- Notice banner ---------- */
.notice-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--primary-lighter); border: 1px solid #cfdee1;
  color: var(--text-sub); font-size: calc(13px * var(--a11y-text)); line-height: 1.7;
  padding: 11px 16px; border-radius: var(--radius-sm);
}
.notice-banner svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); }
.notice-banner strong { font-weight: 600; color: var(--primary-hover); }
.notice-banner.neutral { background: var(--surface-2); border-color: var(--border); color: var(--text-sub); }
.notice-banner.neutral svg { color: var(--warning); }
.notice-banner.danger { background: var(--danger-soft); border-color: #eccfc9; color: #7c2a21; align-items: flex-start; }
.notice-banner.danger svg { color: var(--danger); margin-top: 2px; }
.hero .notice-banner { margin-top: 24px; max-width: 640px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: calc(12.5px * var(--a11y-text)); color: var(--text-muted); padding: 16px 0 0;
  letter-spacing: .02em;
}
.breadcrumb a { color: var(--text-sub); display: inline-flex; align-items: center; gap: 4px; }
.breadcrumb a:hover { color: var(--seal); }
.breadcrumb svg { width: 13px; height: 13px; color: var(--border-strong); }
.breadcrumb .current { color: var(--text); }
.page-hero .breadcrumb { padding-top: 0; margin-bottom: 18px; }

/* ---------- Meta ---------- */
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13px * var(--a11y-text)); color: var(--text-sub); }
.meta-item svg { width: 14px; height: 14px; color: var(--text-muted); }
.meta-item strong { color: var(--text); font-weight: 600; }

/* ---------- Filter bar ---------- */
.filter-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.filter-group { display: flex; align-items: flex-start; gap: var(--space-md); padding: var(--space-sm) 0; border-bottom: 1px dashed var(--border); }
.filter-group:last-child { border-bottom: none; padding-bottom: 0; }
.filter-group:first-child { padding-top: 0; }
.filter-label { flex-shrink: 0; width: 64px; font-size: calc(12.5px * var(--a11y-text)); font-weight: 600; color: var(--text-muted); letter-spacing: .08em; padding-top: 7px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
  padding: 5px 13px; border-radius: var(--radius-sm);
  font-size: calc(13px * var(--a11y-text)); color: var(--text-sub);
  background: var(--surface); border: 1px solid var(--border);
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-actions { display: flex; gap: 10px; margin-top: 14px; justify-content: flex-end; }

/* ---------- List items ---------- */
.list-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.list-item {
  display: block; padding: 20px var(--space-lg);
  border-bottom: 1px solid var(--border);
  transition: background .18s var(--ease);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }
.list-item-title { font-size: calc(16.5px * var(--a11y-text)); font-weight: 600; color: var(--text); display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; line-height: 1.6; }
.list-item:hover .list-item-title { color: var(--primary-hover); }
.list-item-title svg { width: 17px; height: 17px; color: var(--brass); flex-shrink: 0; margin-top: 5px; }
.list-item-summary { font-size: calc(13.5px * var(--a11y-text)); color: var(--text-sub); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.75; }
.list-item-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.result-count { font-size: calc(13.5px * var(--a11y-text)); color: var(--text-sub); margin: var(--space-md) 2px; }
.result-count strong { color: var(--seal); font-weight: 700; font-family: var(--font-serif); font-size: calc(17px * var(--a11y-text)); }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 32px 0 8px; }
.pagination .pagination { margin: 0; }
.page-btn {
  min-width: 34px; height: 34px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: calc(13px * var(--a11y-text));
  background: var(--surface); border: 1px solid var(--border); color: var(--text-sub);
  font-family: var(--font-mono);
  transition: all .16s var(--ease);
}
.page-btn svg { width: 15px; height: 15px; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.page-btn:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; border-color: var(--border); }

/* ---------- Empty / loading ---------- */
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-sub); }
.empty-state svg { width: 52px; height: 52px; color: var(--border-strong); margin: 0 auto 16px; }
.empty-state p { font-size: calc(14.5px * var(--a11y-text)); }
.skeleton { background: linear-gradient(90deg, #efeade 25%, #faf6ec 50%, #efeade 75%); background-size: 200% 100%; animation: skeleton 1.3s infinite; border-radius: 4px; }
@keyframes skeleton { to { background-position: -200% 0; } }

/* ---------- Accordion ---------- */
.accordion-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; transition: border-color .18s var(--ease); }
.accordion-item.open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.accordion-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 17px 20px; text-align: left; font-size: calc(15px * var(--a11y-text)); font-weight: 600; color: var(--text); }
.accordion-head:hover { color: var(--primary); }
.accordion-head .q-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 2px;
  background: var(--seal-soft); color: var(--seal);
  border: 1px solid #eccfc9;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(13px * var(--a11y-text)); font-weight: 700; font-family: var(--font-serif);
}
.accordion-head .chev { margin-left: auto; flex-shrink: 0; color: var(--text-muted); transition: transform .22s var(--ease), color .18s var(--ease); }
.accordion-head .chev svg { width: 18px; height: 18px; }
.accordion-item.open .chev { transform: rotate(180deg); color: var(--seal); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .28s var(--ease); }
.accordion-inner { padding: 0 20px 20px 58px; font-size: calc(14px * var(--a11y-text)); color: var(--text-sub); line-height: 1.85; }
.accordion-inner .basis { margin-top: 12px; font-size: calc(12.5px * var(--a11y-text)); color: var(--text-muted); display: flex; gap: 6px; align-items: center; }
.accordion-inner .basis svg { width: 14px; height: 14px; }

/* ---------- Timeline（办事步骤） ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.timeline-step { position: relative; padding-bottom: 26px; }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::before {
  content: attr(data-step); position: absolute; left: -34px; top: 0;
  width: 26px; height: 26px; border-radius: 2px;
  background: var(--seal); color: #fff;
  font-size: calc(12px * var(--a11y-text)); font-weight: 700; font-family: var(--font-serif);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--seal-soft);
}
.timeline-step h4 { font-size: calc(15.5px * var(--a11y-text)); margin-bottom: 5px; }
.timeline-step p { font-size: calc(14px * var(--a11y-text)); color: var(--text-sub); }

/* ---------- Table ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: auto; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: calc(13.5px * var(--a11y-text)); min-width: 640px; font-variant-numeric: tabular-nums; }
.table th {
  background: #f5f1e7; text-align: left; padding: 12px 18px;
  font-weight: 600; color: var(--text-sub); font-size: calc(12px * var(--a11y-text));
  letter-spacing: .06em; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 13px 18px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s var(--ease); }
.table tbody tr:hover { background: #fdfbf5; }

/* ---------- Tabs（区级门牌） ---------- */
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); width: 100%;
  padding: 0; background: transparent;
}
.tab {
  padding: 10px 22px; margin-bottom: -1px;
  border: 1px solid transparent; border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: calc(14px * var(--a11y-text)); font-weight: 600; color: var(--text-sub);
  transition: all .18s var(--ease);
}
.tab:hover { color: var(--primary); background: var(--surface-2); }
.tab.active { background: var(--surface); border-color: var(--border); border-top: 2px solid var(--seal); color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .3s var(--ease); }

/* ---------- Prose（长文页） ---------- */
.prose { font-size: calc(15.5px * var(--a11y-text)); color: var(--text); line-height: 1.95; }
.prose h2 { font-size: calc(21px * var(--a11y-text)); margin: 34px 0 14px; display: flex; align-items: center; gap: 9px; }
.prose h2[id] { scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h2 svg { width: 20px; height: 20px; color: var(--seal); }
.prose h3 { font-size: calc(17px * var(--a11y-text)); margin: 22px 0 10px; }
.prose p { margin-bottom: 12px; color: #33423f; }
.prose ul { margin: 0 0 12px 4px; }
.prose ul li { position: relative; padding-left: 18px; margin-bottom: 8px; color: #33423f; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; border-radius: 1px; background: var(--brass); }
.prose.doc-body { font-family: var(--font-serif); font-size: calc(16.5px * var(--a11y-text)); line-height: 2.05; color: #24302e; }
.prose.doc-body p { margin-bottom: 14px; text-indent: 2em; color: #24302e; }
.prose strong { color: var(--text); font-weight: 700; }
.prose .danger-list li::before { background: var(--danger); }
.prose a { border-bottom: 1px solid rgba(31, 92, 112, .3); }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: #16292c; color: #b9c4c1; margin-top: 60px; }
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image:
    linear-gradient(to right, #fff 1px, transparent 1px),
    linear-gradient(to bottom, #fff 1px, transparent 1px);
  background-size: 46px 23px;
}
.site-footer .container { position: relative; z-index: 1; }
.footer-top { padding-top: 48px; padding-bottom: 36px; display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr; gap: 36px; }
.footer-brand .footer-lockup { display: flex; align-items: center; gap: 10px; }
.footer-brand .footer-brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.footer-brand .footer-brand-tag { font-size: calc(10px * var(--a11y-text)); letter-spacing: .18em; color: #c7a76c; margin-top: 4px; }
.footer-brand .brand-name { color: #fff; font-size: calc(20px * var(--a11y-text)); letter-spacing: .1em; }
.footer-brand p { font-size: calc(13px * var(--a11y-text)); line-height: 1.9; margin-top: 14px; color: #9fadaa; }
.footer-brand .footer-slogan {
  font-family: var(--font-serif);
  font-size: calc(22px * var(--a11y-text)); line-height: 1.7; letter-spacing: .06em;
  color: #fbf8f1; margin-top: 20px;
}
.footer-brand .footer-desc { margin-top: 6px; color: #9fadaa; }
.footer-brand strong { color: #d8c9ae !important; font-weight: 600; }
.footer-col h4 { color: #fbf8f1; font-size: calc(14.5px * var(--a11y-text)); margin-bottom: 16px; letter-spacing: .08em; }
.footer-col a, .footer-col li { display: block; font-size: calc(13px * var(--a11y-text)); color: #9fadaa; margin-bottom: 10px; transition: color .18s var(--ease); }
.footer-col a:hover { color: #e3b7b0; }
.footer-col .meta-item { color: #9fadaa; font-size: calc(13px * var(--a11y-text)); margin-bottom: 10px; }
.footer-col .meta-item svg { color: #7f8f8b; }
.footer-bottom { border-top: 1px solid rgba(251, 248, 241, .1); padding-top: 18px; padding-bottom: 18px; font-size: calc(12px * var(--a11y-text)); color: #7f8f8b; line-height: 1.9; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.footer-bottom a { color: #9fadaa; }
.footer-bottom a:hover { color: #e3b7b0; }

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease),
              background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.back-to-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--seal);
  opacity: .85;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.back-to-top:active { transform: translateY(1px); }
.back-to-top:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
.back-to-top svg { width: 20px; height: 20px; }
@media (max-width: 768px) {
  .back-to-top {
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
  }
}
@media print {
  .back-to-top { display: none; }
}

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 9px;
  background: var(--text); color: #fff; font-size: calc(13.5px * var(--a11y-text));
  padding: 12px 20px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: toastIn .26s var(--ease);
}
.toast svg { width: 17px; height: 17px; color: #e3b7b0; }
.toast.out { animation: toastOut .24s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(12px); animation: fadeUp .55s var(--ease) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Page hero（内页页头） ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #f8f3e8 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 26px 0 30px;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(to right, rgba(31, 92, 112, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 92, 112, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 62%);
  mask-image: linear-gradient(100deg, #000 0%, transparent 62%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero.compact { padding: 14px 0 10px; }
.page-hero.compact .breadcrumb { margin-bottom: 0; }
.page-hero h1 { font-size: calc(34px * var(--a11y-text)); margin-bottom: 8px; font-weight: 600; letter-spacing: .04em; text-wrap: pretty; }
.page-hero p { font-size: calc(14.5px * var(--a11y-text)); color: var(--text-sub); max-width: 780px; line-height: 1.8; }

/* ---------- 站内搜索 ---------- */
.search-hero {
  position: relative; overflow: hidden;
  padding: 26px 0 34px;
  background: linear-gradient(180deg, #f8f3e8 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.search-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(to right, rgba(31, 92, 112, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 92, 112, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 62%);
  mask-image: linear-gradient(100deg, #000 0%, transparent 62%);
}
.search-hero .container { position: relative; z-index: 1; }
.search-hero h1 { font-size: calc(34px * var(--a11y-text)); margin: 12px 0 8px; letter-spacing: .04em; text-wrap: pretty; }
.search-hero p { font-size: calc(14.5px * var(--a11y-text)); color: var(--text-sub); }
.search-box-lg { max-width: 760px; margin-top: 20px; }
.search-tabs { margin-bottom: 28px; }
.search-tabs .tab span { font-family: var(--font-mono); font-size: calc(11px * var(--a11y-text)); color: var(--text-muted); margin-left: 5px; }
.search-tabs .tab.active span { color: var(--seal); }
.search-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; align-items: start; }
.search-filters { position: sticky; top: 88px; padding-right: 20px; border-right: 1px solid var(--border); }
.filter-block { margin-bottom: 24px; }
.filter-block h3 {
  font-family: var(--font-sans); font-size: calc(12px * var(--a11y-text)); font-weight: 600;
  letter-spacing: .1em; color: var(--text-muted); margin: 0 0 8px;
}
.filter-option {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 6px 0; font-size: calc(13px * var(--a11y-text)); color: var(--text-sub);
  border-bottom: 1px dashed transparent;
}
.filter-option span { font-family: var(--font-mono); font-size: calc(10.5px * var(--a11y-text)); color: var(--text-muted); }
.filter-option:hover { color: var(--primary); }
.filter-option.on { color: var(--seal); font-weight: 600; }
.filter-clear { display: inline-block; margin-top: 4px; font-size: calc(12.5px * var(--a11y-text)); color: var(--text-muted); border-bottom: 1px solid var(--border); }
.filter-clear:hover { color: var(--seal); border-color: var(--seal); }
.search-result {
  position: relative; display: block; padding: 22px 40px 22px 0;
  border-bottom: 1px solid var(--border); color: inherit;
}
.search-result:hover { color: inherit; }
.search-result-top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.search-result-title { font-size: calc(18px * var(--a11y-text)); line-height: 1.6; margin: 0 0 8px; font-weight: 600; transition: color .16s var(--ease); text-wrap: pretty; }
.search-result:hover .search-result-title { color: var(--primary); }
.search-result-desc {
  font-size: calc(13.5px * var(--a11y-text)); color: var(--text-sub); line-height: 1.8; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-result-go {
  position: absolute; right: 0; top: 24px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: calc(12.5px * var(--a11y-text)); color: var(--seal);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.search-result-go svg { width: 14px; height: 14px; }
.search-result:hover .search-result-go { opacity: 1; transform: translateX(0); }
mark { background: var(--seal-soft); color: var(--seal-deep); padding: 0; border-radius: 2px; }

/* ---------- Detail page ---------- */
.detail-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 30px; box-shadow: var(--shadow-sm); }
.detail-header h1 { font-size: calc(26px * var(--a11y-text)); margin: 14px 0 16px; line-height: 1.55; text-wrap: pretty; }
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.detail-side .card { padding: 20px; }
.detail-side h3 { font-size: calc(15px * var(--a11y-text)); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; letter-spacing: .04em; }
.detail-side h3 svg { width: 17px; height: 17px; color: var(--brass); }
.side-link { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; font-size: calc(13.5px * var(--a11y-text)); color: var(--text-sub); border-bottom: 1px dashed var(--border); line-height: 1.7; }
.side-link:last-child { border-bottom: none; }
.side-link svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; margin-top: 4px; }
.side-link:hover { color: var(--primary); }
.interpret-block {
  border-left: 3px solid var(--brass);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px; margin-bottom: 18px;
}
.interpret-block h3 { font-size: calc(16px * var(--a11y-text)); margin-bottom: 10px; color: var(--primary-hover); display: flex; align-items: center; gap: 8px; }
.interpret-block h3 svg { width: 18px; height: 18px; }
.interpret-block ul li { position: relative; padding-left: 18px; margin-bottom: 7px; font-size: calc(14px * var(--a11y-text)); color: #33423f; }
.interpret-block ul li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 5px; height: 5px; border-radius: 1px; background: var(--brass); }

/* ---------- Mobile nav ---------- */
.mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 99;
  max-height: calc(100vh - var(--header-h));
  background: rgba(251, 248, 241, .99);
  padding: 18px 24px; display: none; flex-direction: column; gap: 2px;
  overflow-y: auto;
  box-shadow: 0 18px 30px -24px rgba(27, 47, 51, .45);
}
.mobile-nav.open { display: flex; animation: fadeUp .22s var(--ease); }
.mobile-nav a { padding: 14px 10px; font-size: calc(15.5px * var(--a11y-text)); color: var(--text); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.mobile-nav a svg { width: 18px; height: 18px; color: var(--brass); }
.mobile-nav a.active { color: var(--seal); font-weight: 600; }
.mobile-search { display: flex; gap: 8px; margin-bottom: 14px; }
.mobile-search .input { flex: 1; }

/* 平板及以下宽度主导航收起为汉堡菜单，避免 8 个栏目 + 品牌 + 工具按钮挤出屏幕 */
@media (max-width: 1240px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 1241px) {
  .mobile-nav { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr .8fr; gap: 36px; }
  .hero-title { font-size: calc(40px * var(--a11y-text)); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tab-panel .grid-2 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .header-right .header-link { display: none; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel { max-width: 520px; }
  .main-nav a { padding: 10px 8px; font-size: calc(13.5px * var(--a11y-text)); }
  .main-nav a::after { left: 8px; right: 8px; }
  .search-layout { grid-template-columns: 1fr; gap: 20px; }
  .search-filters {
    position: static; display: flex; gap: 24px; overflow-x: auto;
    padding-right: 0; padding-bottom: 14px;
    border-right: 0; border-bottom: 1px solid var(--border);
  }
  .filter-block { flex: 0 0 auto; min-width: 140px; margin-bottom: 0; }
}
@media (max-width: 768px) {
  .main-nav, .header-right .header-link { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .container { gap: 12px; }
  .hero { padding: 42px 0 46px; }
  .hero-title { font-size: calc(32px * var(--a11y-text)); line-height: 1.5; }
  .hero-sub { font-size: calc(15px * var(--a11y-text)); }
  .window-pane { min-height: 112px; padding: 13px; }
  .window-num { font-size: calc(28px * var(--a11y-text)); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 38px 0; }
  .section-title { font-size: calc(21px * var(--a11y-text)); }
  /* 页脚：品牌区独占一行；左列站内栏目，右侧上下排权威信息源与联系合规 */
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "brand brand"
      "nav sources"
      "nav compliance";
    gap: 26px 20px;
    padding-top: 36px;
    padding-bottom: 26px;
  }
  .footer-brand { grid-area: brand; }
  .footer-col-nav { grid-area: nav; }
  .footer-col-sources { grid-area: sources; }
  .footer-col-compliance { grid-area: compliance; }
  .filter-label { width: 100%; padding-top: 0; }
  .filter-group { flex-direction: column; gap: 8px; }
  .detail-header { padding: 22px 18px; }
  .detail-header h1 { font-size: calc(20px * var(--a11y-text)); }
  .accordion-inner { padding-left: 20px; }
  .page-hero { padding: 20px 0 24px; }
  .page-hero h1 { font-size: calc(26px * var(--a11y-text)); }
  .search-box .search-input { padding: 12px 12px; font-size: calc(14px * var(--a11y-text)); }
  .search-box .btn { padding: 9px 14px; }
  .list-item { padding: 17px 18px; }
  .content-card { min-height: 0; padding: 19px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: calc(27px * var(--a11y-text)); }
  .page-hero h1 { font-size: calc(23px * var(--a11y-text)); }
  .card { padding: 20px; }
  .tabs { width: 100%; }
  .tab { flex: 1; text-align: center; padding: 9px 8px; }
  .window-pane { min-height: 100px; padding: 11px; }
  .window-label { font-size: calc(11.5px * var(--a11y-text)); }
  .window-num { font-size: calc(24px * var(--a11y-text)); }
  .window-note { font-size: calc(9.5px * var(--a11y-text)); }
}

/* ---------- 错误页 404 ---------- */
.error-page { max-width: 820px; margin: 0 auto; text-align: center; }
.error-code {
  font-family: var(--font-serif);
  font-size: clamp(64px, 12vw, 104px);
  line-height: 1;
  color: var(--seal);
  letter-spacing: .04em;
}
.error-title { margin: 14px 0 10px; font-size: clamp(22px, 3vw, 30px); color: var(--text); }
.error-desc { max-width: 620px; margin: 0 auto 26px; color: var(--text-sub); line-height: 1.8; }
.error-search { max-width: 580px; margin: 0 auto 28px; }
.error-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.error-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: calc(14px * var(--a11y-text));
  text-decoration: none;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.error-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lighter); }
.error-note { font-size: calc(13px * var(--a11y-text)); color: var(--text-muted); line-height: 1.9; }
.error-note a { color: var(--primary); }
@media (max-width: 640px) {
  .error-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 主导航「全部栏目」与全站菜单 ---------- */
.nav-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-sub);
  font-size: calc(14px * var(--a11y-text));
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-all-btn svg { width: 16px; height: 16px; }
.nav-all-btn:hover { color: var(--primary); background: var(--primary-lighter); }
.nav-all-btn.is-current { color: var(--text); font-weight: 600; }

.all-menu[hidden] { display: none; }
.all-menu { position: fixed; inset: 0; z-index: 300; }
.all-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 30, .42);
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.all-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(430px, 94vw);
  padding: 22px 22px calc(28px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 48px rgba(18, 28, 30, .18);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .24s var(--ease);
}
.all-menu.open .all-menu-backdrop { opacity: 1; }
.all-menu.open .all-menu-panel { transform: translateX(0); }
body.menu-open { overflow: hidden; }

.all-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.all-menu-head h2 { margin: 0 0 4px; font-size: calc(21px * var(--a11y-text)); font-family: var(--font-serif); }
.all-menu-head p { margin: 0; font-size: calc(13px * var(--a11y-text)); color: var(--text-muted); }
.all-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-sub);
}
.all-menu-close:hover { border-color: var(--primary); color: var(--primary); }
.all-menu-close svg { width: 18px; height: 18px; }

.all-menu-group { margin-bottom: 22px; }
.all-menu-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: calc(13px * var(--a11y-text));
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.all-menu-group h3::before { content: ""; width: 4px; height: 14px; border-radius: 1px; background: var(--seal); }
.all-menu-grid { display: grid; gap: 4px; }
.all-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.all-menu-link:hover { background: var(--primary-lighter); border-color: var(--border); }
.all-menu-link.active { background: var(--primary-soft); border-color: var(--border); }
.all-menu-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
}
.all-menu-ico svg { width: 18px; height: 18px; }
.all-menu-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.all-menu-text strong { font-size: calc(15px * var(--a11y-text)); font-weight: 600; }
.all-menu-text small { font-size: calc(12.5px * var(--a11y-text)); color: var(--text-sub); }
.all-menu-link > svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.all-menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.all-menu-fab {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 95;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(18, 28, 30, .22);
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.all-menu-fab:hover { background: var(--primary-hover); transform: translateY(-2px); }
.all-menu-fab:active { transform: translateY(0); }
.all-menu-fab:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
.all-menu-fab svg { width: 23px; height: 23px; }
@media (max-width: 768px) {
  .all-menu-fab {
    right: 16px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }
  .all-menu-panel { width: 100%; border-left: 0; }
}

/* ---------- 列表筛选：已选条件与移动端抽屉 ---------- */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 4px;
  font-size: 14px;
  color: var(--text-sub);
}
.active-filters-label { font-size: 13.5px; }
.active-filters .chip { font-size: 13.5px; }
.reset-link { margin-left: 4px; text-decoration: underline; font-size: 13.5px; }
.filter-toggle { display: none; }
.filter-group select { max-width: 100%; }
.filter-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-selects .input { flex: 1 1 170px; width: auto; min-width: 0; }

@media (max-width: 768px) {
  .filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font-size: 15px;
  }
  .filter-bar:not(.filters-open) .filter-body { display: none; }
  .filter-bar.filters-open .filter-body { display: block; }
  .filter-bar .filter-group { margin-bottom: 12px; }
}


/* ---------- 间距统一：移动端刻度 ---------- */
@media (max-width: 768px) {
  :root {
    --space-section: 40px;
    --space-section-tight: 28px;
  }
  .section-head { margin-bottom: var(--space-md); }
  .filter-bar { padding: var(--space-md); }
  .card { padding: var(--space-md); }
}

/* ---------- 首屏与内容区的衔接间距 ---------- */
.hero + .section,
.hero + .section-tight { padding-top: var(--space-section); }
.page-hero + .section,
.page-hero + .section-tight { padding-top: var(--space-lg); }



/* ---------- 深色模式（跟随系统） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101618;
    --surface: #182124;
    --surface-2: #1f2a2e;
    --text: #ecebe4;
    --text-sub: #aeb8b5;
    --text-muted: #8d9693;
    --border: #2b363a;
    --border-strong: #3a474c;
    --primary: #6fb0c4;
    --primary-hover: #8cc4d4;
    --primary-soft: #172a30;
    --primary-lighter: #132227;
    --seal-soft: #37211e;
    --success-soft: #1a2a22;
    --warning-soft: #2f271a;
    --danger-soft: #37211e;
  }
  html { color-scheme: dark; }
  .btn-primary { background: #1f5c70; color: #fff; }
  .btn-primary:hover { background: #16444f; }
  .site-header, .mobile-nav { background: var(--surface); }
  .window-pane, .hero-panel { background: var(--surface); }
  .hero { background: linear-gradient(180deg, #142023 0%, var(--bg) 100%); }
  .page-hero { background: linear-gradient(180deg, #142023 0%, var(--bg) 100%); }
  .nav-more-panel { background: var(--surface); }
  /* 正文与固定深色文字在深色底上改为浅色，保证对比度 */
  .prose,
  .prose p,
  .prose li,
  .prose.doc-body,
  .prose.doc-body p { color: var(--text); }
  .prose strong { color: #fff; }
  .prose a { color: var(--primary); border-bottom-color: rgba(111, 176, 196, .45); }
  /* 浅底彩色标签在深色底上提高文字亮度 */
  .tag-teal,
  .tag-green { color: #8fd0ad; border-color: #2f4a3c; }
  .tag-amber { color: #e3ba74; border-color: #4a3a22; }
  .tag-red { color: #eaa79c; border-color: #4d2c27; }
  .deadline-badge.is-urgent { background: #4a2622; color: #f0a99f; }
  /* 阅读路径当前步骤：深色底上使用深青底，避免浅青底白字 */
  nav[aria-label="阅读路径"] > span[aria-current="page"] {
    background: #1f5c70 !important;
    color: #fff !important;
  }
}

/* ---------- 打印版式：只保留标题、元信息与正文 ---------- */
@media print {
  @page {
    size: A4;
    margin: 18mm 16mm;
  }
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11.5pt;
  }
  .site-header,
  .site-footer,
  .skip-link,
  .back-to-top,
  .all-menu-fab,
  .all-menu,
  .toast-wrap,
  .mobile-nav,
  .page-hero,
  .breadcrumb,
  .detail-tools,
  .detail-side,
  .notice-banner,
  .filter-bar,
  .filter-toggle,
  .section-head,
  .hero,
  nav[aria-label="阅读路径"],
  a.btn,
  .calendar-scroll,
  .calendar-side {
    display: none !important;
  }
  main, .container, .section-tight, .detail-grid {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .card {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .detail-header h1 {
    font-size: 19pt;
    line-height: 1.4;
    margin: 0 0 6pt;
  }
  .detail-header {
    border-left: 0 !important;
    border: 0 !important;
    padding-left: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }
  .detail-header::before { display: none !important; }
  .meta-row {
    display: block !important;
    margin-bottom: 3pt !important;
  }
  .meta-item {
    display: inline-block;
    margin-right: 12pt;
    font-size: 9.5pt;
    color: #333 !important;
  }
  .meta-item svg { display: none; }
  .tag {
    border: 1px solid #999 !important;
    background: none !important;
    color: #000 !important;
    font-size: 9pt;
    padding: 1pt 5pt;
  }
  .prose, .prose p, .prose li, .prose td {
    font-size: 11pt !important;
    line-height: 1.75 !important;
    color: #000 !important;
  }
  .prose h2, .prose h3 { page-break-after: avoid; }
  .prose h2 { font-size: 14pt; margin: 14pt 0 6pt; }
  .prose h3 { font-size: 12pt; margin: 10pt 0 4pt; }
  .prose p, .prose li { orphans: 3; widows: 3; }
  .prose table { page-break-inside: auto; }
  .prose tr { page-break-inside: avoid; }
  .prose img { max-width: 100% !important; }
  .document-footer,
  .card + .card { margin-top: 10pt; }
  a[href^="http"]::after {
    content: "（" attr(href) "）";
    font-size: 8.5pt;
    color: #555;
    word-break: break-all;
  }
  .detail-header a[href^="http"]::after,
  .breadcrumb a::after { content: ""; }
}


/* ---------- 材料模板表格：移动端只保留名称、格式与操作 ---------- */
@media (max-width: 768px) {
  .table-materials { min-width: 0; }
  .table-materials th:nth-child(3),
  .table-materials td:nth-child(3),
  .table-materials th:nth-child(4),
  .table-materials td:nth-child(4),
  .table-materials th:nth-child(5),
  .table-materials td:nth-child(5),
  .table-materials th:nth-child(6),
  .table-materials td:nth-child(6) {
    display: none;
  }
  .table-materials th,
  .table-materials td { padding: 10px 12px; }
}
