/* ==========================================================================
   岐黄养生 · 基础层
   设计令牌 / 重置 / 排版 / 工具类
   ========================================================================== */

:root {
  /* ---- 色彩 ---- */
  --bg: #FAFBF8;
  --surface: #FFFFFF;
  --surface-2: #F2F5EF;
  --surface-3: #E9EFE6;

  --border: #E3E8DF;
  --border-strong: #D2DACE;

  --text: #1F2A24;
  --text-2: #5A6B60;
  --text-3: #8A9A8F;

  --primary: #4A7C59;
  --primary-600: #3D694A;
  --primary-700: #315538;
  --primary-50: #EAF2EC;
  --primary-100: #D8E8DD;

  --accent: #E8A87C;
  --accent-600: #D08B5B;
  --accent-50: #FBF0E7;

  --danger: #C0564A;
  --danger-50: #F9ECEA;

  /* ---- 圆角 ---- */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 999px;

  /* ---- 阴影 ---- */
  --shadow-xs: 0 1px 2px rgba(31, 42, 36, .05);
  --shadow-sm: 0 2px 8px rgba(31, 42, 36, .06);
  --shadow: 0 6px 20px rgba(31, 42, 36, .08);
  --shadow-lg: 0 16px 40px rgba(31, 42, 36, .12);

  /* ---- 尺寸 ---- */
  --sidebar-w: 252px;
  --topbar-h: 64px;
  --content-max: 1180px;

  /* ---- 字体 ---- */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
}

/* ---- 重置 ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, p, figure, blockquote {
  margin: 0;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.35;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img, svg {
  display: block;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---- 可访问性 ---- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: #CFE3D6;
  color: var(--text);
}

/* ---- 滚动条 ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #D5DDD2;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #BFCBB9;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---- 工具类 ---- */
.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;
}

.muted {
  color: var(--text-3);
}

.hint {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.7;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

[hidden] {
  display: none !important;
}
