/* ============================================================================
   Base: reset + primitives. No component or layout rules here.
   ========================================================================== */

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

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* single page app: the canvas owns scroll/pan */
  overscroll-behavior: none; /* no browser back/forward swipe while panning */
}

h1,
h2,
h3 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
}

p {
  line-height: var(--leading-normal);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

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

a {
  color: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}

:focus-visible {
  outline: none;
  /* box-shadow: 0 0 0 3px var(--color-focus-ring); */
}

::placeholder {
  color: var(--color-ink-faint);
}

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

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