/* Rogue HQ — base reset + primitives */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(139,124,255,.35); }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--card-hover); }

/* focus visible */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* utility */
.mono { font-family: var(--mono); }
.dim { color: var(--text-dim); }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: var(--s3); }
.col { display: flex; flex-direction: column; }
.gap2 { gap: var(--s2); } .gap4 { gap: var(--s4); }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* spinner */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--border); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* skeleton shimmer */
.skel {
  background: linear-gradient(100deg, var(--card-2) 30%, var(--card-hover) 50%, var(--card-2) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

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