:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;

  --failure: #f54927;
  --success: #6cf52766;
  --success-dark: #2cb50733;
  --primary: #b027f5;
  --reserve: #4169e155;
  --reserve-dark: #0129b1;
  --reserve-glass: #4169e1aa;
  --reserve-glass-2: #4169e111;
  --blacken: #000000;
  --lighten: #ffffff;
  --backgrd: #001111;
  --backgrd-lighten: #11222222;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100dvh;
}

/* Progressive enhancement for mobile browsers with retracting toolbars */
@media all and (display-mode: standalone) {
  html,
  body {
    height: 100svh;
  }
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1,
h2,
h3,
h4 {
  line-height: 1.1;
}

input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

img {
  display: block;
  max-inline-size: 100%;
}

body {
  max-width: 100dvw;

  background-color: var(--backgrd);
  color: var(--lighten);
  line-height: 1.5;

  @media (min-width: 992px) {
    margin: auto;
    max-width: 800px;
  }

  @media (min-width: 1200px) {
    margin: auto;
    max-width: 1024px;
  }

  @media (min-width: 1400px) {
    margin: auto;
    max-width: 1200px;
  }
}

@keyframes fadeOut {
  100% {
    opacity: 1;
  }
}

/* Visible focus for keyboard users, and a skip link before the navigation. */
:focus-visible {
  outline: 0.2rem solid var(--primary);
  outline-offset: 0.15rem;
}

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--lighten);
  color: var(--blacken);
  font-weight: 700;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.error {
  margin: 1rem;
  padding: 0.75rem 1rem;
  border-left: 0.3rem solid var(--failure);
  background: var(--backgrd-lighten);
}

@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;
  }
}
