/* normalize.css — компактная, современная версия */

/* 1) Удобная модель коробки во всех элементах */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2) Базовые настройки html/body */
html {
  line-height: 1.15; /* улучшает поведение строк по умолчанию */
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 16px;
  color: inherit;
  background-color: transparent;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

/* 3) Унификация заголовков и шрифтов */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: inherit;
  line-height: 1.2;
}

/* 4) Сбрасываем стандартные отступы для основных блоков */
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

address {
  font-style: normal;       /* убираем курсив */
  font-weight: normal;      /* нормальный вес текста */
  margin: 0;                /* убираем отступы браузера */
  padding: 0;               /* убираем внутренние отступы */
  color: inherit;           /* наследуем цвет от родителя */
}

/* 5) Списки — единообразие */
ul,
ol {
  margin: 0;
  padding: 0;
  list-style-position: inside;
  list-style-type: none;
}

/* 6) Ссылки */
a {
  background-color: transparent;
  text-decoration: none; /* убрать, если нужно сохранить подчеркивание */
  color: inherit; /* оставляет контроль дизайну */
}

/* 7) Изображения и медиа — адаптивность */
/* img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
} */

/* 8) Формы — наследование шрифта и базовые корректировки */
button,
input,
optgroup,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  border: none;
  outline: none;
}

/* кнопки — унификация поведения */
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* 9) Полосы прокрутки/мобильная фокусировка */
:focus {
  outline: 2px solid Highlight;
  outline-offset: 2px;
}

/* 10) Таблицы */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 11) Скрытые элементы (semantic) */
[hidden] {
  display: none !important;
}

/* 12) Умолчания для accessibility / уменьшение различий между UA */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* 13) Уменьшение контрастных различий у элементов форм в WebKit */
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 14) Устранение странной белой линии под изображениями inline */
img {
  vertical-align: middle;
}

/* 15) Placeholder — единообразие */
::placeholder {
  color: #aaa;
  opacity: 1;
}

/* 16) Input[type=number] — убираем спиннеры */
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;
}

/* 17) Select — убираем стандартную стрелку */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
  cursor: pointer;
}

/* 18) Textarea — resize и минимальная высота */
textarea {
  resize: vertical;
  min-height: 80px;
}

/* 19) Кнопки — плавное наведение и фокус (можно кастомизировать) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  cursor: pointer;
  transition: all 0.2s ease;
}

/* 20) Улучшаем рендеринг текста */
body,
button,
input,
select,
textarea {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 21) Улучшаем интерактивные элементы на мобильных */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* 22) Добавляем унифицированный фокус для accessibility */
:focus-visible {
  outline: 2px solid #4c9aff; /* мягкий синий цвет фокуса */
  outline-offset: 2px;
}
