/* ============================================================================
   ATOM Design System — Base / reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100dvh;
  background: var(--atom-bg-canvas);
  color: var(--atom-fg-neutral);
  font-family: var(--atom-font-sans);
  font-size: 16px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
  line-height: 1.25;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--atom-primary-600);
  outline-offset: 2px;
  border-radius: var(--atom-radius-r1);
}

/* Screen-reader only — used by the recommended dot and icon buttons */
.atom-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Holder for engine/shell-markup.js — the icon sprite has to stay in the render
   tree (0x0, clipped) so <use href="#atom-i-*"> resolves; display:none on an
   svg sprite's parent is unreliable. Templates never render either way. */
.atom-shell-holder {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Korean copy should not break mid-word */
.atom-break-keep {
  word-break: keep-all;
  overflow-wrap: break-word;
}

::selection {
  background: var(--atom-primary-200);
  color: var(--atom-fg-neutral);
}

/* Hide scrollbars in the sidebar without losing scrollability */
.atom-scroll-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.atom-scroll-hidden::-webkit-scrollbar {
  display: none;
}
