/* Public referral / ownership program page */

:root {
  --ref-bg: #080808;
  --ref-panel: rgba(255, 255, 255, 0.055);
  --ref-panel-strong: rgba(255, 255, 255, 0.085);
  --ref-line: rgba(255, 255, 255, 0.12);
  --ref-line-soft: rgba(255, 255, 255, 0.075);
  --ref-text: #ffffff;
  --ref-muted: rgba(255, 255, 255, 0.66);
  --ref-dim: rgba(255, 255, 255, 0.44);
  --ref-gold: #ffb22e;
  --ref-gold-strong: #ff9d00;
  --ref-blue: #7bb7ff;
  --ref-green: #55d98b;
}

/* script.js early-returns on this page, so the footer never gets .visible. */
.footer {
  opacity: 1;
  transform: translateY(0);
}

.pub-ref-page {
  position: relative;
  overflow: hidden;
  padding-bottom: 72px;
  background:
    linear-gradient(180deg, rgba(255, 178, 46, 0.08), transparent 360px),
    linear-gradient(135deg, rgba(123, 183, 255, 0.08), transparent 38%),
    var(--ref-bg);
  isolation: isolate;
}

.pub-ref-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 76%);
}

.pub-ref-invite-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 32px;
  border-bottom: 1px solid rgba(255, 178, 46, 0.24);
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(18px);
}

.pub-ref-invite-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.pub-ref-invite-text {
  flex: 1;
  display: grid;
  gap: 2px;
}

.pub-ref-invite-text strong {
  color: var(--ref-text);
  font-size: 14px;
  font-weight: 700;
}

.pub-ref-invite-text span {
  color: var(--ref-muted);
  font-size: 13px;
}

.pub-ref-invite-cta,
.pub-ref-btn-primary,
.pub-ref-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.pub-ref-invite-cta,
.pub-ref-btn-primary {
  border: 0;
  color: #080808;
  background: linear-gradient(180deg, #ffd274, var(--ref-gold-strong));
  box-shadow: 0 18px 34px rgba(255, 157, 0, 0.22);
}

.pub-ref-invite-cta {
  min-height: 36px;
  padding: 0 16px;
  white-space: nowrap;
}

.pub-ref-btn-primary {
  padding: 0 22px;
}

.pub-ref-invite-cta:hover,
.pub-ref-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(255, 157, 0, 0.28);
}

.pub-ref-btn-ghost {
  padding: 0 18px;
  border: 1px solid var(--ref-line);
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.035);
}

.pub-ref-btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--ref-text);
  background: rgba(255, 255, 255, 0.07);
}

.pub-ref-btn-large {
  min-height: 52px;
  padding: 0 34px;
  font-size: 15px;
}

.pub-ref-hero {
  padding: 58px 40px 46px;
}

.pub-ref-hero-inner,
.pub-ref-container {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.pub-ref-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 56px;
  align-items: center;
}

.pub-ref-hero-copy {
  max-width: 720px;
}

.pub-ref-hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 22px;
  padding: 0 12px;
  border: 1px solid rgba(255, 178, 46, 0.3);
  border-radius: 8px;
  color: var(--ref-gold);
  background: rgba(255, 178, 46, 0.11);
  font-size: 13px;
  font-weight: 700;
}

.pub-ref-hero-title {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--ref-text);
  font-size: 64px;
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

.pub-ref-hero-sub {
  max-width: 670px;
  margin: 0 0 30px;
  color: var(--ref-muted);
  font-size: 18px;
  line-height: 1.72;
}

.pub-ref-hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.pub-ref-hero-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pub-ref-hero-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  white-space: nowrap;
}

.pub-ref-hero-panel {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(10, 10, 10, 0.88);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
}

.pub-ref-hero-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 6px;
  pointer-events: none;
}

.pub-ref-panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.pub-ref-panel-head span,
.pub-ref-panel-label {
  color: var(--ref-dim);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.pub-ref-panel-head strong {
  color: var(--ref-text);
  font-size: 28px;
  font-weight: 700;
}

.pub-ref-panel-meter {
  height: 8px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.pub-ref-panel-meter span {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ref-gold), var(--ref-blue));
}

.pub-ref-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.pub-ref-panel-grid > div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.pub-ref-panel-value {
  color: var(--ref-text);
  font-size: 28px;
  font-weight: 800;
}

.pub-ref-panel-list {
  display: grid;
  gap: 8px;
}

.pub-ref-panel-list p {
  position: relative;
  margin: 0;
  padding: 11px 12px 11px 34px;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.035);
  font-size: 14px;
}

.pub-ref-panel-list p::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ref-green);
  box-shadow: 0 0 0 4px rgba(85, 217, 139, 0.12);
}

.pub-ref-section {
  padding: 68px 40px;
}

.pub-ref-hero + .pub-ref-section {
  padding-top: 32px;
}

.pub-ref-section-alt {
  border-top: 1px solid var(--ref-line-soft);
  border-bottom: 1px solid var(--ref-line-soft);
  background:
    linear-gradient(90deg, rgba(123, 183, 255, 0.055), transparent 34%),
    rgba(255, 255, 255, 0.025);
}

