/* Login intentionally loads only branding, form and demo-account styles. */
.login-page {
  align-items: stretch;
  align-content: start;
}
body.guest-shell:has(.login-page) { padding-bottom: 0; }
.login-page > .login-card {
  padding: clamp(24px, 3vw, 40px);
}
/* The attribution footer currently contains only a comment. */
.guest-shell:has(.login-page) > .guest-icon-attribution:not(:has(.icon-attribution)) { display: none; }
.login-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.login-card-heading h2 { margin: 0; }
.login-card-heading .login-navigation { margin: 0; padding: 0; flex-shrink: 0; }
.login-card .login-intro { margin: 14px 0 0; line-height: 1.5; }
.login-card form { margin-top: 24px; gap: 16px; }
.login-card .turnstile-check { margin: 4px 0; }
.login-card .login-terms-link { margin: 14px 0 0; font-size: 12px; line-height: 1.5; }
.login-terms-link a:hover { text-decoration: underline; }
@media (min-width: 801px) {
  .login-page > :is(.login-brand, .login-card) {
    min-height: calc(100svh - 48px);
  }
  .login-page:has(.login-demo-section) > :is(.login-brand, .login-card) {
    /* Outer padding + the 66px collapsed demo row + the 18px grid gap. */
    min-height: calc(100svh - 132px);
  }
  .login-page > .login-demo-section { padding: 22px 28px; }
  .login-demo-section .demo-accounts > summary { line-height: 20px; }
  .login-page > .login-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(32px, 4vw, 60px);
  }
  .login-brand h1 { font-size: clamp(44px, 4.5vw, 88px); }
  .login-brand > p:last-of-type { max-width: calc(100% - 180px); line-height: 1.5; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .login-page > .login-brand { justify-content: flex-start; padding: 24px; }
  .login-brand > p:last-of-type { max-width: 70%; }
  .login-page .login-siti { height: 272px; right: 4px; }
}
.login-demo-section [hidden] { display: none !important; }
.login-demo-section [data-demo-load-status]:empty { display: none; }
.login-demo-section [data-demo-content][aria-busy="true"] { min-height: 44px; }
/* Keep artwork on the hero itself, independent of the expanding demo list. */
.login-page .login-brand {
  background-image: linear-gradient(rgba(255,255,255,.75),rgba(255,255,255,.75)),url('../images/login-background-768.webp') !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
.login-siti { width: auto; height: 304px; }
@media (min-width: 1101px) {
  .login-page > .login-brand { --login-siti-height: clamp(460px, 72svh, 680px); }
  .login-brand > :is(.login-home-link, .eyebrow, h1, p:last-of-type) {
    max-width: calc(100% - var(--login-siti-height) * .8 * 2 / 3 + 64px);
  }
  .login-brand .product-logo { width: 350px; max-width: 100%; height: auto; }
  .login-brand .eyebrow { font-size: 13px; }
  .login-brand h1 { font-size: clamp(44px, 4vw, 88px); }
  .login-brand > p:last-of-type { font-size: 18px; }
  .login-page .login-siti {
    height: calc(var(--login-siti-height) * .8);
    max-height: 70.4%;
    right: 12px;
    bottom: -40px;
    opacity: 1;
  }
}
.guest-report-access, .enterprise-login { display: grid; gap: 10px; margin-top: 20px; }
.guest-report-access > span, .enterprise-login > span { color: var(--muted); font-size: 12px; text-align: center; }
.guest-report-access .button, .enterprise-login .button { display: flex; justify-content: center; align-items: center; text-align: center; min-height: 44px; }
.guest-report-access small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }
@media (min-width: 801px) and (max-height: 850px) {
  .login-page > .login-card { padding: 20px 24px; }
  .login-card .login-intro { margin-top: 10px; }
  .login-card form { margin-top: 14px; gap: 10px; }
  .login-card label { gap: 4px; font-size: 14px; line-height: 20px; }
  .login-card input { min-height: 44px; padding: 10px 12px; }
  .login-card .turnstile-check { margin: 0; padding: 8px 12px; gap: 6px; }
  .login-card .login-form-actions .button { min-height: 44px; padding: 10px 14px; }
  .login-card .login-terms-link { margin-top: 10px; }
  .login-card .guest-report-access { margin-top: 12px; gap: 8px; }
  .login-card .guest-report-access > .button { min-height: 44px; padding: 10px 14px; }
}
@media (max-width: 700px) {
  .login-page > .login-card {
    background-image: linear-gradient(rgba(255,255,255,.88),rgba(241,246,252,.90)),url('../images/login-background-768.webp') !important;
  }
}
@media (max-width: 800px) {
  .login-siti-picture { display: none; }
}
@media (max-width: 700px) {
  .login-page > .login-card { justify-content: flex-start; padding: 18px; }
  .login-page:has(.login-demo-section) > .login-card { min-height: calc(100svh - 132px); }
  .login-card .login-mobile-logo { height: 80px; margin-bottom: 10px; }
  .login-card form { margin-top: 14px; gap: 8px; }
  .login-card .turnstile-check { margin: 0; padding: 8px 12px; }
  .login-card .login-intro { margin-top: 10px; }
  .login-card .login-terms-link { font-size: 11px; }
  .login-card .guest-report-access { margin-top: 10px; padding-top: 10px; }
}

