/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: transparent; border: 0; cursor: pointer; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
table { border-collapse: collapse; border-spacing: 0; width: 100%; }
:focus-visible { outline: 2px solid #1a4b8e; outline-offset: 2px; }

:root {
  /* —— 政府门户主色（参照 gov.cn）—— */
  --gov-red: #c00000;
  --gov-red-deep: #9c0000;
  --gov-red-light: #e64545;
  --gov-blue: #1a4b8e;
  --gov-blue-deep: #0e3266;
  --gov-blue-light: #4d7ec4;
  --gov-gold: #c4a55b;

  /* —— 中性色 —— */
  --text-1: #1a1a1a;
  --text-2: #4a4a4a;
  --text-3: #888;
  --text-4: #b0b0b0;
  --bg-page: #f4f7fb;
  --bg-card: #ffffff;
  --bg-section: #f8f9fb;
  --border-1: #e8eaee;
  --border-2: #d6dae0;

  /* —— 字体 —— */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Han Serif SC", "Songti SC", SimSun, serif;

  /* —— 字号基准（可通过 accessibility.js 切换）—— */
  --fz-base: 16px;
  --line-height: 1.7;

  /* —— 间距与圆角 —— */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --container: 1200px;
}

html { font-size: var(--fz-base); }
body {
  font-family: var(--font-sans);
  color: var(--text-1);
  background: var(--bg-page);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
}

/* 容器 */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-md); }

/* 浮动清除 */
.clearfix::after { content: ""; display: block; clear: both; }

/* 文本工具 */
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.text-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

/* 隐藏但可被屏幕阅读器读取 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