.pub-ref-heading {
  max-width: 760px;
  margin: 0 auto 12px;
  color: var(--ref-text);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
  text-align: center;
}

.pub-ref-subheading {
  max-width: 680px;
  margin: 0 auto 38px;
  color: var(--ref-muted);
  font-size: 16px;
  line-height: 1.65;
  text-align: center;
}

.pub-ref-benefits-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.pub-ref-benefit {
  grid-column: span 2;
  min-height: 206px;
  padding: 24px;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  background: var(--ref-panel);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.pub-ref-benefit:nth-child(5) {
  grid-column: span 2;
}

.pub-ref-benefit:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--ref-panel-strong);
}

.pub-ref-benefit-highlight {
  border-color: rgba(255, 178, 46, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 178, 46, 0.12), rgba(123, 183, 255, 0.055)),
    var(--ref-panel);
}

.pub-ref-benefit-trial {
  border-color: rgba(255, 178, 46, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 178, 46, 0.12), rgba(255, 255, 255, 0.035)),
    var(--ref-panel);
}

.pub-ref-benefit-trial .pub-ref-benefit-icon {
  color: #080808;
  background: linear-gradient(180deg, #ffd274, var(--ref-gold-strong));
  border-color: rgba(255, 178, 46, 0.42);
  font-weight: 800;
}

.pub-ref-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  color: var(--ref-gold);
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
}

.pub-ref-benefit h3 {
  margin: 0 0 9px;
  color: var(--ref-text);
  font-size: 18px;
  font-weight: 700;
}

.pub-ref-benefit p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.65;
}

.pub-ref-transparency-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  padding: 30px;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  background: var(--ref-panel);
}

.pub-ref-transparency-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(123, 183, 255, 0.22);
  border-radius: 8px;
  color: var(--ref-blue);
  background: rgba(123, 183, 255, 0.08);
}

.pub-ref-transparency-body h3 {
  margin: 0 0 8px;
  color: var(--ref-text);
  font-size: 20px;
  font-weight: 700;
}

.pub-ref-transparency-body > p {
  margin: 0 0 18px;
  color: var(--ref-muted);
  font-size: 14px;
  line-height: 1.65;
}

.pub-ref-transparency-example {
  overflow: hidden;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  font-family: monospace;
  font-size: 13px;
}

.pub-ref-list-row {
  display: grid;
  grid-template-columns: 1fr 82px 168px 100px;
  gap: 14px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.72);
}

.pub-ref-list-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.pub-ref-list-header {
  color: var(--ref-dim);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pub-ref-list-row code {
  color: var(--ref-gold);
}

.pub-ref-list-row-dim {
  opacity: 0.62;
}

.pub-ref-transparency-note {
  margin-top: 14px;
  color: var(--ref-dim);
  font-size: 13px;
  line-height: 1.55;
}

.pub-ref-auth-section {
  border-top: 1px solid rgba(255, 178, 46, 0.16);
  border-bottom: 1px solid rgba(255, 178, 46, 0.16);
  background:
    linear-gradient(90deg, rgba(255, 178, 46, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.018);
}

.pub-ref-auth-wrap,
.pub-ref-link-card,
.pub-ref-cta-card,
.pub-ref-gate-card {
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  background: var(--ref-panel);
}

.pub-ref-auth-wrap {
  padding: 30px;
  margin-bottom: 24px;
}

.pub-ref-link-card {
  padding: 22px;
  margin-bottom: 34px;
}

.pub-ref-list-title {
  margin: 0 0 16px;
  color: var(--ref-text);
  font-size: 21px;
  font-weight: 700;
}

.pub-ref-dashboard-link {
  margin-top: 18px;
  text-align: center;
}

.pub-ref-cta-card,
.pub-ref-gate-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 46px;
  text-align: center;
}

.pub-ref-cta-invited {
  margin-bottom: 14px;
  color: var(--ref-gold);
  font-size: 14px;
  font-weight: 700;
}

.pub-ref-cta-title,
.pub-ref-gate-title {
  margin: 0 0 12px;
  color: var(--ref-text);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.18;
}

.pub-ref-cta-sub,
.pub-ref-gate-desc {
  margin: 0 auto 28px;
  color: var(--ref-muted);
  font-size: 15px;
  line-height: 1.7;
}

.pub-ref-cta-note,
.pub-ref-gate-note {
  margin: 16px 0 0;
  color: var(--ref-dim);
  font-size: 13px;
  line-height: 1.5;
}

.pub-ref-gate-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.04);
}

.pub-ref-gate-trial-note {
  margin: -8px 0 24px;
  padding: 14px;
  border: 1px solid rgba(255, 178, 46, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 178, 46, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.02);
  font-size: 14px;
  line-height: 1.6;
}

.pub-ref-gate-trial-note strong {
  color: var(--ref-gold);
}

.pub-ref-gate-list {
  display: grid;
  gap: 9px;
  width: 100%;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.pub-ref-gate-list li {
  padding: 12px 14px;
  border: 1px solid var(--ref-line-soft);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.035);
  font-size: 14px;
}

