/* Roster IdP homescreen — Pocket ID login-wrapper feel (custom; no Bootstrap chrome) */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  --ah-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --ah-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --ah-bg: #ffffff;
  --ah-text: #0a0a0a;
  --ah-muted: #6b7280;
  --ah-fill: #f3f4f6;
  --ah-fill-hover: #e5e7eb;
  --ah-primary: #18181b;
  --ah-primary-fg: #fafafa;
  --ah-danger: #dc2626;
  --ah-danger-bg: #dc2626;
  --ah-focus: 0 0 0 3px color-mix(in srgb, var(--ah-primary) 22%, transparent);
  --ah-radius-tile: 14px;
  --ah-radius-input: 1.5rem; /* ~rounded-3xl */
  --ah-radius-pill: 999px;   /* ~rounded-4xl */
  --ah-radius-sheet: 1.125rem;
  --ah-inset: 24px;
  --ah-hero-radius: 40px;
  --ah-max: 28rem; /* ~max-w-md */
}

[data-bs-theme="dark"] {
  --ah-bg: #09090b;
  --ah-text: #fafafa;
  --ah-muted: #a1a1aa;
  --ah-fill: #27272a;
  --ah-fill-hover: #3f3f46;
  --ah-primary: #fafafa;
  --ah-primary-fg: #18181b;
  --ah-focus: 0 0 0 3px color-mix(in srgb, var(--ah-primary) 28%, transparent);
  --ah-danger: #f87171;
  --ah-danger-bg: #b91c1c;
}

/* ── Stage: Pocket split (form 650px / image fills remaining) ── */

body.auth-app-shell {
  background: var(--ah-bg);
  color: var(--ah-text);
  font-family: var(--ah-sans);
}

body.auth-app-shell .auth-stage {
  background: var(--ah-bg);
}

