/* Login and signup. Uses the same tokens and type as the homepage. */
:root {
  color-scheme: light;
  --paper: #f4f9fc;
  --white: #ffffff;
  --ink: #0a2233;
  --muted: #3f5d73;
  --rule: #cfe2ee;
  --sky-100: #e2f1fa;
  --sky-200: #bfe2f5;
  --sky-400: #38bdf8;
  --sky-600: #0275b5;
  --sky-700: #025f94;
  --sky-900: #073451;
  --danger: #9a1c12;
  --danger-bg: #fdecea;
  --display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--sky-200);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--sky-400);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--ink);
}

.auth-head {
  border-bottom: 1px solid var(--rule);
}

.auth-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}

.brand svg {
  width: 34px;
  height: 34px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.auth-main {
  display: grid;
  place-items: start center;
  padding: 72px 0 96px;
}

.auth-panel {
  width: min(440px, 100%);
}

.auth-panel h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0;
}

.auth-panel .lede {
  font-size: 19px;
  color: var(--muted);
  margin: 16px 0 36px;
}

.error {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 24px;
}

.google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.google:hover {
  background: var(--sky-100);
}

.google svg {
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  margin: 28px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

form {
  display: grid;
  gap: 20px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.hint {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

input,
select {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 13px 16px;
}

input::placeholder {
  color: #6f8798;
}

input:focus,
select:focus {
  outline: 3px solid var(--sky-400);
  outline-offset: 0;
  border-color: var(--sky-600);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 80px;
}

.toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--sky-700);
  cursor: pointer;
  padding: 6px;
}

.submit {
  width: 100%;
  background: var(--sky-600);
  color: var(--white);
  border: 0;
  border-radius: 14px;
  padding: 16px 20px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit:hover {
  background: var(--sky-700);
}

.submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.switch {
  margin-top: 32px;
  font-size: 15px;
  color: var(--muted);
}

.switch a {
  font-weight: 700;
  color: var(--sky-900);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--sky-400);
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .auth-main {
    padding: 48px 0 72px;
  }
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 15px;
  margin: 0;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--sky-600);
}

.notice {
  background: var(--sky-100);
  color: var(--sky-900);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  margin: 0 0 20px;
}

.field-row a {
  font-size: 14px;
  font-weight: 600;
  color: var(--sky-700);
}

@media (max-width: 480px) {
  .name-row {
    grid-template-columns: 1fr;
  }
}
