.profile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f8ff;
  color: #17233c;
}

.profile-page .navbar {
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(1, 60, 168, 0.12);
}

.profile-main {
  width: min(100% - 40px, 880px);
  margin: 0 auto;
  padding: 64px 0 80px;
  flex: 1 0 auto;
}

.profile-heading {
  margin-bottom: 28px;
}

.profile-eyebrow {
  margin: 0 0 8px;
  color: #014ec5;
  font-size: 12px;
  font-weight: 700;
}

.profile-heading h1 {
  margin: 0 0 10px;
  color: #102c61;
  font-size: 40px;
  line-height: 1.15;
}

.profile-heading > p:last-child {
  margin: 0;
  color: #53627b;
  font-size: 16px;
}

.profile-card {
  overflow: hidden;
  border: 1px solid #dce4f2;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 44, 97, 0.08);
}

.profile-card[hidden] {
  display: none;
}

.profile-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 190px;
  padding: 32px 40px;
  background: #ffefd0;
  border-bottom: 1px solid #f0d9ad;
}

.profile-avatar {
  display: grid;
  flex: 0 0 92px;
  width: 92px;
  aspect-ratio: 1;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #014ec5;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.profile-identity h2 {
  margin: 0 0 6px;
  color: #102c61;
  font-size: 28px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-identity .profile-eyebrow {
  margin-bottom: 8px;
}

.profile-identifier {
  margin: 0;
  color: #53627b;
  overflow-wrap: anywhere;
}

.profile-details {
  padding: 30px 40px 34px;
}

.profile-details h2 {
  margin: 0 0 22px;
  color: #102c61;
  font-size: 20px;
}

.profile-details dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.profile-details dl > div {
  min-width: 0;
}

.profile-details dt {
  margin-bottom: 7px;
  color: #68768c;
  font-size: 13px;
}

.profile-details dd {
  margin: 0;
  color: #17233c;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 40px;
  border-top: 1px solid #e6ebf3;
}

.profile-community-link {
  color: #014ec5;
  font-weight: 600;
  text-decoration: none;
}

.profile-community-link:hover {
  text-decoration: underline;
}

.profile-community-link span {
  padding-left: 5px;
}

.profile-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #c7d3e7;
  border-radius: 4px;
  background: #fff;
  color: #102c61;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.profile-signout:hover {
  border-color: #014ec5;
  background: #f5f8ff;
}

.profile-signout:disabled {
  cursor: wait;
  opacity: 0.65;
}

.profile-status {
  min-height: 24px;
  margin: 20px 0 0;
  color: #53627b;
}

.profile-status[hidden] {
  display: none;
}

.profile-page .footer {
  flex: 0 0 auto;
  background: #fff;
}

.profile-page .footer a {
  color: #014ec5;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 640px) {
  .profile-main {
    width: min(100% - 32px, 880px);
    padding: 42px 0 56px;
  }

  .profile-heading h1 {
    font-size: 34px;
  }

  .profile-banner {
    align-items: flex-start;
    gap: 18px;
    min-height: auto;
    padding: 26px 22px;
  }

  .profile-avatar {
    flex-basis: 68px;
    width: 68px;
    font-size: 22px;
  }

  .profile-identity h2 {
    font-size: 23px;
  }

  .profile-details {
    padding: 26px 22px;
  }

  .profile-details dl {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .profile-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 20px 22px;
  }

  .profile-signout {
    width: 100%;
  }
}