.pub-ref-gate-discount-item,
.pub-ref-gate-note-discount {
  color: var(--ref-gold);
}

.pub-ref-gate-btn {
  width: 100%;
}

.pub-ref-page .ref-story-card,
.pub-ref-page .ref-point-card,
.pub-ref-page .ref-step,
.pub-ref-page .ref-transfer-col,
.pub-ref-page .ref-nontechnical-note,
.pub-ref-page .ref-empty,
.pub-ref-page .ref-table-wrap {
  border-radius: 8px;
  border-color: var(--ref-line-soft);
  background: var(--ref-panel);
}

.pub-ref-page .ref-story-card,
.pub-ref-page .ref-point-card,
.pub-ref-page .ref-step,
.pub-ref-page .ref-transfer-col {
  backdrop-filter: blur(14px);
}

.pub-ref-page .ref-story-card {
  padding: 34px;
}

.pub-ref-page .ref-story-body p,
.pub-ref-page .ref-nontechnical-body p {
  color: var(--ref-muted);
}

.pub-ref-page .ref-story-body p {
  font-size: 17px;
}

.pub-ref-page .ref-point-card,
.pub-ref-page .ref-step {
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.pub-ref-page .ref-point-card:hover,
.pub-ref-page .ref-step:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--ref-panel-strong);
}

.pub-ref-page .ref-example {
  border-radius: 8px;
  border-color: var(--ref-line-soft);
  background: rgba(255, 255, 255, 0.035);
}

.pub-ref-page .ref-nontechnical-note {
  display: block;
  border-color: rgba(255, 178, 46, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 178, 46, 0.12), rgba(85, 217, 139, 0.055)),
    rgba(255, 255, 255, 0.045);
}

.pub-ref-page .ref-nontechnical-body strong {
  color: var(--ref-text);
  font-size: 18px;
}

.pub-ref-page .ref-nontechnical-body p + p {
  margin-top: 12px;
}

.pub-ref-page .ref-transfer-scope {
  margin-top: 34px;
}

.pub-ref-page .ref-transfer-list li::before {
  content: "";
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.pub-ref-page .ref-transfer-included .ref-transfer-list li::before {
  background: var(--ref-green);
}

.pub-ref-page .ref-share-btn,
.pub-ref-page .ref-copy-btn,
.pub-ref-page .ref-link-input,
.pub-ref-page .ref-uuid-block,
.pub-ref-page .ref-uuid-value,
.pub-ref-page .ref-code {
  border-radius: 8px;
}

@media (max-width: 980px) {
  .pub-ref-hero {
    padding-top: 56px;
  }

  .pub-ref-hero-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .pub-ref-hero-copy {
    max-width: none;
    text-align: center;
  }

  .pub-ref-hero-title,
  .pub-ref-hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .pub-ref-hero-cta,
  .pub-ref-hero-proof {
    justify-content: center;
  }

  .pub-ref-hero-panel {
    max-width: 520px;
    margin: 0 auto;
  }

  .pub-ref-benefit,
  .pub-ref-benefit:nth-child(5) {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .pub-ref-invite-bar,
  .pub-ref-hero,
  .pub-ref-section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .pub-ref-invite-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .pub-ref-invite-cta {
    width: 100%;
  }

  .pub-ref-hero {
    padding-top: 44px;
    padding-bottom: 42px;
  }

  .pub-ref-hero-title {
    font-size: 48px;
  }

  .pub-ref-hero-sub {
    font-size: 16px;
  }

  .pub-ref-hero-cta,
  .pub-ref-btn-primary,
  .pub-ref-btn-ghost {
    width: 100%;
  }

  .pub-ref-hero-proof {
    display: none;
  }

  .pub-ref-hero-panel,
  .pub-ref-transparency-card,
  .pub-ref-auth-wrap,
  .pub-ref-link-card,
  .pub-ref-cta-card,
  .pub-ref-gate-card,
  .pub-ref-page .ref-story-card {
    padding: 22px;
  }

  .pub-ref-panel-grid,
  .pub-ref-panel-list {
    display: none;
  }

  .pub-ref-section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .pub-ref-heading {
    font-size: 30px;
  }

  .pub-ref-benefits-grid {
    grid-template-columns: 1fr;
  }

  .pub-ref-benefit,
  .pub-ref-benefit:nth-child(5) {
    grid-column: auto;
  }

  .pub-ref-transparency-card {
    grid-template-columns: 1fr;
  }

  .pub-ref-list-row {
    grid-template-columns: 1fr 70px;
  }

  .pub-ref-list-row span:nth-child(3),
  .pub-ref-list-row span:nth-child(4),
  .pub-ref-list-header span:nth-child(3),
  .pub-ref-list-header span:nth-child(4) {
    display: none;
  }

  .pub-ref-cta-title,
  .pub-ref-gate-title {
    font-size: 28px;
  }
}

@media (max-width: 420px) {
  .pub-ref-hero-title {
    font-size: 40px;
  }

  .pub-ref-panel-head strong,
  .pub-ref-panel-value {
    font-size: 24px;
  }
}
