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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--primary-text); }
table { border-collapse: collapse; }
fieldset { border: none; min-width: 0; }
legend { padding: 0; margin-bottom: var(--space-2); }

svg.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.icon-sm { width: 15px; height: 15px; }
svg.chevron-left { transform: rotate(90deg); }
svg.chevron-right { transform: rotate(-90deg); }
svg.chevron-up { transform: rotate(180deg); }

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

[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-muted { color: var(--text-muted); }
.text-gain { color: var(--gain); }
.text-loss { color: var(--loss); }
.text-warn { color: var(--warn); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.nums { font-variant-numeric: tabular-nums; }

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