body.auth-app-shell:not(.auth-has-hero) .auth-panel {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

body.auth-app-shell .auth-shell {
  width: 100%;
  max-width: var(--ah-max);
  margin-inline: auto;
}

/* Custom sheet — not Bootstrap .card */
body.auth-app-shell .auth-home-sheet {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

body.auth-app-shell .auth-home-body {
  padding: 0;
}

body.auth-app-shell .auth-brand {
  margin: 0 0 1.5rem; /* ~24px logo → title stack */
  text-align: center;
}

body.auth-app-shell .auth-brand img {
  width: auto;
  max-width: 9.5rem;
  height: auto;
}

body.auth-app-shell .auth-help {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ah-muted);
}

body.auth-app-shell .auth-help a {
  color: var(--ah-muted);
  text-decoration: none;
  font-weight: 500;
}

body.auth-app-shell .auth-help a:hover,
body.auth-app-shell .auth-help a:focus-visible {
  color: var(--ah-text);
  text-decoration: underline;
}

/* Desktop — form column + remaining-width image (auth-flow.css owns geometry) */
@media (min-width: 1024px) {
  body.auth-app-shell.auth-has-hero .auth-stage {
    justify-content: stretch;
    align-items: stretch;
  }

  body.auth-app-shell.auth-has-hero .auth-panel {
    height: 100vh;
    height: 100dvh;
    padding:
      max(2rem, env(safe-area-inset-top))
      2rem
      max(2rem, env(safe-area-inset-bottom))
      max(2rem, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.auth-app-shell.auth-form-right.auth-has-hero .auth-panel {
    padding-left: 2rem;
    padding-right: max(2rem, env(safe-area-inset-right));
  }

  body.auth-app-shell.auth-has-hero .auth-shell {
    max-width: var(--ah-max);
    width: 100%;
  }
}

/* Mobile: image behind a card (Pocket) */
@media (max-width: 1023px) {
  body.auth-app-shell .auth-hero {
    display: none !important;
  }

  body.auth-app-shell .auth-panel {
    min-height: 100dvh;
    padding: 1.5rem 1.25rem;
  }

  body.auth-app-shell .auth-shell {
    max-width: var(--ah-max);
  }

  body.auth-app-shell.auth-has-hero .auth-stage {
    background-color: var(--ah-bg);
    background-image: var(--auth-hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  body.auth-app-shell.auth-has-hero .auth-home-sheet,
  body.auth-app-shell.auth-has-hero .auth-app-card.card {
    background: var(--ah-bg);
    border-radius: var(--ah-radius-sheet);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  }

  body.auth-app-shell.auth-has-hero .auth-home-body,
  body.auth-app-shell.auth-has-hero .auth-app-card > .card-body {
    padding: 1.5rem 1.25rem;
  }

  body.auth-app-shell:not(.auth-has-hero) .auth-home-sheet {
    border-radius: var(--ah-radius-sheet);
  }
}

@media (max-width: 480px) {
  body.auth-app-shell:not(.auth-has-hero) .auth-panel {
    padding: 1.25rem 1.15rem max(1.25rem, env(safe-area-inset-bottom));
  }

  body.auth-app-shell.auth-has-hero .auth-panel {
    padding: 1rem 0.75rem max(1rem, env(safe-area-inset-bottom));
  }
}

/* ── Homescreen / ceremony chrome (auth-home-* / ah-*) ── */

.auth-home-step {
  text-align: center;
}

.auth-home-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.5rem;
  border-radius: var(--ah-radius-tile);
  border: 1px solid color-mix(in srgb, var(--ah-muted) 22%, transparent);
  background: var(--ah-bg);
  color: var(--ah-text);
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-home-mark--error {
  background: var(--ah-danger-bg);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.auth-home-mark--app {
  overflow: hidden;
  padding: 0.2rem;
}

.auth-home-mark--app img,
.auth-home-app-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-home-app-logo {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background: var(--ah-bg);
  border: 1px solid color-mix(in srgb, var(--ah-muted) 22%, transparent);
  padding: 0.2rem;
}

.auth-home-title {
  margin: 0 0 1rem; /* ~16px title → helper */
  font-family: var(--ah-serif);
  font-size: clamp(1.85rem, 4.2vw, 2.35rem); /* ~30–38px */
  font-weight: 700;
  font-optical-sizing: auto;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ah-text);
  text-wrap: balance;
}

.auth-home-product {
  margin: 0 0 0.65rem;
  font-family: var(--ah-sans, inherit);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--ah-muted);
}

.auth-home-logout-alt {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

body.auth-app-shell .auth-home-controls > .auth-home-hint {
  text-align: center;
  margin-bottom: 1.15rem;
}

.auth-home-logout-alt .auth-home-link {
  font-size: 0.875rem;
  color: var(--ah-muted);
}

.auth-home-subtitle {
  margin: 0 auto;
  max-width: 22rem;
  font-family: var(--ah-sans);
  font-size: 0.9375rem; /* 15px */
  font-weight: 400;
  line-height: 1.5;
  color: var(--ah-muted);
}

.auth-home-subtitle--error {
  color: var(--ah-muted); /* Pocket keeps error in muted subtitle */
  font-weight: 500;
}

.auth-home-subtitle--ok {
  color: #16a34a;
  font-weight: 500;
}

[data-bs-theme="dark"] .auth-home-subtitle--ok {
  color: #4ade80;
}

/* Generous gap helper → controls */
.auth-home-controls {
  margin-top: 2.75rem; /* ~44px */
  text-align: left;
}

.auth-home-field {
  margin-bottom: 1rem;
}

.auth-home-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ah-text);
}

.auth-home-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 3.15rem;
  padding: 0.85rem 1.15rem;
  font-family: var(--ah-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ah-text);
  background: var(--ah-fill);
  border: 1px solid transparent;
  border-radius: var(--ah-radius-input);
  outline: none;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.auth-home-input::placeholder {
  color: color-mix(in srgb, var(--ah-muted) 80%, transparent);
  font-weight: 400;
}

.auth-home-input:hover:not(:disabled):not(:focus) {
  background: var(--ah-fill-hover);
}

.auth-home-input:focus,
.auth-home-input:focus-visible {
  background: var(--ah-fill);
  box-shadow: var(--ah-focus);
}

.auth-home-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-home-hint {
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ah-muted);
}

.auth-home-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.auth-home-actions--row {
  flex-direction: row;
  align-items: stretch;
}

.auth-home-actions--row > .auth-home-btn {
  flex: 1 1 0;
}

.auth-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.15rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--ah-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--ah-radius-pill);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-home-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-home-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.auth-home-btn-primary {
  background: var(--ah-primary);
  color: var(--ah-primary-fg);
}

.auth-home-btn-primary:hover:not(:disabled),
.auth-home-btn-primary:focus-visible {
  filter: brightness(1.08);
}

.auth-home-btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--ah-focus);
}

