.ch-ref-public,
.ch-ref-account {
  --ch-ref-accent: #ff3e0c;
  --ch-ref-text: #20242b;
  --ch-ref-muted: #69707d;
  --ch-ref-border: #e8ebef;
  --ch-ref-soft: #fff6f2;
  color: var(--ch-ref-text);
}

.ch-ref-public {
  padding: 54px 0 72px;
  background: #fff;
}

.ch-ref-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 32px;
  align-items: stretch;
}

.ch-ref-hero__content,
.ch-ref-reward-card,
.ch-ref-share-card,
.ch-ref-info-card,
.ch-ref-table-card,
.ch-ref-stat {
  border: 1px solid var(--ch-ref-border);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(25, 31, 39, .06);
}

.ch-ref-hero__content {
  padding: 42px;
  background: linear-gradient(135deg, #fff 0%, #fff8f5 100%);
}

.ch-ref-kicker {
  display: inline-block;
  color: var(--ch-ref-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.ch-ref-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.035em;
}

.ch-ref-hero__content > p {
  max-width: 760px;
  margin: 0;
  color: var(--ch-ref-muted);
  font-size: 17px;
  line-height: 1.65;
}

.ch-ref-invited,
.ch-ref-paused {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ch-ref-border);
  font-size: 13px;
}

.ch-ref-paused {
  background: #fff8e8;
  border-color: #f7dfa3;
}

.ch-ref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.ch-ref-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none !important;
  transition: .18s ease;
}

.ch-ref-btn--primary {
  background: var(--ch-ref-accent);
  border: 1px solid var(--ch-ref-accent);
  color: #fff !important;
}

.ch-ref-btn--primary:hover {
  transform: translateY(-1px);
  filter: brightness(.97);
}

.ch-ref-btn--ghost {
  background: #fff;
  border: 1px solid #d8dde4;
  color: #3a4049 !important;
}

.ch-ref-reward-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ch-ref-reward-card > span {
  color: var(--ch-ref-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ch-ref-reward-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.ch-ref-reward-row > div {
  padding: 20px;
  background: var(--ch-ref-soft);
  border-radius: 14px;
}

.ch-ref-reward-row strong {
  display: block;
  color: var(--ch-ref-accent);
  font-size: 34px;
  line-height: 1;
}

.ch-ref-reward-row small {
  display: block;
  margin-top: 7px;
  color: #4e5560;
  line-height: 1.4;
}

.ch-ref-reward-card p {
  margin: 0;
  color: var(--ch-ref-muted);
  font-size: 13px;
  line-height: 1.6;
}

.ch-ref-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.ch-ref-steps article {
  padding: 26px;
  border: 1px solid var(--ch-ref-border);
  border-radius: 16px;
  background: #fff;
}

.ch-ref-steps article > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--ch-ref-accent);
  font-weight: 800;
  margin-bottom: 14px;
}

.ch-ref-steps h2,
.ch-ref-rules h2,
.ch-ref-share-card h2,
.ch-ref-info-card h2,
.ch-ref-table-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
}

.ch-ref-steps p,
.ch-ref-rules li,
.ch-ref-share-card p,
.ch-ref-info-card p,
.ch-ref-table-card p {
  color: var(--ch-ref-muted);
  line-height: 1.6;
}

.ch-ref-steps p {
  margin: 8px 0 0;
}

.ch-ref-rules {
  margin-top: 26px;
  padding: 30px;
  border-radius: 16px;
  background: #f8f9fb;
  border: 1px solid #edf0f3;
}

.ch-ref-rules ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.ch-ref-rules li + li {
  margin-top: 7px;
}

.ch-ref-account {
  padding: 0 0 28px;
}

.ch-ref-account-head {
  align-items: flex-end;
}

.ch-ref-text-link {
  color: var(--ch-ref-accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}

.ch-ref-share-card {
  margin-top: 18px;
  padding: 28px;
}

.ch-ref-share-card p,
.ch-ref-info-card p,
.ch-ref-table-card p {
  margin: 7px 0 0;
}

.ch-ref-linkbox {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

.ch-ref-linkbox input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid #d9dee5;
  border-radius: 9px;
  padding: 0 13px;
  background: #fafbfc;
  color: #3c424a;
}

.ch-ref-linkbox button {
  height: 44px;
  border: 0;
  border-radius: 9px;
  padding: 0 17px;
  background: var(--ch-ref-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.ch-ref-share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.ch-ref-share-actions a,
.ch-ref-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--ch-ref-border);
  background: #fff;
  color: #555d68;
  font-size: 12px;
  text-decoration: none !important;
}

.ch-ref-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.ch-ref-stat {
  padding: 20px;
}

.ch-ref-stat span,
.ch-ref-stat small {
  display: block;
}

.ch-ref-stat span {
  color: #626a75;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ch-ref-stat strong {
  display: block;
  margin: 5px 0;
  color: #20242b;
  font-size: 30px;
  line-height: 1.1;
}

.ch-ref-stat small {
  color: #8a9099;
  line-height: 1.45;
}

.ch-ref-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  margin-top: 18px;
}

.ch-ref-reward-mini {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ch-ref-reward-mini strong,
.ch-ref-reward-mini span {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
}

.ch-ref-reward-mini strong {
  background: var(--ch-ref-soft);
  color: var(--ch-ref-accent);
}

.ch-ref-reward-mini span {
  background: #f3f5f7;
  color: #555d68;
}

.ch-ref-table-card {
  margin-top: 18px;
  overflow: hidden;
}

.ch-ref-card-title {
  padding: 24px 26px 15px;
}

.ch-ref-table {
  width: 100%;
  border-collapse: collapse;
}

.ch-ref-table th,
.ch-ref-table td {
  padding: 13px 16px;
  border-top: 1px solid #edf0f3;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

.ch-ref-table th {
  color: #737b86;
  background: #fafbfc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ch-ref-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.ch-ref-status.is-converted {
  background: #eaf8ef;
  color: #277747;
}

.ch-ref-status.is-registered {
  background: #eef3f8;
  color: #526276;
}

.ch-ref-empty {
  padding: 28px;
  color: #7a818b;
  text-align: center;
  border-top: 1px solid #edf0f3;
}

@media (max-width: 991.98px) {
  .ch-ref-hero {
    grid-template-columns: 1fr;
  }

  .ch-ref-steps {
    grid-template-columns: 1fr;
  }

  .ch-ref-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767.98px) {
  .ch-ref-public {
    padding: 30px 0 46px;
  }

  .ch-ref-hero__content,
  .ch-ref-reward-card,
  .ch-ref-share-card,
  .ch-ref-info-card {
    padding: 22px;
    border-radius: 14px;
  }

  .ch-ref-hero h1 {
    font-size: 34px;
  }

  .ch-ref-reward-row {
    grid-template-columns: 1fr;
  }

  .ch-ref-linkbox,
  .ch-ref-info-card {
    display: block;
  }

  .ch-ref-linkbox button {
    width: 100%;
    margin-top: 8px;
  }

  .ch-ref-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ch-ref-reward-mini {
    margin-top: 16px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .ch-ref-stat-grid {
    grid-template-columns: 1fr;
  }
}
