/* ==========================================================================
   AiNoted Modern CSS Reset — reset.css
   A minimal, opinion-light reset that provides a solid cross-browser
   foundation without fighting the cascade.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Box Sizing — Use border-box everywhere.
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Remove Default Margins & Padding
   -------------------------------------------------------------------------- */
*{
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Document Defaults
   -------------------------------------------------------------------------- */
html {
  /* Prevent font-size inflation on mobile */
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;

  /* Smooth scrolling for anchors (respects prefers-reduced-motion below) */
  scroll-behavior: smooth;

  /* Consistent tab size */
  tab-size: 4;
}

/* --------------------------------------------------------------------------
   Body Defaults
   -------------------------------------------------------------------------- */
body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------------------
   Media Elements — Responsive & block-level by default.
   -------------------------------------------------------------------------- */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
picture,
video {
  height: auto;
}

/* --------------------------------------------------------------------------
   Form Elements — Inherit typography from parent.
   -------------------------------------------------------------------------- */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

textarea {
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Anchor Links
   -------------------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
  text-decoration-skip-ink: auto;
}

/* --------------------------------------------------------------------------
   List Styles — Remove bullets/numbers from semantic lists.
   -------------------------------------------------------------------------- */
ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Table Defaults
   -------------------------------------------------------------------------- */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* --------------------------------------------------------------------------
   Typography Overflow
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Reduced Motion — Honour user accessibility preferences.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Miscellaneous Resets
   -------------------------------------------------------------------------- */

/* Remove built-in styling for dialog elements */
dialog {
  padding: 0;
}

/* Prevent fieldset from getting weird widths */
fieldset {
  min-width: 0;
  border: 0;
}

/* Remove summary marker in all browsers */
summary {
  cursor: pointer;
}

/* Hidden attribute support for older browsers */
[hidden] {
  display: none !important;
}
