/*
 * reset.css
 * Modern CSS Reset — inspired by Josh W. Comeau's reset
 * https://www.joshwcomeau.com/css/custom-css-reset/
 *
 * Goal: remove browser inconsistencies and create a neutral
 * baseline without over-normalising everything.
 */

/* 1. Use a more intuitive box-sizing model for all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margins on all elements */
* {
  margin: 0;
}

/* 3. Allow percentage-based heights in the application */
html,
body {
  height: 100%;
}

/*
 * 4. Typographic tweaks:
 *    - Add accessible line-height
 *    - Improve text rendering on WebKit / Firefox
 */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 5. Improve media defaults — block display and constrain to container */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Remove built-in form typography styles */
input,
button,
textarea,
select {
  font: inherit;
}

/*
 * 7. Avoid text overflows — allow long words to break naturally
 *    (useful for headings with long compound words in Latvian, Lithuanian, etc.)
 */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Create a root stacking context for smooth animations */
#root,
#__next {
  isolation: isolate;
}

/* 9. Remove list styles on <ul> and <ol> elements
      that carry a role attribute (avoids VoiceOver bug in Safari) */
ul[role],
ol[role] {
  list-style: none;
  padding: 0;
}

/* 10. Remove default button styles — components add their own */
button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* 11. Remove default anchor decoration — components add their own */
a {
  color: inherit;
  text-decoration: none;
}

/* 12. Ensure table elements collapse borders cleanly */
table {
  border-collapse: collapse;
}
