@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi-900.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Satoshi", system-ui, sans-serif;
  color: #162638;
  background: #f2f7f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body.auth-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgb(58 214 130 / 15%), transparent 36rem),
    linear-gradient(135deg, #f4f8f8 0%, #e5f2f8 100%);
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 2.5rem 1.25rem;
}

.auth-brand {
  display: inline-flex;
  width: min(11.5rem, 60vw);
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.auth-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-card {
  width: min(100%, 34rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid rgb(21 67 96 / 12%);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 1.5rem 4.5rem rgb(22 38 56 / 11%);
}

.auth-card h1 {
  margin: 0 0 1.5rem;
  color: #154360;
  font-size: clamp(1.75rem, 6vw, 2.3rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.auth-card form {
  display: grid;
  gap: 0.75rem;
}

.auth-card form > label {
  margin-top: 0.5rem;
  color: #263c4c;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.auth-card input:not([type="hidden"]):not([type="checkbox"]),
.auth-card select {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #aabac5;
  border-radius: 0.55rem;
  background: #fff;
  color: #162638;
  font: 400 1rem/1.4 "Inter", system-ui, sans-serif;
}

.auth-card input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 0.45rem 0 0;
  accent-color: #13784a;
  vertical-align: -0.15rem;
}

.auth-card form > label:has(input[type="checkbox"]) {
  padding-block: 0.25rem;
}

.auth-card input:focus-visible,
.auth-card select:focus-visible,
.auth-card button:focus-visible,
.auth-card a:focus-visible,
.auth-brand:focus-visible,
.auth-home a:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid #087c4b;
  outline-offset: 3px;
}

.auth-card input[aria-invalid="true"],
.auth-card select[aria-invalid="true"] {
  border-color: #a52626;
}

.auth-card p[role="alert"] {
  margin: 0 0 0.35rem;
  padding: 0.8rem 0.9rem;
  border-left: 4px solid #a52626;
  border-radius: 0.35rem;
  background: #fff1f0;
  color: #762020;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
}

.auth-card form button {
  width: 100%;
  min-height: 3.15rem;
  margin-top: 0.65rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.55rem;
  background: #154360;
  color: #fff;
  cursor: pointer;
  font: 700 1rem/1.35 "Inter", system-ui, sans-serif;
  transition: background-color 140ms ease, transform 140ms ease;
}

.auth-card form button:hover {
  background: #0f354d;
}

.auth-card form button:active {
  transform: translateY(1px);
}

.auth-card > p:not([role="alert"]) {
  margin: 1rem 0 0;
  line-height: 1.55;
}

.auth-card a,
.auth-home a {
  color: #125f43;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.auth-home {
  margin: 0;
  color: #42586a;
  font-size: 0.9rem;
  text-align: center;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
  background: #162638;
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: #fff;
}

#auth-content:focus {
  outline: none;
}

@media (max-width: 36rem) {
  .auth-shell {
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 1rem 2rem;
  }

  .auth-brand {
    width: min(9.5rem, 60vw);
  }

  .auth-card {
    padding: 1.35rem 1.15rem;
    border-radius: 1rem;
  }

  .auth-card form {
    gap: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .auth-card form button,
  .skip-link {
    transition: none;
  }
}

/* Login: who the portal is for, and the way in for someone without an account. */
.auth-lead {
  margin: -0.75rem 0 1.5rem;
  color: #263c4c;
  font: 400 1rem/1.5 "Inter", system-ui, sans-serif;
}

.auth-alt {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(21 67 96 / 12%);
  color: #263c4c;
  font: 400 0.95rem/1.5 "Inter", system-ui, sans-serif;
}

.auth-alt a {
  color: #125f43;
  font-weight: 700;
  text-underline-offset: 0.18em;
}
