:root {
  --wx-brand: #1677ff;
  --wx-brand-strong: #1459c7;
  --wx-brand-soft: #eef5ff;
  --wx-action: #146fe8;
  --wx-action-hover: #1265d8;
  --wx-ink: #172033;
  --wx-muted: #667085;
  --wx-line: rgba(148, 163, 184, 0.2);
  --wx-focus: rgba(22, 119, 255, 0.24);
  --wx-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  color-scheme: light;
  scroll-padding-top: 6rem;
  scrollbar-gutter: stable;
}

body {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at 8% 0%, rgba(143, 200, 255, 0.3), transparent 30rem),
    radial-gradient(circle at 94% 8%, rgba(65, 198, 215, 0.13), transparent 26rem),
    linear-gradient(180deg, #f8fbff 0%, #f1f6fc 50%, #eaf2fa 100%);
  background-attachment: fixed;
}

::selection {
  color: #0f2f5f;
  background: rgba(96, 165, 250, 0.24);
}

:where(a[href], button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--wx-focus);
  outline-offset: 3px;
}

:where(a[href], button) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

:where(a[href], button:not(:disabled)) {
  cursor: pointer;
}

:where(button, input, textarea, select):disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

img {
  color: transparent;
}

/* Shared authentication modal header. Keep dynamically injected auth UI
   consistent on pages that do not load account-theme.css, such as docs. */
.auth-header-row,
.auth-header-main {
  min-width: 0;
}

.auth-header-topline {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.auth-header-topline .auth-brand-lockup {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  min-width: 0;
}

.auth-brand-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.78rem;
  height: 2.78rem;
  padding: 0.15rem;
  flex: 0 0 2.78rem;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 0.96rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(37, 99, 235, 0.12);
}

.auth-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.82rem;
  object-fit: cover;
}

.auth-brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.auth-brand-title {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #172033;
  font-family: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  font-size: 1.28rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-brand-title--register {
  font-size: 0.96rem;
}

.auth-header-actions {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.auth-view-switch--header {
  box-sizing: border-box;
  height: 2.5rem;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  gap: 0.22rem;
  margin-top: 0 !important;
  padding: 0.18rem;
}

.auth-view-switch--header .auth-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 2rem;
  min-height: 2rem;
  min-width: 3.72rem;
  padding: 0 0.72rem;
  font-size: 0.78rem;
  line-height: 1;
}

.auth-close-button--header {
  width: 2.5rem;
  height: 2.5rem;
  align-self: flex-start;
  margin-top: 0 !important;
  flex-shrink: 0;
}

.auth-code-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  min-width: 0;
}

.auth-code-row .auth-input {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
}

.auth-code-row .auth-code-button {
  min-width: 8.4rem;
  min-height: 3rem;
  flex: 0 0 auto;
  padding-inline: 1rem;
  line-height: 1.2;
  white-space: nowrap;
}

.primary-button,
.auth-pill-button--primary {
  min-height: 2.75rem;
  color: #ffffff;
  background: var(--wx-action);
  box-shadow: 0 12px 26px rgba(20, 111, 232, 0.2);
}

.primary-button:hover,
.auth-pill-button--primary:hover {
  background: var(--wx-action-hover);
}

:where(
  .secondary-button,
  .auth-pill-button,
  .hero-toggle-link,
  .plan-toggle-button,
  .security-tab,
  .auth-view-button,
  .auth-submode-button
) {
  min-height: 2.75rem;
}

.site-header {
  border-bottom-color: rgba(226, 232, 240, 0.68) !important;
  background: rgba(251, 252, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
}

.site-header.is-scrolled {
  border-bottom-color: rgba(203, 213, 225, 0.74) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.065) !important;
}

.site-header img[src*="logo.png"] {
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 10px 24px rgba(22, 119, 255, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.56) !important;
}

.site-header .nav-link {
  letter-spacing: 0.01em;
}

.mobile-panel.is-open {
  animation: wx-mobile-menu-in 220ms var(--wx-ease) both;
}

@keyframes wx-mobile-menu-in {
  from {
    opacity: 0;
    transform: translateY(-0.45rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 9999px;
  background: rgba(100, 116, 139, 0.34);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.48);
  background-clip: padding-box;
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 5.25rem;
    scrollbar-gutter: auto;
  }

  body {
    background:
      radial-gradient(circle at 5% 0%, rgba(143, 200, 255, 0.25), transparent 20rem),
      radial-gradient(circle at 100% 18%, rgba(65, 198, 215, 0.09), transparent 17rem),
      linear-gradient(180deg, #f8fbff 0%, #eff5fc 64%, #eaf2fa 100%);
    background-attachment: scroll;
  }

  .auth-header-topline {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .auth-brand-lockup {
    gap: 0.62rem;
  }

  .auth-brand-emblem {
    width: 2.42rem;
    height: 2.42rem;
    flex-basis: 2.42rem;
    border-radius: 0.82rem;
  }

  .auth-brand-title {
    font-size: 1.08rem;
  }

  .auth-header-actions {
    gap: 0.35rem;
  }

  .auth-view-switch--header .auth-view-button {
    min-width: 3.2rem;
    padding-inline: 0.55rem;
  }
}

@media (max-width: 639px) {
  .auth-code-row {
    flex-direction: column;
  }

  .auth-code-row .auth-code-button {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-panel.is-open {
    animation: none;
  }
}