.auth-home-btn-secondary {
  background: var(--ah-fill);
  color: var(--ah-text);
}

.auth-home-btn-secondary:hover:not(:disabled),
.auth-home-btn-secondary:focus-visible {
  background: var(--ah-fill-hover);
}

.auth-home-btn-secondary:focus-visible {
  outline: none;
  box-shadow: var(--ah-focus);
}

.auth-home-link {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ah-muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.auth-home-link:hover,
.auth-home-link:focus-visible {
  color: var(--ah-text);
  text-decoration: underline;
}

/* Compact OIDC app chip — host only; title already carries intent */
.auth-home-app-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem auto 0;
  padding: 0.4rem 0.75rem;
  max-width: 100%;
  border-radius: var(--ah-radius-pill);
  background: var(--ah-fill);
  color: var(--ah-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

.auth-home-app-chip strong {
  color: var(--ah-text);
  font-weight: 600;
}

.auth-home-app-chip .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  opacity: 0.9;
}

.auth-home-flash {
  margin: 1rem auto 0;
  max-width: 22rem;
  text-align: left;
}

.auth-home-flash-item {
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  background: var(--ah-fill);
  color: var(--ah-text);
}

.auth-home-flash-item--error {
  background: color-mix(in srgb, var(--ah-danger) 12%, transparent);
  color: var(--ah-danger);
}

.auth-home-flash-item--ok {
  background: color-mix(in srgb, #16a34a 12%, transparent);
  color: #15803d;
}

.auth-home-turnstile-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--ah-muted);
  text-align: center;
}

.auth-home-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-home-spin 0.6s linear infinite;
  vertical-align: -0.125em;
}

@keyframes auth-home-spin {
  to { transform: rotate(360deg); }
}

/* Homescreen: Pocket has no progress track and one logo only (Alliance brand above). */
.signin-vue-root.is-home-step .signin-step-track {
  display: none !important;
}

.signin-vue-root.is-home-step .signin-ceremony-mark {
  display: none !important; /* error uses .auth-home-mark--error inside the step */
}

/* Never show a second OIDC handoff box on home — title already carries app name */
.signin-vue-root.is-home-step .oidc-handoff-banner,
.signin-vue-root.is-home-step .auth-home-app-chip {
  display: none !important;
}

/* First-load entrance for home sheet only */
body.auth-app-shell.auth-flow-enter .auth-home-sheet {
  animation: auth-card-in 0.42s var(--auth-ease-spring, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

@media (prefers-reduced-motion: reduce) {
  body.auth-app-shell.auth-flow-enter .auth-home-sheet,
  .auth-home-btn:active:not(:disabled) {
    animation: none !important;
    transform: none !important;
  }
  .auth-home-spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.5;
  }
}

/* ── Shared step chrome (all SPA steps + server OIDC fallbacks) ── */

.auth-home-mark--passkey,
.auth-home-mark--consent {
  color: var(--ah-text);
  border-color: color-mix(in srgb, var(--ah-muted) 28%, transparent);
}

.auth-home-hint--center {
  text-align: center;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.auth-home-hint--footer {
  margin-top: 1.5rem;
}

.auth-home-turnstile {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0 0;
}

/* Channel / method choices */
.auth-home-choices {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.auth-home-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: var(--ah-radius-tile);
  background: var(--ah-fill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.auth-home-choice:hover:not(.is-disabled) {
  background: var(--ah-fill-hover);
}

.auth-home-choice.is-selected {
  border-color: color-mix(in srgb, var(--ah-text) 28%, transparent);
  box-shadow: var(--ah-focus);
  background: var(--ah-fill);
}

.auth-home-choice.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-home-choice-input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--ah-primary);
  cursor: inherit;
}

.auth-home-choice-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.auth-home-choice-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ah-text);
  line-height: 1.3;
}

