html {
  box-sizing: border-box;
  font-size: $fs-root;
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-overflow-style: scrollbar;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

@at-root {
  @-ms-viewport { width: device-width; }
}

[tabindex="-1"]:focus {
  outline: none !important;
}

body {
  font-family: $font-family;
  font-size: $fs;
  line-height: $lh;
  color: $body-color;
  background-color: $body-bg;
  margin: 0;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section,
summary {
  display: block;
}

audio,
canvas,
progress,
video {
  display: inline-block;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

template,
[hidden] {
  display: none !important;
}

p {
  margin-top: 0;
  margin-bottom: $spacer;
}

ol, ul, dl {
  margin-top: 0;
  margin-bottom: $spacer;
}

ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}

blockquote {
  margin: 0 0 $spacer;
}

a {
  color: $link-color;
  text-decoration: $link-decoration;
  background-color: transparent;

  &:active,
  &:hover {
    outline-width: 0;
  }

  &:hover,
  &:focus {
    color: $link-hover-color;
    text-decoration: $link-hover-decoration;
  }

  &:focus {
    @include tab-focus();
  }
}

a:not([href]):not([tabindex]) {
  color: inherit;
  text-decoration: none;

  &:hover,
  &:focus {
    color: inherit;
    text-decoration: none;
  }

  &:focus {
    outline: none;
  }
}

b, strong {
  font-weight: bolder;
}

img {
  border-style: none;
  vertical-align: middle;
  max-width: 100%;
}

svg:not(:root) {
  overflow: hidden;
}

figure {
  margin: 0 0 $spacer;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

a,
area,
button,
[role="button"],
input,
label,
select,
summary,
textarea {
  touch-action: manipulation;
}

optgroup {
  font-weight: bold;
}

button,
input,
select {
  overflow: visible;
}

button,
input,
select,
textarea {
  font: inherit;
  margin: 0;
  line-height: inherit;
  border-radius: 0;
}

button,
select {
  text-transform: none;
}

button:focus {
  outline: 1px dotted;
  outline: 5px auto -webkit-focus-ring-color;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  cursor: pointer;
  -webkit-appearance: button;
}

[disabled] {
  cursor: default;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

button:-moz-focusring,
input:-moz-focusring {
  outline: 1px dotted ButtonText;
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 0;
  margin-bottom: $spacer0;
  font-size: 1.5rem;
  line-height: inherit;
  color: inherit;
  max-width: 100%;
  white-space: normal;
}

label {
  display: inline-block;
  margin-bottom: $spacer0;
}

textarea {
  overflow: auto;
  resize: vertical;
}

input[type="radio"],
input[type="checkbox"] {
  box-sizing: border-box;
  padding: 0;
  &:disabled {
    cursor: not-allowed;
  }
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
  -webkit-appearance: listbox;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: none;
}

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

table {
  border-collapse: collapse;
  background-color: transparent;
}

caption {
  padding-top: .75rem;
  padding-bottom: .75rem;
  color: $text-muted;
  text-align: left;
  caption-side: bottom;
}

th {
  text-align: left;
}
