/* Modern CSS Reset — 2025 edition
   - lightweight, accessible, low-specificity
   - put this at the top of your main stylesheet
*/

/* 1) low-specificity root defaults */
:where(html) {
  -webkit-text-size-adjust: 100%; /* iOS font scaling */
  -moz-tab-size: 4;
  tab-size: 4;
  line-height: 1.15;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* 2) box-sizing reset using :where to avoid specificity issues */
:where(*, *::before, *::after) {
  box-sizing: border-box;
}

/* 3) base document */
:where(html, body) {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.5;
  color: inherit;
  background-color: transparent;
}

/* 4) make media elements behave */
img, picture, video, canvas, svg {
  display: block;   /* avoid gap under images */
  max-width: 100%;
  height: auto;
}

/* 5) typography and text elements */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

p {
  margin: 0;
}

/* 6) form elements inherit font + remove native weirdness */
:where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
  margin: 0;
}

/* 7) links and buttons */
a {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
}

/* keep buttons clickable / accessible */
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* 8) make lists clean */
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 9) pre/code */
pre, code, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Noto Mono", monospace;
  font-size: 1em; /* prevent inheritance issues */
}

/* 10) details/summary baseline */
details {
  display: block;
}
summary {
  display: list-item;
}

/* 11) accessibility & reduced-motion */
@media (prefers-reduced-motion: reduce) {
  :where(*, *::before, *::after) {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 12) forced colors for high contrast mode (Windows) */
@media (forced-colors: active) {
  :where(*) {
    forced-color-adjust: none;
  }
}

/* 13) utility: prevent accidental touch highlight on iOS */
a, button, input, textarea, select {
  -webkit-touch-callout: none;
}

/* 14) small helpers — remove number input spinners in some browsers */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* End of reset — project styles should go after this file */
