*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

body {
  font-size: 0.9rem;
  line-height: 1.5;
  font-family: monospace;
  -webkit-font-smoothing: antialiased;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

hr {
  border: 0; border-top: 1px solid #e5e7eb; margin: 0;
}

header, nav, main, footer {
  width: 100%;
  max-width: 1199px;
  margin: 0 auto;
  padding: 1.5rem;
}

header {
  border-bottom: 1px solid #e5e7eb;
}

nav {
  border-bottom: 1px solid #e5e7eb;
}

footer {
  border-top: 1px solid #e5e7eb;
}

header a {
  color: inherit; /* Inherits the default text color instead of browser blue */
  text-decoration: none; /* Removes the default underline */
  border-bottom: 2px solid transparent;

  font-size: 2rem;
}

header a:hover {
  border-bottom: 2px solid #000; /* A sharp underline appears on hover */
}

main {
  flex: 1 0 auto;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

article {
  width: 100%;
  max-width: 799px;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid #ccc;
}

article + article {
  border-top: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

small {
  font-size: 0.75rem;
  font-weight: normal;
  text-transform: none;
  color: #666;
  margin-top: 0.25rem;
}

label {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05ch;
}

::selection {
  background-color: #000;
  color: #fff;
}

input, button {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
}

input:user-invalid {
  border-color: #ff0000;
  color: #ff0000;
}

input:user-invalid:focus {
  border-color: #ff0000;
  outline: 1px solid #ff0000;
}

button {
  background: transparent;
  border: 1px solid #000;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.1s, color 0.1s;
}

button:hover {
  background-color: #000;
  color: #fff;
}

input {
  border: 1px solid #ccc;
  outline: none;
}

input:focus {
  border-color: #000;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  margin-bottom: 1rem;
  max-width: 100%;
  line-height: 1.6;
}

nav a {
  color: #666;
  text-decoration: none;
}

nav a:hover {
  transition: 100ms;
  color: #000;
  border-bottom: 2px solid #000;
}

.footer-nav {
  border-bottom: none;
  padding: 1rem 0 0.5rem 0;
  display: flex;
  justify-content: center;
}

.footer-nav ul {
  justify-content: center;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.85rem;
  border-bottom: 1px solid transparent;
  transition: color 0.1s, border-color 0.1s;
}

.loader {
  width: 24px;
  height: 24px;
  border: 3px solid #334155;
  border-bottom-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}