/* ==========================================================================
   AtlasKeys — Modern CSS Reset
   ========================================================================== */

*,
*::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;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: var(--lh-base);
}

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

img, video { height: auto; }

/* Forms inherit type */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

/* Remove number input spinners */
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; appearance: textfield; }

/* Text wrapping */
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* Lists used as nav/grids */
ul[role="list"], ol[role="list"] { list-style: none; }

/* Links */
a { color: inherit; text-decoration: none; }

/* Tables */
table { border-collapse: collapse; border-spacing: 0; }

/* Media query target for JS-disabled state */
:where(:focus-visible) {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

/* Hidden utility honored everywhere */
[hidden] { display: none !important; }

/* Selection */
::selection {
  background: var(--color-primary-soft);
  color: var(--color-text);
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-surface-2);
  border: 3px solid var(--color-bg);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: #313347; }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--color-surface-2) var(--color-bg); }

/* Screen-reader-only utility */
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  transition: top var(--t-base) var(--ease);
}
.skip-link:focus { top: var(--space-4); }
