/* BASE — Reinicio, fondo, tipografía, iconos y utilidades */

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--c-bg);
  /* Cuadrícula tecnológica muy tenue + dos halos de color lejanos. */
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(0, 217, 255, 0.07), transparent 60%),
    linear-gradient(rgba(120, 180, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--c-text);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

p { color: var(--c-text-3); }

a { color: var(--c-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

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

::selection { background: rgba(0, 217, 255, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 180, 255, 0.16);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(0, 217, 255, 0.35); }

/* Iconos del sprite /static/img/icons.svg. fill y stroke se heredan dentro de <use>. */
.i, .icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i-xs { width: 12px; height: 12px; }
.i-sm { width: 14px; height: 14px; }
.i-lg { width: 20px; height: 20px; }
.i-xl { width: 24px; height: 24px; }
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 16px; height: 16px; }
.icon-lg { width: 20px; height: 20px; }

/* Utilidades */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pos, td.pos { color: var(--c-green); }
.neg, td.neg { color: var(--c-red); }
.gold { color: var(--c-gold); }
.cyan { color: var(--c-cyan); }
.muted { color: var(--c-text-2); }
.dim { color: var(--c-text-3); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.font-semibold { font-weight: 600; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50% { box-shadow: 0 0 0 4px transparent; opacity: 0.55; }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.icon-spin { animation: spin 1s linear infinite; }

/* Movimiento reducido: sin animaciones ni transiciones decorativas. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
