/* Creator profile pages (/creators/). Layers on tools.css and
   creator-directory.css: same shell, tokens, metric cards, band bars and
   related-link groups. Only the profile-specific parts live here.
   Bump profilesCssVersion in scripts/generate-creator-profiles.mjs on change. */

/* ---------- identity ---------- */

.cp-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 6px;
}

.cp-identity h1 {
  margin: 0;
  overflow-wrap: anywhere;
}

.cp-identity-sub {
  margin-top: 6px;
  color: var(--ink-60);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.cp-avatar {
  display: block;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.06);
}

.cp-answer {
  margin-top: 18px;
}

.cp-external svg {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  vertical-align: -2px;
}

/* ---------- facts ---------- */

.cp-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cp-facts .metric:first-child {
  grid-column: auto;
}

.cp-facts dd {
  overflow-wrap: anywhere;
}

/* ---------- percentile meters ---------- */

.cp-meters {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-meters li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--dir-radius, 14px);
  background: rgba(255, 255, 255, 0.86);
}

.cp-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 900;
}

.cp-meter-label a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--dir-tint-line, rgba(56, 71, 254, 0.18));
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.cp-meter-label a:hover,
.cp-meter-label a:focus-visible {
  color: var(--primary);
}

.cp-meter-value {
  flex: 0 0 auto;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.cp-meter-track {
  position: relative;
  display: block;
  height: 10px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.06);
}

.cp-meter-fill {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #6b78ff);
  transform-origin: left center;
  animation: dir-bar-grow 640ms var(--dir-ease, ease-out) both;
}

.cp-meter-median {
  position: absolute;
  top: -3px;
  left: var(--m, 50%);
  width: 2px;
  height: 16px;
  border-radius: 1px;
  background: var(--ink);
  opacity: 0.35;
}

.cp-meter-meta {
  margin-top: 8px;
  color: var(--ink-45);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cp-band-current .dir-band-label {
  color: var(--primary);
  font-weight: 900;
}

.cp-band-current .dir-band-track {
  box-shadow: 0 0 0 2px rgba(56, 71, 254, 0.22);
}

/* ---------- rates ---------- */

.cp-rates td {
  font-variant-numeric: tabular-nums;
}

/* ---------- similar creators ---------- */

.cp-similar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-similar-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--dir-radius, 14px);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--dir-ease, ease-out);
}

.cp-similar-avatar {
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.06);
}

.cp-similar-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cp-similar-text strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-similar-text small {
  color: var(--ink-45);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .cp-similar-card:hover {
    border-color: rgba(56, 71, 254, 0.38);
    background: #fff;
    transform: translateY(-2px);
  }
}

.cp-similar-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.cp-similar-card:active {
  transform: scale(0.985);
}

/* ---------- lists ---------- */

.cp-list .dir-handle-name {
  max-width: 220px;
}

.cp-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.cp-pager a,
.cp-pager span {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.cp-pager a:hover,
.cp-pager a:focus-visible {
  border-color: rgba(56, 71, 254, 0.38);
  color: var(--primary);
}

.cp-pager [aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.cp-count {
  margin-left: auto;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums;
}

.cp-handles {
  display: flex !important;
  flex-wrap: wrap;
  gap: 4px 12px !important;
  margin-top: 10px;
  padding-top: 10px !important;
  border-top: 1px solid var(--line);
}

.cp-handles li a {
  display: inline !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  color: var(--ink-60) !important;
  font-size: 12px !important;
}

.cp-handles li a:hover,
.cp-handles li a:focus-visible {
  background: none !important;
  color: var(--primary) !important;
}

/* ---------- removal ---------- */

.cp-removal {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfbfc;
}

.cp-removal h2 {
  font-size: 18px;
}

.cp-removal p {
  max-width: 72ch;
  margin-top: 10px;
  color: var(--ink-60);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 650;
}

.cp-removal-alt {
  margin-left: 10px;
  color: var(--ink-60);
  font-size: 14px;
  font-weight: 800;
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .cp-facts,
  .cp-similar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cp-identity {
    gap: 14px;
  }

  .cp-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .cp-similar {
    grid-template-columns: 1fr;
  }

  .cp-meter-head {
    flex-direction: column;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cp-meter-fill {
    animation: none;
  }

  .cp-similar-card {
    transition: none;
  }
}
