/* ═══════════════════════════════════════════════════════════════════════════
   QUANTUM TRADER — Base Reset / Normalize
   Surgical, minimal reset — removes browser defaults without adding bulk.
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-family-primary);
  background-color: var(--theme-bg);
  color: var(--theme-text);
  transition: background-color var(--duration-normal) var(--easing-in-out),
              color var(--duration-normal) var(--easing-in-out);
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  font-weight: var(--font-weight-semibold);
}

p {
  overflow-wrap: break-word;
}

/* Remove default fieldset styling */
fieldset {
  border: none;
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Selection styling — uses primary brand */
::selection {
  background-color: var(--color-primary-500);
  color: var(--color-background);
}

/* Scrollbar styling — dark industrial */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--theme-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-neutral-700);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-neutral-600);
}

/* Focus visible ring — accessible keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}
