/* base.css — Element-level resets and defaults. Class-free.
   Loaded after tokens.css, before components.css.
*/

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--text);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--text-inverted);
}

/* ── Typography defaults ─────────────────────────────────── */
h1 { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.015em; line-height: var(--leading-tight); }
h2 { font-size: var(--text-xl); font-weight: 600; line-height: var(--leading-snug); }
h3 { font-size: var(--text-md); font-weight: 600; line-height: var(--leading-snug); }
h4, h5, h6 { font-size: var(--text-base); font-weight: 600; line-height: var(--leading-snug); }

p { font-size: var(--text-base); line-height: var(--leading-base); }

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Focus ring (covers any element that gets keyboard focus) ── */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-xs); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
