/* GitHub-style member cards on the Team page (see createSectionBlockItem kind "ghprofile"). */

.workspace-window .app-page__block--ghprofile {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  border: 1px solid rgb(99 102 241 / 0.18);
  border-radius: 18px;
  background: rgb(255 255 255 / 0.6);
}

.gh-profile__side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gh-profile__avatar {
  position: relative;
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgb(99 102 241 / 0.2);
  border-radius: 50%;
  background: #eef0ff;
}

.gh-profile__avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* Zoom slightly so the comic-panel border lines stay outside the circle. */
  transform: scale(1.12);
}

.gh-profile__avatar[data-fit="contain"] img {
  object-fit: contain;
  padding: 18%;
  transform: none;
}

.gh-profile__name {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  color: #1e1b4b;
}

.gh-profile__login {
  font-size: 15px;
  color: #4f46e5 !important;
  text-decoration: none;
}

.gh-profile__role {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgb(99 102 241 / 0.12);
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
}

.gh-profile__bio {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgb(30 27 75 / 0.86);
}

.gh-profile__meta {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: rgb(30 27 75 / 0.66);
}

.gh-profile__main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.gh-profile__readme {
  border: 1px solid rgb(99 102 241 / 0.18);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.7);
  overflow: hidden;
}

.gh-profile__file {
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid rgb(99 102 241 / 0.14);
  background: rgb(243 244 255 / 0.9);
  font: 600 12px/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  color: #4f46e5;
}

.workspace-window .gh-profile__readme .gh-profile__headline {
  margin: 12px 16px 4px !important;
  padding: 0 !important;
  font-size: 16px;
  font-weight: 800;
  color: #1e1b4b;
}

.gh-profile__readme ul {
  margin: 0;
  padding: 0 16px 14px 32px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgb(30 27 75 / 0.82);
}

.gh-profile__label {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6366f1;
}

.gh-profile__pinned {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.gh-repo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgb(99 102 241 / 0.2);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.72);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gh-repo:hover {
  border-color: rgb(99 102 241 / 0.5);
  transform: translateY(-1px);
}

.gh-repo strong {
  font-size: 13.5px;
  color: #4338ca;
}

.gh-repo p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgb(30 27 75 / 0.72);
}

.gh-repo__foot {
  display: flex;
  gap: 12px;
  margin-top: auto;
  font-size: 12px;
  color: rgb(30 27 75 / 0.62);
}

.gh-repo__lang::before,
.gh-profile__langlegend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--lang);
  vertical-align: -1px;
}

.gh-profile__langbar {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  gap: 2px;
}

.gh-profile__langlegend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: rgb(30 27 75 / 0.72);
}

.gh-profile__graph {
  display: flex;
  gap: 3px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid rgb(99 102 241 / 0.16);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.6);
}

.gh-profile__week {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  gap: 3px;
}

.gh-profile__week i {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #e9ebf8;
}

.gh-profile__week i[data-level="1"] { background: #9be9a8; }
.gh-profile__week i[data-level="2"] { background: #40c463; }
.gh-profile__week i[data-level="3"] { background: #30a14e; }
.gh-profile__week i[data-level="4"] { background: #216e39; }

@media (width <= 760px) {
  .workspace-window .app-page__block--ghprofile {
    grid-template-columns: 1fr;
  }

  .gh-profile__avatar {
    max-width: 120px;
  }
}

/* README box: the legacy list styles nowrap/pad every li and p, so restate them here. */
.workspace-window .gh-profile__readme {
  min-width: 0;
}

.workspace-window .gh-profile__readme .gh-profile__file,
.workspace-window .gh-profile__readme .gh-profile__headline,
.workspace-window .gh-profile__readme ul {
  max-width: none !important;
}

.workspace-window .gh-profile__readme .gh-profile__file {
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 9px 16px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.workspace-window .gh-profile__readme .gh-profile__headline {
  margin: 14px 18px 6px !important;
  padding: 0 !important;
  font-size: 15.5px !important;
  line-height: 1.45 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.workspace-window .gh-profile__readme ul {
  margin: 0 !important;
  padding: 0 18px 16px 36px !important;
  list-style: disc !important;
}

.workspace-window .gh-profile__readme li {
  display: list-item !important;
  margin: 3px 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.workspace-window .gh-profile__readme li::before {
  content: none !important;
}

.workspace-window .gh-profile__bio,
.workspace-window .gh-profile__meta li {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

/* Merged member card: hover swaps the portrait for the character drawing. */
.gh-profile__avatar img.gh-profile__avatar-alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gh-profile__avatar:hover img.gh-profile__avatar-alt {
  opacity: 1;
}

.gh-profile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.workspace-window .gh-profile__links a {
  padding: 4px 12px;
  border: 1px solid rgb(99 102 241 / 0.24);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.7);
  color: #4338ca !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.gh-profile__links a:hover {
  border-color: rgb(99 102 241 / 0.5);
}

.app-page__ai-usage-asof {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.6;
}
