:root {
  color-scheme: light;
  --ink: #15283d;
  --muted: #607184;
  --blue: #1267b2;
  --blue-dark: #0d4f8b;
  --line: #d9e1e8;
  --surface: #ffffff;
  --background: #edf2f4;
  font-family: "Segoe UI Variable", "Aptos", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--background);
  background-image: linear-gradient(rgba(21, 40, 61, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(21, 40, 61, 0.035) 1px, transparent 1px);
  background-position: center;
  background-size: 34px 34px;
}

button,
input {
  font: inherit;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 36px 20px;
}

.public-home {
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 32px 24px;
}

.public-home-header,
.public-home-brand,
.public-home-header nav,
.public-home-footer {
  display: flex;
  align-items: center;
}

.public-home-header {
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.public-home-brand {
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.public-home-brand img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.public-home-brand strong,
.public-home-brand small {
  display: block;
}

.public-home-brand strong {
  font-size: 15px;
}

.public-home-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.public-home-header nav {
  flex-wrap: wrap;
  gap: 20px;
}

.public-home a {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 650;
  text-underline-offset: 3px;
}

.public-home-intro {
  max-width: 760px;
  padding: 62px 0 44px;
  border-bottom: 1px solid var(--line);
}

.public-home-intro h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.1;
}

.public-home-lede {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.public-home-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  padding: 34px 0 38px;
}

.public-home-details h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.public-home-details p {
  margin: 0 0 12px;
  color: #34495d;
  font-size: 14px;
  line-height: 1.65;
}

.public-home-details code {
  color: var(--ink);
  font-size: 0.92em;
}

.public-home-footer {
  justify-content: space-between;
  gap: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.auth-panel {
  width: min(100%, 456px);
  padding: 32px 38px 26px;
  border: 1px solid rgba(21, 40, 61, 0.1);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(21, 40, 61, 0.1), 0 2px 8px rgba(21, 40, 61, 0.04);
  animation: panel-enter 420ms ease-out both;
}

.legal-panel {
  width: min(100%, 820px);
  align-self: start;
  margin: 20px 0;
  padding: 34px 42px;
}

.legal-heading {
  margin: 25px 0 22px;
}

.legal-heading h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
}

.legal-heading > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.legal-content {
  color: #34495d;
  font-size: 14px;
  line-height: 1.65;
}

.legal-content h2 {
  margin: 24px 0 7px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.legal-content p {
  margin: 0 0 12px;
}

.legal-content ul {
  margin: 8px 0 16px;
  padding-left: 21px;
}

.legal-content li + li {
  margin-top: 7px;
}

.legal-content a {
  color: var(--blue-dark);
  text-underline-offset: 3px;
}

.brand-lockup {
  display: flex;
  justify-content: center;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup img {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.auth-heading {
  margin: 25px 0 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.auth-heading h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
}

.auth-heading > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.auth-heading strong {
  color: var(--ink);
  font-weight: 650;
}

.credential-form {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.form-hint {
  margin-top: -1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.email-error {
  padding: 12px 14px;
  border: 1px solid #e7bbb7;
  border-radius: 5px;
  background: #fff4f2;
  color: #8f2c24;
  font-size: 14px;
  line-height: 1.55;
}

.email-error p {
  margin: 0;
}

.email-error p + p {
  margin-top: 8px;
}

.email-error a {
  color: #74251e;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sign-in-issue .auth-heading {
  margin-bottom: 16px;
}

.sign-in-error {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #e7bbb7;
  border-radius: 5px;
  background: #fff4f2;
  color: #8f2c24;
  font-size: 14px;
  line-height: 1.5;
}

.sign-in-error p {
  margin: 0;
}

.sign-in-error-mark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border: 1px solid #d9a39d;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.account-deletion-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.account-deletion-retry[hidden] {
  display: none;
}

.account-deletion-loading[hidden],
.account-deletion-confirmation[hidden] {
  display: none;
}

.interaction-error-panel .auth-heading {
  margin-bottom: 16px;
}

.interaction-error {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #e7bbb7;
  border-radius: 5px;
  background: #fff4f2;
  color: #8f2c24;
  font-size: 14px;
  line-height: 1.5;
}

.interaction-error p {
  margin: 0;
}

.interaction-error-mark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border: 1px solid #d9a39d;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.verification-panel {
  padding-bottom: 28px;
}

.verification-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-top: 24px;
  border-radius: 50%;
  background: #eaf1f7;
  color: var(--blue-dark);
  font-size: 21px;
  font-weight: 700;
}

.verification-panel--success .verification-mark {
  background: #e8f5ef;
  color: #176b48;
}

.verification-panel--error .verification-mark {
  background: #fff0ee;
  color: #a62d20;
}

.verification-panel .auth-heading {
  margin-bottom: 0;
}

.verification-action {
  margin-top: 24px;
}

.form-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #cbd5de;
  border-radius: 5px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 103, 178, 0.14);
}

.password-control {
  position: relative;
  display: flex;
  align-items: center;
}

.password-control input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  background: #edf2f4;
  color: var(--ink);
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(18, 103, 178, 0.36);
  outline-offset: 1px;
}

