:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --facebook-blue: #0866ff;
  --facebook-blue-hover: #075ce5;
  --body-gray: #f0f2f5;
  --text: #1c1e21;
  --muted: #65676b;
  --border: #ccd0d5;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--body-gray);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.download-banner,
.language,
.mobile-logo,
.meta-brand {
  display: none;
}

.page-shell {
  width: min(980px, calc(100% - 40px));
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 580px) 396px;
  gap: 48px;
  align-items: center;
  padding: 78px 0 112px;
}

.desktop-copy {
  align-self: center;
  padding-bottom: 70px;
}

.desktop-copy h1 {
  margin: 0 0 10px;
  color: #0866ff;
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -2.5px;
  line-height: 1;
}

.desktop-copy p {
  max-width: 510px;
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.login-column {
  width: 100%;
  text-align: center;
}

.login-card {
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 10%),
    0 8px 16px rgb(0 0 0 / 10%);
}

.field {
  position: relative;
  margin-bottom: 12px;
}

.field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.field input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #dddfe2;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.field input::placeholder {
  color: #90949c;
}

.field input:focus {
  border-color: var(--facebook-blue);
  box-shadow: 0 0 0 2px rgb(24 119 242 / 15%);
}

.field input.invalid {
  border-color: #e41e3f;
}

.error {
  display: none;
  margin: 5px 3px 0;
  color: #b3142c;
  font-size: 12px;
  text-align: left;
}

.error.visible {
  display: block;
}

.login-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--facebook-blue);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
}

.login-button:hover {
  background: var(--facebook-blue-hover);
}

.login-button:focus-visible,
.forgot-link:focus-visible,
.create-button:focus-visible,
.download-banner:focus-visible {
  outline: 3px solid rgb(8 102 255 / 35%);
  outline-offset: 3px;
}

.form-message {
  min-height: 0;
  margin: 0;
  color: #385898;
  font-size: 12px;
}

.form-message.visible {
  min-height: 18px;
  margin-top: 8px;
}

.forgot-link {
  display: inline-block;
  margin: 16px 0 2px;
  color: #0866ff;
  font-size: 14px;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.desktop-divider {
  height: 1px;
  margin: 20px 0;
  background: #dadde1;
}

.create-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 6px;
  background: #42b72a;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.create-button:hover {
  background: #36a420;
}

.desktop-page-link {
  margin: 28px 0 0;
  font-size: 14px;
}

.desktop-page-link strong {
  font-weight: 700;
}

.desktop-footer {
  min-height: 160px;
  padding: 24px max(20px, calc((100% - 980px) / 2));
  background: #fff;
  color: #8a8d91;
  font-size: 12px;
}

.desktop-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dddfe2;
}

.desktop-footer a {
  text-decoration: none;
}

.desktop-footer a:hover {
  text-decoration: underline;
}

.desktop-footer p {
  margin-top: 20px;
}

@media (max-width: 760px) {
  body {
    min-width: 280px;
    background: #fff;
  }

  .download-banner {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid #e2e5e9;
    color: #216fbd;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
  }

  .download-banner svg {
    width: 25px;
    flex: 0 0 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .page-shell {
    width: 100%;
    min-height: calc(100svh - 58px);
    display: block;
    padding: 0;
  }

  .desktop-copy,
  .desktop-page-link,
  .desktop-footer {
    display: none;
  }

  .login-column {
    min-height: calc(100svh - 58px);
    display: flex;
    flex-direction: column;
    padding: 0 24px max(24px, env(safe-area-inset-bottom));
  }

  .language {
    display: block;
    margin: 50px 0 0;
    color: var(--muted);
    font-size: 14px;
  }

  .mobile-logo {
    width: 64px;
    height: 64px;
    margin: 45px auto 78px;
    display: block;
  }

  .mobile-logo svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .mobile-logo circle {
    fill: #0866ff;
  }

  .mobile-logo path {
    fill: #fff;
  }

  .login-card {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .field {
    margin-bottom: 12px;
  }

  .field input {
    height: 58px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 16px;
  }

  .login-button {
    min-height: 48px;
    margin-top: 6px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 400;
  }

  .forgot-link {
    margin: 25px 0 0;
    color: #1c1e21;
    font-size: 15px;
    font-weight: 500;
  }

  .desktop-divider {
    display: none;
  }

  .create-button {
    width: 100%;
    min-height: 48px;
    margin-top: clamp(70px, 15vh, 160px);
    border: 1.5px solid #0866ff;
    border-radius: 24px;
    background: #fff;
    color: #0866ff;
    font-size: 15px;
    font-weight: 500;
  }

  .create-button:hover {
    background: #f5f9ff;
  }

  .meta-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 26px 0 8px;
    color: #1c1e21;
    font-size: 15px;
    font-weight: 400;
  }

  .meta-brand svg {
    width: 25px;
    height: 25px;
    fill: #0866ff;
  }
}

@media (max-width: 380px), (max-height: 720px) and (max-width: 760px) {
  .language {
    margin-top: 26px;
  }

  .mobile-logo {
    width: 58px;
    height: 58px;
    margin-top: 28px;
    margin-bottom: 42px;
  }

  .create-button {
    margin-top: 48px;
  }
}

@media (min-width: 761px) and (max-width: 1040px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
  }

  .desktop-copy h1 {
    font-size: 52px;
  }

  .desktop-copy p {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
