.qb-context {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 13px;
}

.qb-list {
  display: grid;
  gap: 9px;
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.qb-card {
  display: grid;
  grid-template-columns: 28px 70px minmax(0, 1fr) 105px;
  gap: 15px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px 18px;
}

.qb-headshot {
  position: relative;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--soft);
  overflow: hidden;
  flex-shrink: 0;
}

.qb-headshot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.qb-initials {
  font-size: 21px;
  font-weight: 650;
  color: var(--accent);
}

.qb-name {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}

.qb-name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.qb-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
  line-height: 1.6;
}

.qb-grade {
  text-align: right;
  display: grid;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.qb-grade strong {
  font-family: "Space Grotesk", var(--font);
  font-size: 30px;
  font-weight: 500;
  color: var(--accent);
}

.qb-grade span {
  color: var(--muted);
  font-size: 10px;
}

.qb-badge {
  display: inline-block;
  font-size: 9px;
  padding: 3px 6px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  margin-top: 6px;
  color: var(--muted);
}

.qb-unavailable {
  margin-top: 32px;
}

.qb-unavailable > h3,
.qb-section-title {
  font-size: 19px;
  margin-bottom: 9px;
}

.qb-unavailable .qb-card {
  background: var(--sidebar);
}

.qb-method,
.qb-sources {
  margin-top: 23px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.qb-method summary,
.qb-sources summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.qb-method p {
  margin-top: 12px;
  line-height: 1.75;
}

.qb-sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  padding: 0;
}

.qb-back {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 12px;
}

.qb-profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 15px;
}

.qb-profile-header > .qb-grade {
  margin-left: auto;
  min-width: 100px;
}

.qb-profile-name {
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1.2;
}

.qb-headshot-large {
  width: 120px;
  height: 120px;
}

.qb-headshot-large .qb-initials {
  font-size: 35px;
}

.qb-totals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin: 20px 0 30px;
}

.qb-totals > div {
  padding: 14px;
  background: var(--panel);
}

.qb-totals dt {
  color: var(--muted);
  font-size: 10px;
}

.qb-totals dd {
  font-size: 22px;
  font-family: "Space Grotesk", var(--font);
  margin: 5px 0 0;
}

.qb-table-frame {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  overflow: hidden;
}

.qb-table-wrap {
  overflow-x: auto;
}

.qb-table-wrap:focus-visible {
  outline-offset: -3px;
}

.qb-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: var(--panel);
}

.qb-table-caption {
  margin: 0;
  padding: 15px;
  font-size: 12px;
  font-weight: 600;
}

.qb-table th,
.qb-table td {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.qb-table th:first-child,
.qb-table thead th:nth-child(2),
.qb-table td:nth-child(2) {
  text-align: left;
}

.qb-table thead {
  background: var(--soft);
  font-size: 10px;
}

.qb-table tbody th {
  font-weight: 500;
}

.qb-table .qb-badge {
  display: block;
  font-size: 8px;
}

@media (max-width: 720px) {
  .qb-card {
    grid-template-columns: 22px 53px minmax(0, 1fr) 67px;
    gap: 9px;
    padding: 12px;
  }

  .qb-headshot {
    width: 53px;
    height: 53px;
  }

  .qb-name {
    font-size: 13px;
  }

  .qb-meta {
    font-size: 10px;
  }

  .qb-grade strong {
    font-size: 24px;
  }

  .qb-grade span {
    font-size: 9px;
  }

  .qb-profile-header {
    padding: 15px;
    gap: 13px;
    flex-wrap: wrap;
  }

  .qb-headshot-large {
    width: 85px;
    height: 85px;
  }

  .qb-profile-name {
    font-size: 23px;
  }

  .qb-profile-header > .qb-grade {
    min-width: 75px;
  }

  .qb-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qb-totals dd {
    font-size: 20px;
  }

  .qb-context {
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .qb-card {
    grid-template-columns: 20px 42px minmax(0, 1fr);
    gap: 8px;
  }

  .qb-headshot {
    width: 42px;
    height: 42px;
  }

  .qb-card > .qb-grade {
    grid-column: 3;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  .qb-profile-header > .qb-grade {
    margin-left: 0;
  }

  .qb-headshot-large {
    width: 75px;
    height: 75px;
  }
}

.qb-team-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.qb-team-logo {
  width: 21px;
  height: 21px;
  object-fit: contain;
  flex-shrink: 0;
}

.qb-list-count {
  margin: 0 0 10px;
  font-size: 11px;
}

.qb-sources > p {
  margin-top: 12px;
}

.qb-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.qb-badges:empty {
  display: none;
}

.qb-backup-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #c99b24;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}
