/* Sign-in polish for UI_WELCOME_V2. Loaded only when that flag is on.
   The lens, logo, and dial stay on the rules in login.css. */

.welcome-v2 .wordmark {
  font-weight: 900;
  letter-spacing: -0.038em;
}

.welcome-v2 .welcome-line {
  font-weight: 500;
  letter-spacing: 0.02em;
}

.welcome-v2 .welcome-next {
  margin: clamp(2px, 0.6vh, 6px) 0 0;
  color: #f0d48a;
  font-weight: 650;
  font-size: clamp(15px, 2.2vh, 19px);
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: none;
}

.welcome-v2 .say {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(8px, 1.4vh, 14px);
  padding: 2px 4px 2px 14px;
  letter-spacing: 0;
  line-height: 1;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(232, 201, 122, 0.85);
  border-radius: 999px;
}

.welcome-v2 .say-text {
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: clamp(15px, 2vh, 18px);
  color: #ffffff;
}

.welcome-v2 .say-hear {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #e8c97a;
  background: rgba(13, 24, 39, 0.62);
  color: #f0d48a;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.welcome-v2 .say-hear svg { display: block; width: 16px; height: 16px; }

.welcome-v2 .say-hear:hover {
  background: rgba(240, 212, 138, 0.16);
  color: #f7f4ef;
}

.welcome-v2 .say-hear:focus {
  outline: none;
}

.welcome-v2 .say-hear:focus-visible {
  outline: 2px solid #f7f4ef;
  outline-offset: 3px;
}

.welcome-v2 .say-hear.is-playing {
  background: #d0aa48;
  color: #0d1827;
  border-color: #f0d48a;
}

.welcome-v2 .side { width: min(500px, 42vw); }

.welcome-v2 .lens-line { text-wrap: balance; }
.welcome-v2 .lens-line .nowrap { white-space: nowrap; }

.welcome-v2 .login-card {
  width: min(400px, 100%);
  padding: 14px 18px 14px;
  border-radius: 8px;
}

.welcome-v2 .login-card h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.welcome-v2 .login-card form { gap: 4px; }

.welcome-v2 .login-card label {
  margin-top: 4px;
  letter-spacing: 0.12em;
}

.welcome-v2 .login-card input {
  padding: 8px 12px;
  font-size: 14px;
}

.welcome-v2 .login-card button {
  margin-top: 10px;
  padding: 13px 28px;
}

.welcome-v2 .legal-block {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(30, 45, 74, 0.14);
}

.welcome-v2 .legal-disclaimer {
  margin: 0;
  color: #3a4658;
  font-size: 11px;
  font-weight: 450;
  line-height: 1.45;
  letter-spacing: 0.004em;
  text-transform: none;
}

.welcome-v2 .legal-disclaimer.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.welcome-v2 .login-card button.legal-more {
  width: auto;
  justify-self: start;
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  font: 600 11px/1.4 var(--sans);
  letter-spacing: 0.01em;
  text-transform: none;
  color: #1e2d4a;
  text-decoration: underline;
  text-decoration-color: #d0aa48;
  text-underline-offset: 2px;
  cursor: pointer;
}

.welcome-v2 .login-card button.legal-more::after { content: none; }

.welcome-v2 .login-card button.legal-more:hover {
  transform: none;
  box-shadow: none;
  color: #8a6d22;
}

.welcome-v2 .login-card button.legal-more:focus {
  outline: none;
}

.welcome-v2 .login-card button.legal-more:focus-visible {
  outline: 2px solid #1e2d4a;
  outline-offset: 3px;
}

.welcome-v2 .agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.welcome-v2 .agree-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: #b69030;
  border-radius: 2px;
  box-shadow: none;
  cursor: pointer;
}

.welcome-v2 .agree-row input[type="checkbox"]:focus {
  outline: 2px solid #1e2d4a;
  outline-offset: 2px;
  box-shadow: none;
}

.welcome-v2 .agree-row label {
  margin: 0;
  color: #1e2d4a;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.35;
  text-transform: none;
  cursor: pointer;
}

.welcome-v2 .login-card button[type="submit"]:disabled,
.welcome-v2 .login-card button[type="submit"]:disabled:hover {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.welcome-v2 .login-card button[type="submit"]:disabled::after { content: none; }

.welcome-v2 .credit {
  width: min(400px, 100%);
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(232, 201, 122, 0.8);
  text-align: left;
  line-height: 1.2;
  color: #f0d48a;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: normal;
  white-space: nowrap;
}

.welcome-v2 .credit span {
  font-weight: 700;
  letter-spacing: normal;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .welcome-v2 .say-hear { transition: none; }
}

@media (max-width: 980px), (max-aspect-ratio: 1/1) {
  .welcome-v2 .side { width: min(400px, 100%); }
  .welcome-v2 .login-card,
  .welcome-v2 .credit { width: min(400px, 100%); }
  .welcome-v2 .credit { font-size: 17px; font-weight: 700; white-space: nowrap; }
  .welcome-v2 .agree-row label { font-size: 12px; }
  .welcome-v2 .say-text { letter-spacing: 0.12em; }
  .welcome-v2 .welcome-next { letter-spacing: 0.08em; }
}

/* The sign-in gradient is fixed to the viewport. Once the terms open, the
   card grows past that viewport and the rest of the page paints as the dark
   canvas, so the card sits on a footer band. Attach the same gradient to the
   document so the page grows and the band stays below the card. */
html:has(> body.welcome-v2) {
  background-color: #050b15;
  min-height: 100%;
}

.welcome-v2 {
  background-attachment: scroll;
}
