/* ============================================================================
 * tradeStack — Base & Reset
 * ========================================================================= */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
  background: var(--bg-base);
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 350;             /* RunPod: light body weight */
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-base);
  overflow-x: hidden;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;             /* RunPod: medium headings, not bold */
  letter-spacing: normal;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

/* Inline text link (opt-in). Matches RunPod violet-secondary convention. */
.link,
.card__body a:not(.btn):not(.menu-item):not(.plain) {
  color: var(--accent-secondary);
  text-decoration: none;
}
.link:hover,
.card__body a:not(.btn):not(.menu-item):not(.plain):hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-secondary);
  text-underline-offset: 2px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-4) 0;
}

/* ── scrollbars ────────────────────────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-base);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── selection ─────────────────────────────────────────────────────────── */
::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ── focus ─────────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
*:focus {
  outline: none;
}

/* ── utility helpers ───────────────────────────────────────────────────── */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.caps { text-transform: uppercase; letter-spacing: var(--tracking-caps); font-size: var(--text-xs); }
.up    { color: var(--up); }
.down  { color: var(--down); }
.muted { color: var(--text-secondary); }
.dim   { color: var(--text-tertiary); }
