/**
 * reset.css — 浏览器重置 + 全局基础
 */

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

html {
  font-size: var(--ag-font-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ag-font-sans);
  font-weight: var(--ag-weight-regular);
  line-height: var(--ag-leading-normal);
  color: var(--ag-text-primary);
  background: var(--ag-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--ag-accent); text-decoration: none; transition: color var(--ag-transition-fast); }
a:hover { color: var(--ag-accent-hover); }

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

button {
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit; font-size: inherit;
  color: inherit; background: var(--ag-bg-input);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  padding: var(--ag-space-2) var(--ag-space-3);
  outline: none;
  transition: border-color var(--ag-transition-fast);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--ag-accent);
}

ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* Accessibility */
.ag-skip-link {
  position: absolute; top: -40px; left: 0; z-index: 9999;
  padding: var(--ag-space-2) var(--ag-space-4);
  background: var(--ag-accent); color: #fff;
}
.ag-skip-link:focus { top: 0; }

/* Selection */
::selection { background: var(--ag-accent); color: #fff; }
