/* ---------------------------------------
   normalize.css (modern, lightweight)
   Purpose: reset inconsistencies, keep sensible defaults
----------------------------------------*/

/* 1) Box sizing + margins */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}

/* 2) Document defaults */
html {
  -webkit-text-size-adjust: 100%; /* iOS font scaling */
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}
body {
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* 3) Typography: inherit fonts everywhere */
:where(body, button, input, select, textarea) {
  font: 400 1rem/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans,
    Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  color: inherit;
}

/* 4) Headings: keep weight, normalize spacing */
:where(h1, h2, h3, h4, h5, h6) {
  font-weight: 700;
  line-height: 1.2;
}

/* 5) Links */
a {
  color: inherit;
  text-decoration: none;
}
a:where(:hover) {
  text-decoration: underline;
}
a:where(:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* 6) Images & media */
:where(img, svg, video, canvas, audio, iframe, embed, object) {
  display: block;
}
:where(img, svg, video, canvas) {
  max-width: 100%;
  height: auto;
}

/* 7) Lists */
:where(ul, ol) {
  list-style: none;
  padding: 0;
}

/* 8) Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}
td,
th {
  padding: 0;
}

/* 9) Forms */
:where(button, input, select, textarea) {
  background: none;
  border: 1px solid transparent;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled {
  cursor: not-allowed;
}
textarea {
  resize: vertical;
}
:where(input[type='search']) {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}
::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-input-placeholder {
  opacity: 0.6;
}
::placeholder {
  opacity: 0.6;
}

/* 10) Fieldsets/legends */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}
legend {
  padding: 0;
}

/* 11) Abbreviations, code, kbd */
abbr[title] {
  text-decoration: underline dotted;
}
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}
pre {
  white-space: pre;
  overflow: auto;
}

/* 12) Details & summary */
details {
  display: block;
}
summary {
  cursor: pointer;
}

/* 13) Dialog */
dialog {
  margin: auto;
  border: none;
  padding: 0;
}

/* 14) Scroll behavior & focus */
:target {
  scroll-margin-block: 8rem;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* 15) Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 16) Print tweaks */
@media print {
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }
}
