/* ============================================================
   TonCraft CSS Reset — Retro Pixel
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  /* Kill subpixel rendering — crisp pixel fonts */
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  text-rendering: optimizeSpeed;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Custom scrollbar — retro thin */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-default);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) var(--bg-primary);
}

/* Selection */
::selection {
  background: var(--sys-blue);
  color: var(--bg-primary);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--sys-blue);
  outline-offset: 0;
}

/* Utility */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
