html.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"]) {
  display: flex !important;
  position: relative !important;
  height: 4.25rem !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 1.5rem !important;
  background: none !important;
}

html.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"])::before {
  content: "ver 0.70 Beta";
  position: absolute;
  left: calc(50% + 5.55rem);
  bottom: 0.58rem;
  color: #5b7288;
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR",
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.025em;
  white-space: nowrap;
  opacity: 0.82;
}

html.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"]) > img {
  display: none !important;
}

html.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"])::after {
  content: "LegalContext";
  color: #2563a6;
  font-family: "Arial Rounded MT Bold", "Avenir Next Rounded", "Nunito Sans",
    "Trebuchet MS", Inter, system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.18;
  padding: 0.08em 0 0.14em;
  letter-spacing: -0.035em;
  background: linear-gradient(105deg, #2563a6 8%, #277f9d 48%, #14a58f 92%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-rendering: geometricPrecision;
}

html.dark.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"])::after {
  background: linear-gradient(105deg, #93c5fd 8%, #67c7d1 48%, #5eead4 92%);
  background-clip: text;
  -webkit-background-clip: text;
}

html.dark.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"])::before {
  color: #94a3b8;
}

html.legalcontext-login-page main h1 {
  display: none !important;
}

html.legalcontext-login-page .legalcontext-pending-approval-alert {
  border-color: color-mix(in srgb, #0f8f84 28%, transparent) !important;
  background: color-mix(in srgb, #0f8f84 7%, var(--surface-primary)) !important;
  color: var(--text-primary) !important;
}

html.legalcontext-login-page .legalcontext-email-resend-panel {
  display: none !important;
}

.legalcontext-registration-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
}

.legalcontext-registration-terms input {
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  accent-color: #16836f;
}

.legalcontext-registration-terms a {
  color: #16836f;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, #16836f 35%, transparent);
  text-underline-offset: 0.16em;
}

.legalcontext-registration-terms a:hover {
  color: #0d6658;
  text-decoration-color: currentColor;
}

html.dark .legalcontext-registration-terms a {
  color: #5eead4;
}

/* The runtime branding script replaces this source immediately afterward.
   Hiding the original asset at first paint prevents a one-frame LibreChat flash. */
img[src$="/assets/logo.svg"],
img[src$="assets/logo.svg"] {
  visibility: hidden !important;
}

img.legal-context-brand-logo {
  visibility: visible !important;
}

@media (max-width: 640px) {
  html.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"]) {
    height: 3.75rem !important;
    margin-top: 1.125rem !important;
  }


  html.legalcontext-auth-page div:has(> img[src="/images/legal-context-logo.png"])::before {
    left: calc(50% + 4.95rem);
    bottom: 0.42rem;
    font-size: 0.6rem;
  }
}