.auth-home-choice-meta {
  font-size: 0.8125rem;
  color: var(--ah-muted);
  line-height: 1.35;
  word-break: break-word;
}

.auth-home-choice-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  border-radius: var(--ah-radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--ah-muted) 18%, transparent);
  color: var(--ah-muted);
}

/* Identity / sent-to chip */
.auth-home-identity {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1.05rem;
  border-radius: var(--ah-radius-tile);
  background: var(--ah-fill);
  text-align: left;
}

.auth-home-identity-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ah-muted);
}

.auth-home-identity-value {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--ah-text);
  word-break: break-word;
}

/* OTP code input */
.auth-home-input--code {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  padding-left: 1.15rem;
  padding-right: 0.65rem;
  font-variant-numeric: tabular-nums;
}

/* OIDC meta + scopes */
.auth-home-meta {
  margin-bottom: 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: var(--ah-radius-tile);
  background: var(--ah-fill);
  text-align: left;
}

.auth-home-meta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ah-muted);
  margin-bottom: 0.35rem;
}

.auth-home-meta-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ah-text);
  line-height: 1.3;
}

.auth-home-meta-host {
  margin-top: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--ah-muted);
  word-break: break-all;
}

.auth-home-meta-desc {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ah-muted);
}

.auth-home-scopes {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1.05rem;
  border-radius: var(--ah-radius-tile);
  background: var(--ah-fill);
  text-align: left;
}

.auth-home-scope-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  color: var(--ah-text);
  line-height: 1.45;
}

.auth-home-scope-list li + li {
  margin-top: 0.25rem;
}

/* Footer text links */
.auth-home-footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.auth-home-footer-links--split {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
}

.auth-home-footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.auth-home-footer-col--end {
  align-items: flex-end;
  text-align: right;
}

.auth-home-link--btn {
  margin-top: 0;
}

.auth-home-link:disabled,
.auth-home-link--btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

.auth-home-invite {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--ah-muted) 22%, transparent);
}

.auth-home-invite .auth-home-btn {
  width: 100%;
}

/* Server-rendered OIDC / logout pages inside shell */
body.auth-app-shell .auth-home-body > .auth-home-step,
body.auth-app-shell .auth-home-body > form {
  text-align: center;
}

body.auth-app-shell .auth-home-body > form .auth-home-actions {
  text-align: left;
}

/* Pocket: no progress track on any SPA step */
.signin-vue-root .signin-step-track,
.signin-vue-root .signin-ceremony-mark {
  display: none !important;
}

/* Serif titles everywhere in SPA (h1 already; force any leftover) */
.signin-vue-root .auth-home-title,
body.auth-app-shell .auth-home-title {
  font-family: var(--ah-serif);
}

/* Focus polish for radios inside choices */
.auth-home-choice:focus-within:not(.is-disabled) {
  box-shadow: var(--ah-focus);
}

/* Dark contrast bump for muted helper on zinc */
[data-bs-theme="dark"] .auth-home-subtitle {
  color: #a1a1aa;
}

[data-bs-theme="dark"] .auth-home-choice.is-selected {
  border-color: rgba(250, 250, 250, 0.35);
}

/* ── Auth0 identifier-first extras / Pocket tiles ── */

.auth-home-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.15rem 0;
  color: var(--ah-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-home-divider::before,
.auth-home-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: color-mix(in srgb, var(--ah-muted) 28%, transparent);
}

