/* Only what the GitHub scorecard needs on top of tool_page.css: the lookup form,
   the result card, the grade block, the subject and language bars, the repo
   cards and the profile checklist. */
.gh-tool {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.gh-tool [hidden] {
  display: none !important;
}

.gh-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.gh-input {
  flex: 1 1 320px;
  max-width: 420px;
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
}

.gh-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.gh-input:focus {
  outline: none;
  border-color: #6e00ff;
}

.gh-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: #6e00ff;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gh-submit:hover {
  opacity: 0.88;
}

.gh-status {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

.gh-status.is-error {
  color: #ff8f8f;
}

.gh-result {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.gh-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(110, 0, 255, 0.18) 0%, rgba(8, 2, 18, 0.6) 100%);
}

.gh-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

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

.gh-identity-name {
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.gh-identity-login {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
}

.gh-identity-bio {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 22px;
}

.gh-identity-bio:empty {
  display: none;
}

.gh-identity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.gh-identity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gh-identity-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #bc8aff;
  font-size: 14px;
}

.gh-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gh-grade-value {
  color: #fff;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}

.gh-grade-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-align: center;
}

.gh-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 2, 18, 0.6);
}

.gh-panel h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.gh-subjects {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gh-subject {
  display: grid;
  grid-template-columns: 150px 1fr 44px 36px;
  align-items: center;
  gap: 16px;
}

.gh-subject-name {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.gh-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.gh-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6e00ff 0%, #bc8aff 100%);
  transition: width 0.6s ease;
}

.gh-subject-score {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.gh-subject-grade {
  color: #bc8aff;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.gh-langs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gh-lang {
  display: grid;
  grid-template-columns: 140px 1fr 48px;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.gh-lang-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-align: right;
}

.gh-repos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.gh-repo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.gh-repo:hover {
  border-color: #6e00ff;
  color: inherit;
  text-decoration: none;
}

.gh-repo-name {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  word-break: break-word;
}

.gh-repo-description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 20px;
}

.gh-repo-description:empty {
  display: none;
}

.gh-repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.gh-repo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gh-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.gh-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 22px;
}

/* Both state icons ship in the markup and CSS picks one, so the JS never has to
   know an icon class name. */
.gh-check i {
  flex-shrink: 0;
  display: none;
  font-size: 18px;
  line-height: 22px;
}

.gh-check.is-passed .gh-check-yes {
  display: inline-block;
  color: #4ed6a8;
}

.gh-check.is-missing .gh-check-no {
  display: inline-block;
  color: #ffb27a;
}

.gh-check-detail {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.gh-check-detail:empty {
  display: none;
}

.gh-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.gh-note {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

@media (max-width: 992px) {
  .gh-subject {
    grid-template-columns: 120px 1fr 40px 32px;
    gap: 12px;
  }

  .gh-lang {
    grid-template-columns: 110px 1fr 44px;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .gh-tool {
    gap: 24px;
  }

  .gh-card {
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 20px;
  }

  .gh-avatar {
    width: 64px;
    height: 64px;
  }

  .gh-identity-name {
    font-size: 20px;
  }

  .gh-grade {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .gh-grade-value {
    font-size: 44px;
  }

  .gh-panel {
    padding: 20px;
  }

  .gh-subject {
    grid-template-columns: 1fr 44px 36px;
    grid-template-areas: "name score grade" "bar bar bar";
    gap: 8px 12px;
  }

  .gh-subject-name {
    grid-area: name;
  }

  /* Scoped to the subject rows: the language rows share .gh-bar but keep their
     own three-column grid, and a stray grid-area collapsed them to zero width. */
  .gh-subject .gh-bar {
    grid-area: bar;
  }

  .gh-lang {
    grid-template-columns: 100px 1fr 40px;
  }

  .gh-repos,
  .gh-checks {
    grid-template-columns: 1fr;
  }
}
