/* Shared appearance for pages that inherit the landing/portal preference. */
html[data-secondary-theme] {
  color-scheme: light;
}
html[data-secondary-theme].dark-style {
  color-scheme: dark;
  --auth-paper: #000;
  --auth-paper-bright: #000;
  --auth-ink: #f4f2ed;
  --auth-muted: #a5a7b3;
  --auth-line: #454545;
  --auth-blue: #4b91ff;
  --auth-violet: #b49aff;
  --auth-mode-active-bg: #fff;
  --auth-mode-active-text: #000;
  --intro-paper: #000;
  --intro-ink: #f4f2ed;
  --intro-muted: #a5a7b3;
  --bs-body-bg: #000;
  --bs-body-color: #f4f2ed;
  --bs-heading-color: #f4f2ed;
  --bs-secondary-color: #a5a7b3;
  --bs-border-color: #454545;
}
[data-secondary-theme].dark-style :is(body, .page-content, .auth-landing-page, .auth-login-card, .auth-code-card, .site-intro) {
  color: var(--auth-ink, #f4f2ed);
  background-color: #000 !important;
}
[data-secondary-theme].dark-style :is(.auth-color-field, .auth-brain-aura, .site-intro__field) {
  background: none;
}
[data-secondary-theme].dark-style :is(.auth-eyebrow, .auth-kicker, .auth-landing-intro > p:not(.auth-eyebrow), .auth-landing-footer, .auth-divider, .auth-email-summary small, .auth-verify-help, .auth-code-help, .setup-identity, .helptext) {
  color: var(--auth-muted);
}
[data-secondary-theme].dark-style :is(.auth-credential-form .form-label, .auth-email-flow .form-label, .auth-code-form label, .allauth-auth-content label, .auth-method-label) {
  color: var(--auth-ink);
}
[data-secondary-theme].dark-style :is(.auth-credential-form, .auth-email-flow, .allauth-auth-content) :is(input:not([type='hidden']), textarea, select, option, optgroup, .input-group-text),
[data-secondary-theme].dark-style :is(.auth-code-input, .auth-code-box-group i, .auth-email-summary) {
  color: var(--auth-ink) !important;
  border-color: var(--auth-line);
  background-color: #000 !important;
}
[data-secondary-theme].dark-style :is(input, textarea)::placeholder {
  color: #a5a7b3;
  opacity: 1;
}
[data-secondary-theme].dark-style :is(.auth-credential-form, .auth-email-flow, .allauth-auth-content) :is(input, textarea, select):focus {
  border-color: var(--auth-blue);
}
[data-secondary-theme].dark-style :is(.auth-method-button:not(.auth-method-button-primary), .auth-provider-button, .auth-staff-button, .auth-code-secondary-button, .setup-secondary),
[data-secondary-theme].dark-style .allauth-auth-content :is(button, a[role='button']):not(.spectrum-button) {
  color: var(--auth-ink) !important;
  border-color: var(--auth-line);
  background-color: #000;
}
[data-secondary-theme].dark-style :is(.auth-method-button, .auth-provider-button, .auth-code-secondary-button, .setup-secondary):hover {
  border-color: #a5a7b3;
}
[data-secondary-theme].dark-style :is(.allauth-message, .alert, .allauth-auth-content .errorlist) {
  color: var(--auth-ink);
  border-color: var(--auth-line);
  background: #000;
}
[data-secondary-theme].dark-style :is(.allauth-message-error, .alert-danger, .errorlist, .auth-code-errors p, .invalid-feedback) {
  color: #ff93a8;
}
[data-secondary-theme].dark-style .alert-success { color: #71dda2; }
[data-secondary-theme].dark-style .alert-warning { color: #ffcb66; }
[data-secondary-theme].dark-style .allauth-auth-content :is(.helptext, form p > span) {
  color: var(--auth-muted);
}
[data-secondary-theme].dark-style .site-intro__rail { background: #454545; }
/* Preserve the transparent overlay that captures keyboard input over the OTP cells. */
[data-secondary-theme].dark-style .auth-code-enhanced .auth-code-input {
  color: transparent !important;
  background: transparent !important;
}
/* Autofill is a surface too; browser defaults otherwise introduce a pale rectangle. */
[data-secondary-theme].dark-style input:-webkit-autofill {
  -webkit-text-fill-color: #f4f2ed;
  box-shadow: 0 0 0 1000px #000 inset !important;
  caret-color: #f4f2ed;
}
[data-secondary-theme] .auth-home-link { width: auto; }
[data-secondary-theme] .auth-credential-form .input-group-text {
  border-color: var(--auth-line);
  background-color: var(--auth-paper-bright);
}

[data-secondary-theme].dark-style .auth-staff-access h3 { color: var(--auth-ink); }
[data-secondary-theme].dark-style .auth-staff-access span { color: var(--auth-muted); }
.secondary-public-page > main { flex: 1; }
.secondary-public-page .section-py { padding-block: 3rem; }
[data-secondary-theme].dark-style .secondary-public-page :is(.card, .card-header, .card-body, .table, .table > :not(caption) > * > *, .page-link, .team-image-box, .team-placeholder, .badge, .support-frost) {
  --bs-card-bg: #000;
  --bs-card-color: #f4f2ed;
  --bs-table-bg: #000;
  --bs-table-color: #f4f2ed;
  background-color: #000 !important;
  color: #f4f2ed;
  border-color: #454545 !important;
}
[data-secondary-theme].dark-style :is(h1, h2, h3, h4, h5, h6, .text-heading, .text-body) { color: var(--auth-ink) !important; }
[data-secondary-theme].dark-style :is(.text-muted, .text-body-secondary) { color: var(--auth-muted) !important; }
[data-secondary-theme].dark-style .secondary-public-page a:not(.btn, .auth-spectrum-text) { color: #80b0ff; }
[data-secondary-theme].dark-style .auth-credential-form a:not(.btn) { color: #80b0ff; }
[data-secondary-theme].dark-style .secondary-public-page :is(.avatar-initial, [class*='bg-label-']) {
  background-color: #000 !important;
  border-color: #454545 !important;
  color: #b49aff !important;
}
.auth-mail-signal > svg { position: relative; z-index: 1; }
