:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #292323;
  background: #fff9f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --coral: #ed6473;
  --coral-dark: #d84c61;
  --muted: #716866;
  --line: #eee3e1;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.page-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 27px clamp(20px, 7vw, 100px) 20px;
}

.wordmark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  color: #292323;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: var(--coral);
  color: white;
  font-size: 20px;
}

.login-layout {
  display: grid;
  width: min(1050px, 100%);
  flex: 1;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: clamp(40px, 8vw, 110px);
  margin: 26px auto 38px;
}

.welcome-panel { max-width: 490px; }
.eyebrow { margin: 0 0 12px; color: var(--coral-dark); font-size: 10px; font-weight: 850; letter-spacing: .15em; }
.welcome-panel h1 { margin: 0; font-size: clamp(37px, 5vw, 58px); line-height: 1.08; letter-spacing: -.055em; }
.welcome-copy { max-width: 410px; margin: 22px 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.welcome-note { display: flex; align-items: center; gap: 10px; color: #514846; font-size: 12px; font-weight: 700; }
.note-icon { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 50%; background: #fce4e1; color: var(--coral-dark); }
.account-help { max-width: 370px; margin: 36px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.account-help a, footer a { color: var(--coral-dark); font-weight: 750; text-decoration: none; }
.account-help a:hover, footer a:hover { text-decoration: underline; }

.auth-card {
  min-height: 420px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px rgb(65 45 42 / 8%);
}

.auth-card h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.04em; }
.card-copy { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-card label { display: block; margin: 18px 0 7px; color: #3b3332; font-size: 11px; font-weight: 750; }
.auth-card input { width: 100%; min-height: 45px; padding: 11px 12px; border: 1px solid #e5dcda; border-radius: 9px; outline: none; background: #fff; color: #292323; font-size: 13px; }
.auth-card input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgb(237 100 115 / 13%); }
.password-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.password-label label { margin-bottom: 7px; }
.text-button { padding: 3px 0; border: 0; background: none; color: var(--coral-dark); font-size: 10px; font-weight: 750; }
.password-field { position: relative; }
.password-field input { padding-right: 65px; }
.toggle-password { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); padding: 5px; border: 0; background: transparent; color: #675e5c; font-size: 10px; font-weight: 750; }
.form-message { min-height: 18px; margin: 11px 0 7px; color: #b42335; font-size: 11px; line-height: 1.5; }
.primary-button, .secondary-button { display: flex; width: 100%; min-height: 45px; align-items: center; justify-content: center; gap: 9px; padding: 10px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 800; }
.primary-button { background: var(--coral); color: white; }
.primary-button:hover:not(:disabled) { background: var(--coral-dark); }
.primary-button:disabled { cursor: wait; opacity: .75; }
.secondary-button { border-color: var(--line); background: white; color: #393130; }
.secondary-button:hover { background: #fff6f4; }
.button-spinner, .spinner { width: 16px; height: 16px; border: 2px solid rgb(255 255 255 / 45%); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; }
.button-spinner { display: none; width: 14px; height: 14px; }
.primary-button.is-loading .button-spinner { display: inline-block; }
.checking-state { display: flex; min-height: 340px; align-items: center; justify-content: center; gap: 11px; color: var(--muted); font-size: 12px; }
.spinner { width: 19px; height: 19px; border-color: #f5ccd0; border-top-color: var(--coral); }
.no-signup { margin: 16px 0 0; color: #817875; text-align: center; font-size: 9px; line-height: 1.5; }
.verified-state { display: flex; min-height: 340px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.verified-icon { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 19px; border-radius: 50%; background: #e7f7ee; color: #21834f; font-size: 24px; font-weight: 800; }
.verified-state .eyebrow { margin-bottom: 8px; }
.verified-state .card-copy { max-width: 310px; margin-bottom: 14px; }
.account-email { margin: 0 0 20px; color: var(--muted); font-size: 11px; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); font-size: 10px; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .page-shell { padding: 20px 18px 14px; }
  .login-layout { max-width: 500px; grid-template-columns: 1fr; gap: 25px; margin: 36px auto 28px; }
  .welcome-panel { max-width: none; }
  .welcome-panel h1 { max-width: 500px; font-size: clamp(34px, 9vw, 48px); }
  .welcome-copy { margin: 14px 0; font-size: 13px; }
  .account-help { margin-top: 17px; }
  .auth-card { min-height: 0; padding: 26px 22px; }
  .checking-state, .verified-state { min-height: 270px; }
  footer { align-items: flex-start; flex-direction: column; }
}
