/* ParaPrep, shared styles for the auth/onboarding pages (Brief 3).
   Loaded after styles.css; reuses its tokens (--teal, --line, --radius, …)
   and the shared .btn / .card classes. */

.auth-main {
  max-width: 460px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}
.auth-card h2 {
  font-size: 1.4rem;
  margin: 0 0 0.3rem;
  letter-spacing: -0.02em;
}
.auth-card .sub {
  color: var(--muted);
  margin: 0 0 1.4rem;
  font-size: 0.92rem;
}

/* Fields */
.field {
  margin-bottom: 1.05rem;
}
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}
.field label .optional {
  color: var(--muted);
  font-weight: 400;
}
.field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.field input[aria-invalid="true"] {
  border-color: var(--red);
}
.field .hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
}
.field .error {
  font-size: 0.8rem;
  color: var(--red);
  margin: 0.3rem 0 0;
}

/* Password show/hide */
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 4.4rem;
}
.pw-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  min-height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.7rem;
}

/* Password strength meter */
.pw-meter {
  display: flex;
  gap: 4px;
  margin-top: 0.5rem;
}
.pw-meter span {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}
.pw-meter.s1 span:nth-child(-n + 1),
.pw-meter.s2 span:nth-child(-n + 2),
.pw-meter.s3 span:nth-child(-n + 3),
.pw-meter.s4 span:nth-child(-n + 4) {
  background: var(--teal);
}
.pw-meter-label {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
}

/* GDPR consent row */
.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.4rem 0 1.2rem;
  font-size: 0.86rem;
}
.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

/* OAuth + divider */
.btn.block {
  width: 100%;
}
.btn.oauth {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}
.btn.oauth:hover {
  background: #f8fbfb;
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 1.2rem 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Banners */
.banner {
  border-radius: 9px;
  padding: 0.8rem 1rem;
  font-size: 0.87rem;
  margin-bottom: 1.2rem;
}
.banner.error {
  background: #fbe9e7;
  color: var(--red);
  border: 1px solid #f3c9c2;
}
.banner.info {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border: 1px solid #c7e6e3;
}
.banner.warn {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid #f0e3c4;
}
.banner .status-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 0.4rem;
}
.banner code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

/* Footer links / helper text under a form */
.auth-foot {
  margin-top: 1.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}
.auth-foot a {
  font-weight: 700;
  color: var(--teal-dark);
}
.row-between {
  display: flex;
  justify-content: flex-end;
  margin: -0.4rem 0 1rem;
}
.row-between a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-dark);
}

/* Onboarding level choices */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.choice {
  text-align: left;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.choice:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.choice[aria-pressed="true"] {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.choice strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.choice span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Visible focus everywhere (keyboard accessibility) */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
}
