/*
 * LC-GU-5: the one file that carries the sign-in card. The start page (`/`), the registration,
 * "forgot password", "new password" and "confirm email" use it, in the same form: a slim bar, a pale
 * classroom picture behind, a heading, one 340 px card. Everything is scoped to `.auth-*`, so the
 * shop pages that load `landing.css` are not touched.
 */
body {
  margin: 0;
  background: var(--agent-color-bg);
  color: var(--agent-color-text-primary);
}

[hidden] {
  display: none !important;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-bar {
  position: relative;
  z-index: 1;
  height: 56px;
  box-sizing: border-box;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--agent-color-surface);
  border-bottom: 1px solid var(--agent-color-border);
}

.auth-brand {
  font-family: var(--agent-font-display);
  font-weight: var(--fw-strong);
  font-size: var(--fs-md);
  color: var(--agent-color-text-primary);
  text-decoration: none;
}

.auth-bar-link {
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--agent-color-accent);
}

/* Decoration only: below the bar, pale and slightly blurred. */
.auth-bg {
  position: absolute;
  inset: 56px 0 0 0;
  background: url('/look-inside/img/classroom-desk.webp') center top / cover no-repeat;
  opacity: 0.16;
  filter: blur(1.5px);
  pointer-events: none;
}

.auth-main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 96px 16px 32px;
}

.auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 560px;
  text-align: center;
}

.auth-head h1 {
  margin: 0;
  font-family: var(--agent-font-display);
  font-weight: var(--fw-regular);
  font-size: var(--fs-xl);
  line-height: 1.25;
}

.auth-head p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--agent-color-text-secondary);
}

.auth-card {
  width: 340px;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--agent-color-surface);
  border: 1px solid var(--agent-color-border);
  border-radius: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-card-title {
  margin: 0;
  font-family: var(--agent-font-display);
  font-weight: var(--fw-regular);
  font-size: var(--fs-md);
  line-height: 1.25;
}

.auth-lede {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--agent-color-text-secondary);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-sm);
  color: var(--agent-color-text-secondary);
}

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

.auth-card input[type='email'],
.auth-card input[type='password'],
.auth-card input[type='text'] {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--agent-color-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: var(--fs-base);
  color: var(--agent-color-text-primary);
}

.auth-card input:focus-visible,
.auth-card button:focus-visible,
.auth-card a:focus-visible,
.auth-bar a:focus-visible {
  outline: 2px solid var(--agent-color-accent);
  outline-offset: 1px;
}

.auth-pw {
  position: relative;
  display: block;
}

.auth-pw input {
  padding-right: 40px;
}

.auth-eye {
  position: absolute;
  top: 1px;
  right: 2px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--agent-color-text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.auth-card .btn-primary {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border-radius: 8px;
  font-size: var(--fs-base);
  font-weight: var(--fw-strong);
}

.auth-card a,
.auth-card .link-button {
  color: var(--agent-color-accent);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.auth-card a:hover,
.auth-card .link-button:hover {
  color: var(--agent-color-accent-hover);
}

.auth-card .link-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.auth-switch {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--agent-color-text-secondary);
  text-align: center;
}

.auth-switch a,
.auth-switch .link-button {
  font-weight: var(--fw-strong);
}

.auth-note {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--agent-color-text-secondary);
  text-align: center;
}

.auth-card .form-error {
  margin: 0;
  color: var(--agent-color-danger);
  font-size: var(--fs-sm);
}

.auth-card .form-hint,
.auth-card .form-notice {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--agent-color-text-secondary);
}

.auth-card .password-count {
  min-height: 0;
}

.auth-card .age-confirm {
  min-height: 0;
}

.auth-card .register-turnstile {
  margin: 0;
}

/* The registration keeps what you get and what happens next, folded away under the card. */
.auth-info {
  width: 340px;
  max-width: 100%;
  box-sizing: border-box;
  font-size: var(--fs-sm);
  color: var(--agent-color-text-secondary);
}

.auth-info > summary {
  cursor: pointer;
  text-align: center;
  color: var(--agent-color-accent);
}

.auth-info h3 {
  margin: 12px 0 4px;
  font-family: var(--agent-font-display);
  font-size: var(--fs-base);
  color: var(--agent-color-text-primary);
}

.auth-info ul,
.auth-info ol {
  margin: 0;
  padding-left: 1.3rem;
}

.auth-info ul {
  list-style: none;
  padding-left: 0;
}

.auth-info li + li {
  margin-top: 4px;
}

.auth-info ul li::before {
  content: '✓ ';
  color: var(--agent-color-accent);
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.is-invite .sr-only {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Phone: the card is as wide as the screen minus the 16 px edge on each side. */
@media (max-width: 480px) {
  .auth-bar {
    padding: 0 16px;
  }

  .auth-main {
    padding-top: 32px;
  }

  .auth-card,
  .auth-info {
    width: 100%;
  }
}
