:root {
  --ink: #111111;
  --muted: #8a8a8a;
  --line: #e8e8e8;
  --paper: #ffffff;
  --danger: #c64545;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Apple SD Gothic Neo", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button:disabled {
  cursor: default;
  opacity: 0.58;
}

a {
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  background: var(--paper);
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: calc(72px + env(safe-area-inset-top));
  padding: calc(env(safe-area-inset-top) + 12px) 20px 0;
  background: #fff;
}

.auth-header-side {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 96px;
}

.auth-header-side.right {
  justify-content: flex-end;
}

.auth-header button,
.auth-header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.auth-header svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.auth-brand-wordmark {
  transform: skewX(-11deg);
}

.auth-main {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 48px 28px 80px;
}

.hero-copy {
  margin-bottom: 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.hero-copy p {
  margin: 14px 0 0;
  color: #5f5f5f;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
}

.step-pill,
.intent-box,
.session-box,
.error-box {
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.65;
}

.step-pill {
  color: var(--muted);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intent-box,
.session-box {
  padding: 14px 16px;
  color: #555555;
  background: #f8f8f8;
  border-radius: 14px;
}

.error-box {
  color: var(--danger);
  padding: 14px 16px;
  background: #fff7f7;
  border-radius: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 24px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.field input,
.field select {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #ececec;
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -0.01em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder {
  color: #c8c8c8;
}

.field input:focus,
.field select:focus {
  border-color: #d0d0d0;
}

.field select {
  font-size: 18px;
}

.field-hint {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.button-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.primary-button,
.secondary-button,
.google-button {
  width: 100%;
  min-height: 56px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--ink);
  color: #ffffff;
}

.secondary-button,
.google-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.switch-copy {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  color: #555555;
  font-size: 15px;
}

.switch-copy::before,
.switch-copy::after {
  content: "";
  width: 1px;
  height: 14px;
  background: #dddddd;
}

.switch-copy.no-dividers::before,
.switch-copy.no-dividers::after {
  display: none;
}

.inline-link-button,
.text-link {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.oauth-list {
  width: 100%;
  margin-top: 20px;
}

.oauth-button {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  border: 1px solid #ececec;
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.oauth-mark {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.oauth-mark.google {
  color: #4285f4;
}

.oauth-mark.phone {
  color: var(--ink);
}

.signup-switch {
  margin-top: 24px;
}

@media (max-width: 720px) {
  .auth-header {
    padding-inline: 16px;
  }

  .auth-header-side {
    min-width: 40px;
  }

  .auth-header-side.right {
    display: none;
  }

  .auth-brand {
    font-size: 26px;
  }

  .auth-main {
    width: 100%;
    padding: 42px 20px 56px;
  }

  .hero-copy {
    margin-bottom: 34px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .field input,
  .field select {
    height: 52px;
    font-size: 18px;
  }

  .auth-form {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .primary-button,
  .secondary-button,
  .google-button,
  .oauth-button {
    min-height: 52px;
    font-size: 16px;
    border-radius: 12px;
  }

  .helper-links {
    gap: 12px;
    font-size: 13px;
  }
}
