body {
  background: var(--support-bg);
  margin: 0;
  padding: 0;
}

body > main {
  margin: 0 auto;
  padding-bottom: 8rem;
}

main > p {
  width: 100%;
  text-align: center;
  max-width: min(95%, 1000px);
  margin: 0 auto 1rem;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  font-family: "owners-wide";
  padding: 0;
}

body:has(main > .no-user) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1 {
  margin: 0;
  padding: 0;
  font-family: "owners-wide";
  font-size: clamp(1.4rem, 3vw, 2rem) !important;
}

* {
  color: var(--support-text);
  box-sizing: border-box;
}

a.link {
  text-decoration: none;
  margin: 0;
  padding: 0;
  font-family: "owners-wide";
  width: fit-content !important;
  padding: 0.5rem 0;
  display: block;
  transition: opacity 0.2s;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
}

a.link:hover {
  opacity: 0.7;
}

header {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 3rem auto clamp(3rem, 5vw, 5rem);
  max-width: min(95%, 1000px);
}

.top {
  width: 100%;
  margin: 0 0 4rem;
  padding: 1rem 0;
  background: var(--support-text);
}

.top .container {
  width: 100%;
  max-width: min(90%, 1000px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top .container form input[type=submit] {
  background: var(--support-bg);
  color: var(--support-text);
}

.links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(1rem, 2vw, 2rem);
}

.link {
  color: var(--support-bg);
}

header.no-user picture#logo {
  translate: -1% 0;
  max-width: min(30%, 340px);
  min-width: 150px;
}

picture#logo {
  max-width: min(30%, 340px);
  display: block;
  overflow: hidden;
}

picture img {
  display: block;
  width: 100%;
  height: 100%;
}

@media screen and (max-width: 500px) {
  header {
    flex-direction: column;
    align-items: center;
  }

  header picture#logo {
    margin: 0 0 1.5rem;
  }

  header h1 {
    text-align: center;
  }

  .top .container form input[type=submit] {
    padding: 0.3rem 2rem;
  }
}
form.login-form {
  padding-bottom: 5rem;
}

form:not(#logout) {
  display: flex;
  flex-direction: column;
  max-width: min(95%, 1000px);
  margin: 0 auto;
}

form#logout {
  width: fit-content;
}

.form-field {
  display: block;
  margin: 0 0 clamp(1.2rem, 1.5vw, 1.5rem);
}

label {
  font-family: "owners-wide";
  display: block;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
}

.form-field input:not([type=checkbox]),
.form-field textarea,
.form-field select {
  width: 100%;
  display: block;
  outline: none;
  border: 1px solid var(--support-text);
  background: none;
  padding: 0.5rem 0.75rem;
  font-family: "owners-wide";
  font-size: clamp(1rem, 1.1vw, 1.2rem);
}

textarea {
  resize: none;
}

.form-field--checkbox {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--support-text);
}

.form-field--checkbox label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
  padding-right: 2%;
}

.form-field--checkbox .checkbox-label-text {
  display: block;
}

.form-field--checkbox .field-help {
  margin: 0.25rem 0 0;
}

.form-field--checkbox input[type=checkbox] {
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  margin: 0;
  position: relative;
  border: 1px solid var(--support-text);
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.2s;
}

.form-field--checkbox input[type=checkbox]:checked {
  background-color: var(--support-text);
}

.form-field--checkbox input[type=checkbox]::after {
  content: "";
  position: absolute;
  opacity: 0;
  transition: opacity 0.15s;
  top: 45%;
  left: 50%;
  height: 0.8rem;
  width: 0.2rem;
  border: 2px solid var(--support-bg);
  border-top: none;
  border-left: none;
  rotate: 45deg;
  translate: -50% -50%;
}

.form-field--checkbox input[type=checkbox]:checked::after {
  opacity: 1;
}

.form-field input[type=submit],
input[type=submit] {
  color: var(--support-bg);
  background: var(--support-text);
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
  margin: 0;
  padding: 0.5rem 3rem;
  appearance: none;
  outline: none;
  border: none;
  position: relative;
}

input[type=submit]:hover {
  opacity: 0.7;
}

input[type=submit]:disabled {
  cursor: default;
  opacity: 0.7;
}

input[type=submit].is-loading {
  color: transparent;
}

input[type=submit].is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
  border: 2px solid var(--support-bg);
  border-top-color: transparent;
  border-radius: 50%;
  animation: form-spin 0.7s linear infinite;
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}
.form-message {
  font-family: "owners-wide";
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
  border: 1px solid var(--support-text);
  max-width: min(95%, 1000px);
  margin-left: auto;
  margin-right: auto;
}

.form-message ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.form-field--error input:not([type=checkbox]),
.form-field--error textarea {
  border-width: 2px;
}

.field-error {
  display: block;
  font-family: "owners-wide";
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  margin-top: 0.35rem;
}

.field-help {
  display: block;
  font-family: "owners-wide";
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  opacity: 0.7;
  margin: 0.25rem 0 0.5rem;
}

.is-hidden {
  display: none !important;
}

.link.button-secondary {
  display: block;
  width: 100% !important;
  max-width: min(95%, 1000px);
  margin: 0 auto 1.5rem;
  color: var(--support-bg);
  background: var(--support-text);
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 0.5rem 3rem;
  appearance: none;
  outline: none;
  border: none;
  font-family: "owners-wide";
  font-size: clamp(1rem, 1.1vw, 1.2rem);
  text-align: center;
}

.button-secondary:hover {
  opacity: 0.7;
}