.password-toggle[aria-pressed="true"] .password-toggle-slash {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.password-requirements {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafb;
}

.password-requirements-title {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.password-requirements ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.password-requirements li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.password-requirement-mark {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border: 1px solid #aab6c0;
  border-radius: 50%;
  color: #176b48;
  font-size: 11px;
  font-weight: 700;
}

.password-requirements li.is-satisfied {
  color: #176b48;
}

.password-requirements li.is-satisfied .password-requirement-mark {
  border-color: #8dc4a8;
  background: #e8f5ef;
}

.password-requirements-summary {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.password-match-message {
  color: #a62d20;
}

.continue-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  transition: background-color 150ms ease, transform 150ms ease;
}

.continue-button:hover {
  background: var(--blue-dark);
}

.continue-button:disabled,
.continue-button:disabled:hover {
  background: #9aa9b5;
  cursor: not-allowed;
  transform: none;
}

.continue-button.is-submitting {
  justify-content: center;
  gap: 10px;
}

.submit-spinner {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: submit-spin 700ms linear infinite;
}

.continue-button:active {
  transform: translateY(1px);
}

.continue-button:focus-visible,
.provider-link:focus-visible,
.auth-footer a:focus-visible {
  outline: 3px solid rgba(18, 103, 178, 0.36);
  outline-offset: 3px;
}

.provider-section {
  margin-top: 23px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  color: #758496;
  font-size: 12px;
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.provider-list {
  display: grid;
  gap: 9px;
}

.provider-link {
  display: grid;
  min-height: 48px;
  grid-template-columns: 28px 1fr 16px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #24384c;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.provider-link:hover {
  border-color: #9cb5c9;
  background: #f8fbfd;
}

.provider-mark {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.provider-arrow {
  color: #7d8b99;
  font-size: 17px;
  font-weight: 400;
}

.auth-footer {
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.auth-footer p {
  margin: 0;
  font-size: 13px;
}

.auth-footer p + p {
  margin-top: 8px;
}

.auth-footer a {
  color: var(--blue-dark);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.federation-result {
  padding-bottom: 22px;
}

.federation-result-provider {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.federation-result-provider img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.federation-result-content {
  padding: 25px 0 28px;
}

.federation-result-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: #fff1df;
  color: #9a4b00;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
}

.federation-result--failed .federation-result-icon {
  background: #fff0ee;
  color: #a62d20;
}

.federation-result-content h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
  line-height: 1.2;
}

.federation-result-content > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.federation-result-footer {
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: #8491a0;
  font-size: 10px;
  font-weight: 700;
}

.federation-result-footer span {
  margin: 0 6px;
  color: var(--blue);
}

.logout-panel {
  padding-bottom: 24px;
}

.logout-copy {
  padding: 25px 0 20px;
}

.logout-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
  line-height: 1.2;
}

.logout-copy > p:last-child {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.logout-copy strong {
  color: var(--ink);
}

.logout-actions {
  display: grid;
  gap: 9px;
}

.logout-stay {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.logout-stay:hover {
  border-color: #9cb5c9;
  background: #f8fbfd;
}

.logout-stay:focus-visible {
  outline: 3px solid rgba(18, 103, 178, 0.36);
  outline-offset: 3px;
}

.logout-providers {
  margin-top: 22px;
}

.logout-providers .divider {
  margin-bottom: 12px;
}

.logout-providers ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logout-providers li {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}

.logout-providers img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.logout-success-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #e8f5ef;
  color: #176b48;
  font-size: 21px;
  font-weight: 700;
}

.logout-panel--success .logout-copy {
  padding-bottom: 4px;
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 480px) {
  .page-shell {
    padding: 16px 12px;
  }

  .public-home {
    padding: 18px 18px 22px;
  }

  .public-home-header {
    align-items: flex-start;
  }

  .public-home-header nav {
    justify-content: flex-end;
    gap: 10px 14px;
  }

  .public-home-intro {
    padding: 46px 0 32px;
  }

  .public-home-intro h1 {
    font-size: 36px;
  }

  .public-home-lede {
    font-size: 16px;
  }

  .public-home-details {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 26px 0;
  }

  .public-home-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .auth-panel {
    padding: 25px 21px 20px;
  }

  .legal-panel {
    margin: 4px 0;
    padding: 25px 21px;
  }

  .brand-lockup {
    padding-bottom: 18px;
  }

  .brand-lockup img {
    width: 92px;
    height: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .submit-spinner {
    border-right-color: transparent;
  }
}