/* Invite rewards: the invite page, the friend's landing page, and the small
   cards on "Me", the plans page and closed practice. Uses the tokens and base
   classes of style.css (.card, .stat-tile, .list-row, .tag, .callout, .btn). */

.ref { max-width: 880px; margin: 0 auto; }
.ref .section:first-of-type { margin-top: 28px; }

/* small cards ------------------------------------------------------------ */
.ref-me, .ref-note { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ref-me { margin-top: 12px; padding: 16px 20px; }
.ref-note { margin-top: 16px; padding: 16px 20px; border-color: color-mix(in srgb, var(--brand) 28%, var(--border)); background: linear-gradient(90deg, var(--brand-soft), var(--surface) 70%); }
.ref-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-text); }
.ref-note .ref-ico { background: var(--surface); box-shadow: var(--sh-1); }
.ref-ico svg.i { width: 21px; height: 21px; }
.ref-me-txt { display: grid; gap: 2px; min-width: 0; }
.ref-me-txt b { font-weight: 650; }
.ref-lock { margin: 12px 0 0; }
.ref-lock svg.i { width: 15px; height: 15px; }

/* share card ------------------------------------------------------------- */
.ref-share { display: grid; gap: 12px; border-top: 3px solid var(--brand); }
.ref-link { display: flex; gap: 10px; }
.ref-link input { font-family: var(--mono); font-size: .88rem; background: var(--surface-2); min-width: 0; }
.ref-link .btn { flex: none; }
.ref-share-row { gap: 8px; }
.ref-code { color: var(--muted); font-size: .9rem; }
.ref-code b { color: var(--text); font-family: var(--mono); font-size: 1.05rem; letter-spacing: .12em; margin-left: 4px; }
.ref-msg { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; line-height: 1.6; color: var(--muted); word-break: break-word; }

/* how it works ------------------------------------------------------------- */
.ref-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.ref-step { display: grid; gap: 6px; align-content: start; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--sh-1); }
.ref-step b { font-weight: 650; line-height: 1.4; }
.ref-step .muted { line-height: 1.5; }
.ref-step-ico { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 4px; }
.ref-step-ico svg.i { width: 20px; height: 20px; }
.ref-step-ico i { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 700; background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 2px var(--surface); }
@media (max-width: 720px) { .ref-steps { grid-template-columns: 1fr; } .ref-step { grid-template-columns: 40px 1fr; column-gap: 14px; } .ref-step-ico { grid-row: span 2; margin: 0; } }

/* rewards and friends --------------------------------------------------------- */
.ref-start { margin-top: 14px; gap: 12px; }
.ref-start .muted { flex: 1; min-width: 220px; }
.ref-friend { gap: 10px; flex-wrap: wrap; }
.ref-friend .title small { font-weight: 400; }
.ref-friend-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .78rem; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.ref-faq p { line-height: 1.65; }
.ref-demo { border-style: dashed; background: var(--surface-2); box-shadow: none; }

/* the friend's landing page ----------------------------------------------------- */
.ref-hero { max-width: 640px; margin: 24px auto 0; padding: 32px 32px 24px; text-align: left; border-top: 3px solid var(--brand); }
.ref-hero-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 14px; }
.ref-hero-ico svg.i { width: 26px; height: 26px; }
.ref-hero h1 { font-size: 1.7rem; margin: 6px 0 10px; line-height: 1.3; }
.ref-hero-lead { color: var(--muted); line-height: 1.65; margin: 0 0 16px; }
.ref-gets { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.ref-gets li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.55; }
.ref-gets svg.i { width: 20px; height: 20px; flex: none; color: var(--s-green); margin-top: 1px; }
.ref-hero-btns { margin-top: 6px; }
.ref-hero-foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); line-height: 1.55; }
@media (max-width: 560px) {
  .ref-hero { padding: 24px 18px 18px; margin-top: 8px; }
  .ref-hero h1 { font-size: 1.4rem; }
  .ref-hero-btns .btn { flex: 1 1 100%; }
  .ref-link { flex-direction: column; }
  .ref-me .btn, .ref-note .btn { flex: 1 1 auto; }
}
