/* 1. Box model
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

/* 2. Root: 1rem = 10px, crisp text rendering
   -------------------------------------------------------------------------- */
html {
  font-size: 62.5%; /* 62.5% of the browser default (16px) = 10px; still honors user settings */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 3. Meyer reset: clear margin, padding, border and font styling
   -------------------------------------------------------------------------- */
body,
div,
span,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
address,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strong,
var,
b,
u,
i,
dl,
dt,
dd,
ol,
ul,
menu,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
dialog,
embed,
figure,
figcaption,
footer,
header,
main,
nav,
output,
picture,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

hr {
  height: 0;
  margin: 0;
  border: 0;
  color: inherit;
  overflow: visible;
}

/* 4. Base typography
   -------------------------------------------------------------------------- */
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 1.6rem; /* 16px, so body text isn't stuck at 10px */
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  overflow-wrap: break-word;
}

/* Inline semantics that Meyer's original wipes out */
b,
strong {
  font-weight: bolder;
}
em,
i,
cite,
dfn,
var,
address {
  font-style: italic;
}
small {
  font-size: 80%;
}

sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}

pre,
code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono',
    monospace;
  font-size: 1em;
}

/* 5. Lists, quotes, tables
   -------------------------------------------------------------------------- */
ol,
ul,
menu {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}
blockquote::before,
blockquote::after,
q::before,
q::after {
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}
th {
  text-align: inherit;
}

/* 6. Media
   -------------------------------------------------------------------------- */
img,
picture,
video,
canvas {
  display: block; /* removes the stray baseline gap under images */
  max-width: 100%;
}
img,
video {
  height: auto;
}

/* 7. Forms: inherit typography from the page
   -------------------------------------------------------------------------- */
button,
input,
select,
textarea,
optgroup {
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

button,
select {
  text-transform: none;
}

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

textarea {
  resize: vertical;
}

fieldset {
  min-width: 0;
}

/* 8. Utilities
   -------------------------------------------------------------------------- */
[hidden]:not([hidden='until-found']) {
  display: none;
}

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