/* Base reset + typographic foundation. Consumes tokens.css only — no hardcoded values. */

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
}
:root[data-theme="dark"] html,
:root[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body-md);
  line-height: var(--lh-body-md);
  color: var(--color-text-primary);
  background: var(--color-bg-canvas);
  -webkit-font-smoothing: antialiased;
  transition: background var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}

h1, h2, h3, h4, h5 { font-weight: var(--fw-semibold); color: var(--color-text-primary); letter-spacing: var(--ls-tight); }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); }

p { color: var(--color-text-secondary); }

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

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--navy-200);
  color: var(--navy-900);
}

/* Scrollbar (webkit) kept subtle so it doesn't fight the system UI */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border-default); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-border-strong); }
