:root,
html,
body {
  padding: 0;
  margin: 0;
  font-size: 16px;
  font: #{$font-size-base}/#{$line-height-default} #{$font-family-base};
  background-color: $body-bg;

  min-height: 100vh;
  color: $gray-900;
  width: 100%;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-weight: $font-weight-semibold;
  display: block;
}

h1,
.h1 {
  font-size: $font-size-h1;
}

h2,
.h2 {
  font-size: $font-size-h2;
}

h3,
.h3 {
  font-size: $font-size-h3;
}

h4,
.h4 {
  font-size: $font-size-h4;
}

h5,
.h5 {
  font-size: $font-size-h5;
}

h6,
.h6 {
  font-size: $font-size-h6;
}

svg,
img {
  vertical-align: middle;
}

code {
  padding: 2px 4px;
  font-size: 90%;

  color: $red-600;
  background-color: $red-000;

  border-radius: 3px;
}

::-webkit-input-placeholder {
  /* Chrome */
  color: $gray-300;
}

:-ms-input-placeholder {
  /* IE 10+ */
  color: $gray-300;
}

::-moz-placeholder {
  /* Firefox 19+ */
  color: $gray-300;
  opacity: 1;
}

:-moz-placeholder {
  /* Firefox 4 - 18 */
  color: $gray-300;
  opacity: 1;
}

hr {
  margin: 1rem 0;
  height: 0;

  border: 0;
  border-top: 1px solid $gray-200;
}

// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
//
// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present.
// However, they DO support removing the click delay via `touch-action: manipulation`.
// Stolen shamelessly from Bootstrap
//
// See:
// * https://getbootstrap.com/docs/4.0/content/reboot/#click-delay-optimization-for-touch
// * https://caniuse.com/#feat=css-touch-action
// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
// * https://github.com/twbs/bootstrap/blob/20765b50258e6d28071ec5da26067294f2714d9e/scss/_reboot.scss#L282-L302

a,
area,
button,
[role='button'],
input:not([type='range']),
label,
select,
summary,
textarea {
  touch-action: manipulation;
}

a {
  text-decoration: none;
  transition: 0.15s;
  color: $blue;

  &:hover {
    color: darken($blue, 7.5%);
  }
}

ul,
ol,
dl,
dd,
dt {
  padding: 0;
  margin: 0;
}

ul {
  list-style-type: none;
}

select {
  appearance: none;
}

button {
  text-rendering: geometricPrecision;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  margin-bottom: 0.7em;
  line-height: 1;
  margin-top: 0;
}

template {
  display: none; // Add the correct display in IE
}

// Always hide an element with the `hidden` HTML attribute (from PureCSS).
// Needed for proper display in IE 10-.
// Add in the Vue [v-cloak] directive as well.
[hidden],
[v-cloak] {
  display: none !important;
}

// Add padding to the top for the navigation topbar that may or may not be visible.
body {
  padding-top: $topbar-outer-height;
}
