/* Hexium campaigns. Loaded after bugbounty.css and scoped to .cp-page so it
   shares the bug bounty tokens, type and surfaces instead of inventing a new
   visual language. */

/* --------------------------------------------------------------- stat strip */

.cp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cp-stat {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--bb-border);
  border-radius: 8px;
  background: var(--bb-surface);
}

.cp-stat b {
  color: var(--bb-text);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.cp-stat span {
  color: var(--bb-text-muted);
  font-size: 12px;
}

/* -------------------------------------------------------------- how it works */

.cp-how {
  display: grid;
  gap: 0;
  padding: 2px 20px;
}

.cp-how-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--bb-border);
}

.cp-how-step:last-child {
  border-bottom: 0;
}

.cp-how-step b {
  display: block;
  color: var(--bb-text);
  font-size: 14px;
  font-weight: 700;
}

.cp-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--bb-border-strong);
  border-radius: 50%;
  color: var(--bb-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.cp-small {
  display: block;
  margin-top: 2px;
  color: var(--bb-text-muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
}

/* ------------------------------------------------------------------- cards */

.cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px 16px;
}

.cp-card {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  color: var(--bb-text);
}

.cp-card:hover {
  text-decoration: none;
}

.cp-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--bb-border);
  border-radius: 8px;
  background: var(--bb-thumb);
}

.cp-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.cp-card:hover .cp-card-thumb img {
  transform: scale(1.03);
}

.cp-card-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--bb-text-muted);
  font-size: 30px;
  font-weight: 700;
}

.cp-card-tags {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}

.cp-card-tags span {
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.cp-card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--bb-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cp-card-rate {
  color: var(--bb-green);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cp-card-rate span {
  color: var(--bb-text-muted);
  font-size: 12px;
  font-weight: 400;
}

.cp-card-meta {
  display: flex;
  gap: 12px;
  color: var(--bb-text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cp-meter {
  overflow: hidden;
  height: 4px;
  border-radius: 2px;
  background: var(--bb-border);
}

.cp-meter i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--bb-green);
}

.cp-meter-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  color: var(--bb-text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ detail */

.cp-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  margin-top: 26px;
  border: 1px solid var(--bb-border);
  border-radius: 8px;
  background: var(--bb-thumb);
  object-fit: cover;
}

.cp-program-follow {
  margin-top: 20px;
}

.cp-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 20px;
  margin-top: 26px;
}

.cp-main {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.cp-panel {
  display: grid;
  gap: 10px;
}

.cp-panel-title {
  margin: 0;
  color: var(--bb-text);
  font-size: 16px;
  font-weight: 700;
}

.cp-brief {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--bb-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.cp-kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bb-border);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cp-kv:last-child {
  border-bottom: 0;
}

.cp-kv > span:first-child {
  color: var(--bb-text-muted);
}

.cp-kv > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--bb-text);
  font-weight: 600;
  text-align: right;
}

.cp-mono {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.92em;
}

.cp-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cp-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bb-moderate-soft);
  color: var(--bb-moderate);
  font-size: 11px;
  font-weight: 600;
}

.cp-side {
  position: sticky;
  top: 68px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.cp-rate strong {
  display: block;
  color: var(--bb-green);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.cp-rate span {
  display: block;
  color: var(--bb-text-muted);
  font-size: 12px;
}

.cp-side-kv {
  margin-top: 2px;
  border-top: 1px solid var(--bb-border);
}

.cp-block {
  width: 100%;
}

.cp-warn {
  padding: 10px 12px;
  border: 1px solid var(--bb-gold);
  border-radius: 8px;
  background: var(--bb-gold-soft);
  color: var(--bb-gold);
  font-size: 12px;
  font-weight: 600;
}

.cp-form {
  display: grid;
  gap: 8px;
}

.cp-field {
  display: grid;
  gap: 6px;
  color: var(--bb-text);
  font-size: 13px;
  font-weight: 700;
}

.cp-field input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--bb-border-strong);
  border-radius: 8px;
  background: var(--bb-surface-muted);
  color: var(--bb-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
}

.cp-field input::placeholder {
  color: var(--bb-text-muted);
  opacity: 0.7;
}

.cp-field input:focus {
  outline: none;
  border-color: var(--bb-accent);
}

.cp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-rank {
  display: inline-block;
  min-width: 18px;
  color: var(--bb-text-muted);
  font-weight: 700;
}

.cp-rank.top {
  color: var(--bb-text);
}

.cp-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 30px 20px;
  color: var(--bb-text-muted);
  font-size: 13px;
  text-align: center;
}

.cp-loading {
  margin-top: 26px;
  color: var(--bb-text-muted);
  font-size: 13px;
}

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

  .cp-side {
    position: static;
  }
}

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

  .cp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .cp-cover {
    aspect-ratio: 16 / 9;
  }
}
