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

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

:root {
  color-scheme: light;
  --ivory: #f4f4e8;
  --carbon: #20201f;
  --paprika: #e55b24;
  --muted: #65655e;
  --field-border: #8b8b82;
  --divider: #c8c8bc;
  --error: #a33717;
  font-family: "Inter", Arial, sans-serif;
  color: var(--carbon);
  background: var(--ivory);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

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

body {
  margin: 0;
  min-width: 280px;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: wait;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--carbon);
  outline-offset: 4px;
}

::selection {
  background: var(--paprika);
  color: var(--carbon);
}

.site-header {
  position: absolute;
  top: 32px;
  left: clamp(24px, 3.7vw, 72px);
}

.brand {
  display: inline-block;
}

.brand img {
  display: block;
  width: 246px;
  height: auto;
}

.auth-layout {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100svh;
  padding: 128px 24px 80px;
}

.auth {
  position: relative;
  width: 100%;
  max-width: 576px;
}

h1 {
  margin: 0 0 24px;
  font-family: "Inter Tight", "Inter", Arial, sans-serif;
  font-size: 28px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.6px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.field input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 16px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  background: transparent;
  color: var(--carbon);
  font-size: 16px;
  line-height: 24px;
  appearance: none;
}

.field input::placeholder {
  opacity: 1;
  color: var(--muted);
}

.field input:hover {
  border-color: var(--carbon);
}

.field input:focus {
  border-color: var(--carbon);
  outline: 1px solid var(--carbon);
  outline-offset: 0;
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  margin: 8px 0 0;
  color: var(--error);
  font-size: 13px;
  line-height: 1.5;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--carbon);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.button-primary {
  background: var(--paprika);
}

.button-primary:hover {
  background: #eb6a36;
}

.button-primary:active {
  border-color: var(--carbon);
}

.button:disabled {
  opacity: 0.65;
}

.auth-help {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}

.text-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--carbon);
}

.form-notice {
  position: absolute;
  top: 100%;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.form-notice:empty {
  display: none;
}

.form-notice.is-success {
  color: var(--carbon);
}

.auth-copy {
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-form .field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

[data-password-action] .form-notice {
  position: static;
  margin-top: 20px;
}

.token-guidance {
  margin: 20px 0 0;
  padding: 16px;
  border-left: 3px solid var(--paprika);
  background: #eaeade;
  color: var(--carbon);
  font-size: 14px;
  line-height: 1.55;
}

.token-guidance:empty {
  display: none;
}

.auth-return {
  margin: 24px 0 0;
  font-size: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .site-header {
    top: 28px;
    left: 24px;
  }

  .brand img {
    width: 205px;
  }

  .auth-layout {
    padding: 120px 24px 96px;
  }

  h1 {
    font-size: 27px;
  }
}

@media (max-height: 620px) {
  .auth-layout {
    align-items: start;
  }
}

@media (max-width: 360px) {
  .auth-layout {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
