@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/atkinson-hyperlegible-400.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/atkinson-hyperlegible-700.woff2") format("woff2"); }

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700.woff2") format("woff2");
}

:root {
  --paper: #F5F4EF;
  --ink: #12172B;
  --ink-soft: #4B5170;
  --indigo: #2B3A8F;
  --indigo-dark: #212E73;
  --teal: #0C8F8A;
  --teal-text: #08736F;
  --teal-soft: #E4F3F2;
  --white: #FFFFFF;
  --line: #E3E1D8;
  --danger: #A8322D;
  --danger-soft: #FBE9E7;
  --success: #126B4D;
  --success-soft: #E7F5EE;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-context {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.auth-context::after {
  position: absolute;
  right: -84px;
  bottom: 12%;
  width: 220px;
  height: 292px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 2px;
  content: "";
  transform: rotate(8deg);
}

.brand-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--white);
  font-family: "Atkinson Hyperlegible", "Arial Narrow", sans-serif;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -.02em;
}

.brand-link em {
  color: #9DD5D1;
  font-style: normal;
  font-weight: 500;
}

.logo-mark {
  position: relative;
  width: 22px;
  height: 25px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 4px;
  background:
    linear-gradient(currentColor, currentColor) 4px 5px / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 10px / 11px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 15px / 6px 2px no-repeat;
}

.logo-mark::after {
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--white);
  background: var(--teal);
  content: "✓";
  font-size: 8px;
  line-height: 12px;
  text-align: center;
}

.context-copy {
  position: relative;
  z-index: 1;
  max-width: 430px;
  padding: 64px 0;
}

.context-copy h1 {
  max-width: 12ch;
  margin: 0 0 20px;
  font-family: "Atkinson Hyperlegible", "Arial Narrow", sans-serif;
  font-size: clamp(35px, 4.2vw, 58px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.context-copy p {
  max-width: 42ch;
  margin: 0;
  color: #C6C9D6;
  font-size: 15px;
  line-height: 1.72;
}

.context-proof {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 360px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.context-proof li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #E5E6EC;
  font-size: 13px;
}

.context-proof li::before {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  flex: 0 0 auto;
  border: 2px solid var(--teal);
  border-radius: 50%;
  content: "";
}

.context-folio {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9297AA;
  font-size: 12px;
}

.context-folio::before {
  width: 34px;
  height: 1px;
  background: rgba(255, 255, 255, .26);
  content: "";
}

.auth-main {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(40px, 7vw, 96px) clamp(22px, 7vw, 96px);
  background:
    linear-gradient(90deg, transparent 23px, rgba(227, 225, 216, .52) 24px, transparent 25px) 0 0 / 24px 24px,
    var(--paper);
}

.auth-sheet {
  position: relative;
  width: min(100%, 540px);
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  box-shadow: 12px 14px 0 -5px var(--paper), 12px 14px 0 -4px var(--line);
}

.auth-sheet::before {
  position: absolute;
  top: -29px;
  left: 28px;
  min-width: 118px;
  height: 29px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  color: var(--indigo);
  background: var(--white);
  content: attr(data-step);
  font-family: "Atkinson Hyperlegible", "Arial Narrow", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 29px;
}

.sheet-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--teal-text);
  font-size: 13px;
  font-weight: 700;
}

.sheet-kicker::before {
  width: 22px;
  height: 2px;
  background: currentColor;
  content: "";
}

.auth-sheet h2 {
  max-width: 15ch;
  margin: 0;
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", "Arial Narrow", sans-serif;
  font-size: clamp(29px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.sheet-intro {
  max-width: 52ch;
  margin: 14px 0 30px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.auth-form,
.forgot-panel {
  display: grid;
  gap: 19px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #C9C8C2;
  border-radius: 5px;
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
}

.field input:hover {
  border-color: #9D9B93;
}

.field input:focus {
  border-color: var(--indigo);
  outline: 3px solid rgba(43, 58, 143, .16);
}

.field-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.form-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid var(--indigo);
  border-radius: 5px;
  color: var(--white);
  background: var(--indigo);
  font-family: "Atkinson Hyperlegible", "Arial Narrow", sans-serif;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.form-action:hover:not(:disabled) {
  border-color: var(--indigo-dark);
  background: var(--indigo-dark);
}

.form-action:disabled {
  cursor: wait;
  opacity: .58;
}

.text-action {
  width: fit-content;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--indigo);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.form-status.is-error,
.form-status.is-success {
  padding: 10px 12px;
  border-left: 3px solid currentColor;
}

.form-status.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.form-status.is-success {
  color: var(--success);
  background: var(--success-soft);
}

.token-line,
.recovery-waiting {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: #FAFAF7;
  font-size: 12px;
}

.token-line::before,
.recovery-waiting::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.forgot-panel {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.forgot-panel h3 {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Arial Narrow", sans-serif;
  font-size: 20px;
}

.forgot-panel > p {
  margin: -10px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.sheet-footer {
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.form-action-secondary {
  margin-top: 10px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

.sheet-footer a {
  color: var(--indigo);
  font-weight: 700;
  text-underline-offset: 3px;
}

@media (max-width: 780px) {
  .auth-layout {
    display: block;
  }

  .auth-context {
    min-height: auto;
    padding: 22px;
  }

  .auth-context::after,
  .context-copy,
  .context-folio {
    display: none;
  }

  .auth-main {
    min-height: calc(100vh - 69px);
    place-items: start center;
    padding: 62px 18px 48px;
  }

  .auth-sheet {
    padding: 30px 22px;
    box-shadow: 7px 8px 0 -3px var(--paper), 7px 8px 0 -2px var(--line);
  }
}

@media (max-width: 420px) {
  .auth-sheet h2 {
    font-size: 29px;
  }

  .auth-main {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
