:root {
  color-scheme: dark;
  font-family: "Geist", system-ui, sans-serif;
  background: #171622;
  color: #f7f5ff;
}

body {
  margin: 0;
  padding: clamp(1.25rem, 5vw, 4rem);
}

main { max-width: 66rem; margin-inline: auto; }

header, .links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

header { justify-content: space-between; margin-bottom: 2rem; }
.account {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .45rem;
  max-width: 100%;
  min-width: 0;
  margin-inline-start: auto;
}

.account-email, .tile-account {
  overflow-wrap: anywhere;
  text-align: end;
  color: #d0c9e3;
}

h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: -.04em; }
h2 { margin: 0; font-size: 1.3rem; }
p { line-height: 1.5; color: #d0c9e3; }

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.apps li {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  border: 1px solid #504862;
  border-radius: 1rem;
  background: #242135;
}

.apps li[hidden] { display: none; }

.links { margin-top: auto; }

.tile-account {
  margin-inline-start: auto;
  min-width: 0;
  max-width: 100%;
}

a, button {
  color: #e4d2ff;
  font: inherit;
  font-weight: 650;
}

button, .button, .links a {
  border: 1px solid #78628e;
  border-radius: .5rem;
  padding: .55rem .9rem;
  background: #322843;
  text-decoration: none;
  cursor: pointer;
}

a:hover, button:not(:disabled):hover { color: #fff; text-decoration: underline; }
:focus-visible { outline: 2px solid #e4d2ff; outline-offset: 4px; }

#login:not([hidden]) {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .85rem;
  margin-bottom: 1.25rem;
}

#login label, #sso-login label { display: grid; gap: .3rem; }
#login input, #sso-login input, .recovery-form input {
  background: #242135;
  color: inherit;
  font: inherit;
  border: 1px solid #78628e;
  border-radius: .5rem;
  padding: .55rem .7rem;
}

.recovery-form:not([hidden]) {
  display: grid;
  gap: .9rem;
  max-width: 28rem;
}

.recovery-form label { display: grid; gap: .3rem; }

button:disabled, input:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.recovery-form button { justify-self: start; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.recovery-account { margin: 0; overflow-wrap: anywhere; }


/* Shared Hub sign-in password visibility: hidden until explicitly revealed. */
.password-entry { position: relative; display: block; }
.password-entry input { box-sizing: border-box; width: 100%; }
#login .password-entry input, #sso-login .password-entry input { padding-right: 3.35rem; }
.password-visibility {
  position: absolute;
  top: 50%;
  right: .125rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.65rem;
  min-height: 2.65rem;
  padding: .25rem;
  touch-action: manipulation;
  user-select: none;
}
.password-visibility svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.password-visibility[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  pointer-events: none;
}
