/* Base styles: normalize, reset, and foundational typography
   Extracted from z/styles/globals.css */

/* Box sizing reset */
*,
*::after,
*::before {
  box-sizing: border-box;
  max-width: 100%; /* предотвращаем переполнение */
}

/* Allow specific elements to exceed 100% when needed */
html,
body {
  max-width: none;
}

/* Reset margins for typography elements */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li {
  margin: 0;
  padding: 0;
}

/* Form elements */
button,
input {
  color: currentColor;
  font-family: inherit;
  font-size: inherit;
}

/* Lists */
ul,
ol {
  list-style: none;
}

/* Utility: visually hidden (accessible to screen readers) */
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Base page styles */
body {
  color: var(--accent-color);
  background-color: var(--page-background-color);
  background-image: var(--bg-gradient);
  background-repeat: repeat;
  background-attachment: fixed;
  min-inline-size: 375px;
  min-block-size: 100dvb;
  scrollbar-gutter: stable;
  overflow-x: hidden; /* предотвращаем горизонтальный скролл */
}

/* Prevent horizontal scroll globally */
html {
  overflow-x: hidden;
}

/* Responsive images */
img,
picture,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==================== Accessibility: Focus Styles ==================== */

/* Universal focus-visible style for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Remove default focus outline (only show :focus-visible) */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

