/* =============================================================
   RESET.CSS — Современный CSS-сброс стилей
   Основан на Josh Comeau's CSS Reset + дополнения
   ============================================================= */

/* 1. Модель box-sizing для всех элементов */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 2. Базовые настройки html/body */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 3. Медиа-элементы */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 4. Форменные элементы наследуют шрифт */
input, button, textarea, select, optgroup {
  font: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

/* 5. Переполнение текста */
p, h1, h2, h3, h4, h5, h6, li, dt, dd {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
}

/* 6. Списки */
ol, ul {
  list-style: none;
}

/* 7. Ссылки */
a {
  text-decoration: none;
  color: inherit;
}

/* 8. Таблицы */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 9. Кнопки */
button {
  cursor: pointer;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 10. Fieldset */
fieldset {
  border: none;
}

/* 11. Скрытый элемент */
[hidden] {
  display: none !important;
}

/* 12. Выделение текста — фирменный цвет */
::selection {
  background-color: #DBEAFE;
  color: #1E3A8A;
}

/* 13. Focus-visible (только клавиатура) */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
  border-radius: 4px;
}

/* 14. Полоса прокрутки (Chrome, Safari) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* 15. Placeholder */
::placeholder {
  color: #9CA3AF;
  opacity: 1;
}

/* 16. Анимации: уважать настройки системы */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
