/* ============================================================
   Base · reset + 全局排版
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.7;
  color: var(--ink-700);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}
a:hover { color: var(--green-600); }

img { max-width: 100%; height: auto; display: block; border: 0; }

[hidden] { display: none !important; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; background: none; border: 0; padding: 0; }

table { border-collapse: collapse; }

:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

::selection { background: var(--green-100); color: var(--green-800); }

/* 容器 */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--r);
  font-size: var(--t-body);
  line-height: 1;
  border: 1px solid transparent;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--green-600); color: #fff; }
.btn--primary:hover { background: var(--green-700); color: #fff; }
.btn--dark { background: var(--ink-800); color: #fff; }
.btn--dark:hover { background: var(--ink-900); color: #fff; }
.btn--ghost { border-color: var(--ink-300); color: var(--ink-700); background: #fff; }
.btn--ghost:hover { border-color: var(--green-500); color: var(--green-600); }
.btn--sm { height: 34px; padding: 0 16px; font-size: var(--t-small); }

/* 通用小标记 */
.tag {
  display: inline-block;
  padding: 0 8px;
  height: 22px;
  line-height: 22px;
  font-size: var(--t-tiny);
  border-radius: var(--r-sm);
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