/* Login surfaces follow the selected app theme, including lazily loaded demos. */
html[data-theme="dark"] body.guest-shell:has(.login-page) {
  color-scheme: dark;
  color: #fff;
  background: #09131c;
}
html[data-theme="dark"] .login-page {
  --text: #fff;
  --muted: #fff;
  --surface: #14212d;
  --line: #344653;
  --experience-ink: #fff;
  --experience-muted: #fff;
  --experience-surface: #14212d;
  --experience-line: #344653;
  --organization-tint: #1b2d38;
  color: #fff;
  background: linear-gradient(135deg, #09131c, #10202b) !important;
}
html[data-theme="dark"] .login-page > section {
  color: #fff;
  border-color: #344653;
  background: linear-gradient(145deg, #172632, #101c27) !important;
  box-shadow: 0 20px 60px #0004;
}
html[data-theme="dark"] .login-page > .login-brand {
  background-image: linear-gradient(#0b1723ed, #10232aed), url('../images/login-background-768.webp') !important;
}
html[data-theme="dark"] .login-page :is(h1, h2, h3, p, label, small, summary, th, td, a, .eyebrow, .turnstile-label, .turnstile-status, .package-demo-badge, .guest-report-access > span, .enterprise-login > span) { color: #fff; }
html[data-theme="dark"] .login-page .login-brand h1 span { color: #fff; background: none; }
html[data-theme="dark"] .login-card input {
  color: #fff;
  caret-color: #fff;
  border-color: #526574;
  background: #0c1822 !important;
}
html[data-theme="dark"] .login-card input::placeholder { color: #c8d4dd; opacity: 1; }
html[data-theme="dark"] .login-card input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #0c1822 inset;
  caret-color: #fff;
}
html[data-theme="dark"] .login-page :is(.button, .login-demo-select) {
  color: #fff;
  border-color: #526574;
  background: #203441;
}
html[data-theme="dark"] .login-page :is(.button, .login-demo-select):hover { background: #2d4858; }
html[data-theme="dark"] .login-page :is(.button.primary, .login-demo-select[aria-pressed="true"]) { background: #087544; border-color: #249d6a; }
html[data-theme="dark"] .login-page :is(a, button, input, summary):focus-visible { outline: 3px solid #a6efd1; outline-offset: 3px; }
html[data-theme="dark"] .login-page .turnstile-check { background: #0c1822; border-color: #344653; }
html[data-theme="dark"] .login-page .alert { background: #55232c; color: #fff; border: 1px solid #c66e7c; }
html[data-theme="dark"] .login-demo-table thead th { background: #145139; }
html[data-theme="dark"] .login-demo-table tbody tr:hover,
html[data-theme="dark"] .login-demo-table tbody tr:has([aria-pressed="true"]) { background: #254d40; }
html[data-theme="dark"] .login-demo-table td::before { color: #fff; }
html[data-theme="dark"] .package-demo-badge { background: #294d3c; }
html[data-theme="dark"] body:has(.login-page) .guest-theme-toggle { background: #203441; color: #fff; border-color: #526574; }

/* Public help stays beside Home; short screens can wrap without clipping labels. */
.login-card-heading { flex-wrap: wrap; gap: 12px; }
.login-card-heading .login-navigation { gap: 8px; max-width: 100%; flex-wrap: wrap; }
.login-card-heading .login-navigation .button { padding: 10px 12px; font-size: 12px; white-space: nowrap; }
.login-guide-button svg { width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 700px) {
  body.guest-shell:has(.login-page) { padding-bottom: 76px; }
}
