/* ==========================================================================
   reset.css
   A modern baseline reset. Load this first, before any of your own styles.
   ========================================================================== */

/* 1. Predictable sizing everywhere. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margins. Set your own spacing deliberately instead. */
* {
  margin: 0;
}

/* 3. Root behaviour. */
html {
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text on rotate */
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
}

/* 4. Smooth scrolling and scroll-margin, unless the user opts out. */
html:focus-within {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-block: 5ex;
}

/* 5. Sensible body defaults. */
body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 6. Headings and short text shouldn't inherit the body line-height,
      and long words shouldn't blow out the layout. */
h1, h2, h3, h4, h5, h6, button, input, label {
  line-height: 1.2;
}

h1, h2, h3, h4, h5, h6 {
  /* text-wrap: balance; */
  font-size: inherit;
  font-weight: inherit;
}

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

/* 7. Media defaults to block-level and never overflows its container. */
img, picture, video, canvas, svg, iframe {
  display: block;
  max-width: 100%;
}

img, video {
  height: auto;
}

/* 8. Form elements inherit typography instead of using OS defaults. */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

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

textarea:not([rows]) {
  min-height: 10em;
}

/* Keep the resize handle from breaking layouts. */
textarea {
  resize: vertical;
}

/* 9. Lists used for navigation etc. — strip only when marked as such.
      Keeps semantics intact for content lists inside the editor. */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* 10. Links: no default underline removal — that's a design decision,
       not a reset. Just make colour inheritable where wanted. */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* 11. Tables. */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 12. Keep hr predictable. */
hr {
  height: 0;
  border: 0;
  border-top: 1px solid;
  color: inherit;
}

/* 13. Monospace elements shouldn't shrink. */
code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1em;
}

pre {
  overflow-x: auto;
}

/* 14. Visible keyboard focus. Never remove this without a replacement. */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* 15. Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

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

/* 16. Hidden should mean hidden. */
[hidden] {
  display: none !important;
}