.auth-home-hint--remembered {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-home-hint--remembered .auth-home-link {
  margin-top: 0;
}

.auth-home-methods {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.auth-method-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--ah-radius-tile);
  background: color-mix(in srgb, var(--ah-fill) 88%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-method-tile:hover:not(:disabled):not(.is-disabled) {
  background: var(--ah-fill-hover);
}

.auth-method-tile.is-selected {
  border-color: color-mix(in srgb, var(--ah-text) 28%, transparent);
  box-shadow: var(--ah-focus);
  background: var(--ah-fill);
}

.auth-method-tile.is-disabled,
.auth-method-tile:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-method-tile:focus-visible {
  outline: none;
  box-shadow: var(--ah-focus);
}

.auth-method-chevron {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--ah-muted);
  font-size: 0.95rem;
}

.auth-home-input--login-code {
  letter-spacing: 0.18em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
}

.auth-method-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--ah-bg) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--ah-muted) 18%, transparent);
  color: var(--ah-text);
  font-size: 1.1rem;
}

.auth-otp {
  position: relative;
  margin-top: 0.15rem;
}

.auth-otp-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.01;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  letter-spacing: 2.4em;
  font-size: 1.5rem;
  z-index: 2;
}

.auth-otp-input:focus {
  outline: none;
}

.auth-otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  pointer-events: none;
}

.auth-otp-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  border-radius: 0.85rem;
  background: var(--ah-fill);
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ah-text);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-otp-box.is-active {
  box-shadow: var(--ah-focus);
  background: var(--ah-fill);
}

.auth-otp-box.is-filled {
  background: var(--ah-fill-hover);
}

.auth-home-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.auth-home-app-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background: var(--ah-bg);
  border: 1px solid color-mix(in srgb, var(--ah-muted) 22%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-home-meta-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.auth-home-scope-list {
  list-style: none;
  padding-left: 0;
}

.auth-home-scope-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.auth-home-scope-list i {
  margin-top: 0.15rem;
  color: #16a34a;
}

[data-bs-theme="dark"] .auth-home-scope-list i {
  color: #4ade80;
}

/* Leftover server pages inside the Pocket shell */
body.auth-app-shell .auth-home-body > h1,
body.auth-app-shell .auth-home-body > h5,
body.auth-app-shell .auth-home-body > .h5 {
  margin: 0 0 1rem;
  font-family: var(--ah-serif);
  font-size: clamp(1.85rem, 4.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-align: center;
  color: var(--ah-text);
}

body.auth-app-shell .auth-home-body > p,
body.auth-app-shell .auth-home-body > .text-muted {
  text-align: center;
  color: var(--ah-muted);
}

body.auth-app-shell .auth-home-body > form,
body.auth-app-shell .auth-home-body > .card {
  text-align: left;
}

body.auth-app-shell .modal-content {
  background: var(--ah-bg);
  color: var(--ah-text);
  border: 1px solid color-mix(in srgb, var(--ah-muted) 22%, transparent);
  border-radius: 1.15rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

body.auth-app-shell .modal-header,
body.auth-app-shell .modal-footer {
  border-color: color-mix(in srgb, var(--ah-muted) 18%, transparent);
}

body.auth-app-shell .modal-title {
  font-family: var(--ah-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.auth-app-shell .modal-body a {
  color: inherit;
  text-underline-offset: 0.15em;
}

body.auth-app-shell .modal-body .btn,
body.auth-app-shell .modal-footer .btn {
  border-radius: var(--ah-radius-pill);
}

body.auth-app-shell .btn-close {
  filter: none;
}

[data-bs-theme="dark"] body.auth-app-shell .btn-close {
  filter: invert(1) grayscale(1);
}

@media (max-width: 480px) {
  .auth-home-footer-links--split {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .auth-home-footer-col,
  .auth-home-footer-col--end {
    align-items: center;
    text-align: center;
  }

  .auth-otp-boxes {
    gap: 0.35rem;
  }

  .auth-otp-box {
    min-height: 2.85rem;
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-method-tile {
    transition: none;
  }
}
