/* Referral */
.ref-grid{display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:16px;align-items:stretch}
.ref-main{display:flex;flex-direction:column;gap:16px;min-width:0}

/* Earnings card */
.ref-earn{position:relative;min-height:220px;padding:24px;display:flex;flex-direction:column;justify-content:space-between}
.ref-earn .art{left:auto;width:50%}
.ref-earn-top{position:relative;z-index:2;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.ref-earn-top .l{font-size:12px;font-weight:500;color:var(--text-3);margin-bottom:4px}
.ref-earn-top .sk{margin-bottom:6px}
.ref-earn-top .err-box{margin-top:6px}
.ref-earn-v{font-size:44px;font-weight:500;letter-spacing:-1.6px;line-height:52px;font-variant-numeric:tabular-nums}
.ref-earn-s{font-size:13px;color:var(--text-3)}
.ref-earn-sp{font-size:14px;color:var(--text-2);margin-top:6px;min-height:20px}
.ref-earn-sp b{font-weight:500}
.ref-bot{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--text-3);margin-top:4px}
.ref-bot .i{width:13px;height:13px}
.ref-pill{display:inline-flex;align-items:center;gap:6px;margin-top:16px;padding:5px 10px;border-radius:100px;background:var(--accent-soft);color:var(--accent-text);font-size:12px;font-weight:500}
.ref-pill .i{width:13px;height:13px}

/* Commission card */
.ref-comm{flex:1;display:flex;flex-direction:column;gap:22px;min-height:0}
.ref-comm .card-meta{font-size:11px}
.ref-figs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.ref-fig{display:flex;flex-direction:column;gap:2px;min-width:0}
.ref-fig + .ref-fig{padding-left:16px;border-left:1px solid var(--line)}
.ref-fig .l{font-size:12px;font-weight:500;color:var(--text-3);line-height:15px;margin-bottom:4px}
.ref-fig .v{font-size:20px;font-weight:500;letter-spacing:-.5px;line-height:26px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.ref-fig .s{font-size:11px;color:var(--text-3);line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ref-fig .s b{font-weight:500}
.ref-fig .sk{margin-bottom:4px}
.ref-weekly{flex:1;display:flex;flex-direction:column;gap:10px;min-height:190px}
.ref-weekly-h{display:flex;justify-content:space-between;align-items:center;gap:12px}
.ref-weekly-h .l{font-size:12px;font-weight:500;color:var(--text-3)}
.ref-now{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--text-2);white-space:nowrap}
.ref-now i{width:8px;height:8px;border-radius:2px;background:var(--accent)}
.ref-bars{flex:1;display:flex;min-height:140px}
.ref-bars .bars{flex:1;min-height:140px}
.ref-weekly .axis{margin-top:0}

/* Invite card */
.ref-invite{padding:24px;display:flex;flex-direction:column;gap:16px;min-width:0}
.ref-inv-h h2{font-size:16px;font-weight:500;line-height:20px}
.ref-inv-h p{font-size:13px;color:var(--text-2);margin-top:4px;line-height:19px}
.ref-field{display:flex;flex-direction:column;gap:8px}
.ref-field .l{font-size:13px;line-height:18px;font-weight:500;color:var(--text)}
/* Read-only copy field */
.ref-link{display:flex;align-items:center;gap:10px;padding:6px 6px 6px 12px;border-radius:8px;background:var(--bg-alt);border:1px solid var(--line);min-width:0}
.ref-link > .i{width:15px;height:15px;color:var(--text-3);flex:0 0 15px}
.ref-link .mono{flex:1;font-size:13px;color:var(--text)}
.ref-link .c-btn{flex:0 0 auto}
.ref-how{padding-top:16px;border-top:1px solid var(--line)}
.ref-how h3{font-size:14px;font-weight:500;margin-bottom:12px}
.ref-how ol{list-style:none;display:flex;flex-direction:column;gap:12px;margin:0;padding:0}
.ref-how li{display:flex;gap:12px;align-items:flex-start}
.ref-how li > span{width:22px;height:22px;border-radius:50%;background:var(--accent-soft);color:var(--accent-text);font-size:12px;font-weight:500;display:grid;place-items:center;flex:0 0 22px}
.ref-how b{display:block;font-size:13px;font-weight:500;line-height:18px}
.ref-how p{font-size:12px;color:var(--text-2);line-height:17px;margin-top:2px}
.ref-note{display:flex;gap:8px;font-size:12px;line-height:17px;color:var(--text-3)}
.ref-note .i{width:14px;height:14px;flex:0 0 14px;margin-top:1px}

/* People you invited */
.ref-people{overflow:hidden;margin-top:16px}
.ref-ppl-h{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 22px}
.ref-ppl-h h2{font-size:16px;font-weight:500;line-height:20px}
.ref-ppl-h .link-btn .i{width:13px;height:13px}
.ref-tbl{table-layout:fixed}
/* The console table; only the 8px cell sides and the column widths are the page's own */
.ref-tbl th{border-top:1px solid var(--line)}
.ref-tbl th,.ref-tbl td{padding-left:8px;padding-right:8px}
.ref-c-join{width:140px}.ref-c-meth{width:160px}.ref-c-last{width:140px}.ref-c-st{width:120px}.ref-c-amt{width:150px}
.ref-name{display:block;font-size:14px;font-weight:500;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ref-name-m{display:none}
.ref-meth{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--text-2);white-space:nowrap}
.ref-meth .i{width:14px;height:14px;flex:0 0 14px;color:var(--text-3)}
.ref-amt-v{display:block;font-size:14px;font-weight:500;color:var(--text);white-space:nowrap;font-variant-numeric:tabular-nums}
.ref-amt-v.ok{color:var(--ok)}
.ref-c-amt .t3{display:block;font-size:11px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ref-tbl td.ref-empty{padding:0}

/* Tablet and small desktop: one column, the invite card right after the earnings */
@media (max-width:1180px){
  .ref-grid{grid-template-columns:minmax(0,1fr)}
  .ref-main{display:contents}
  .ref-earn{order:1}.ref-invite{order:2}.ref-comm{order:3;min-height:420px}
}
@media (max-width:1024px){
  .ref-c-join{display:none}
  .ref-c-meth{width:140px}.ref-c-last{width:120px}.ref-c-st{width:110px}.ref-c-amt{width:130px}
}
/* Phone */
@media (max-width:720px){
  .ref-head{display:none}
  .ref-grid{gap:12px}
  .ref-earn{min-height:0;padding:16px;border-radius:16px}
  .ref-earn .art{display:none}
  .ref-earn-v{font-size:34px;line-height:40px;letter-spacing:-1.2px;overflow-wrap:anywhere}
  .ref-earn-s{font-size:12px;color:var(--text-2)}
  .ref-pill{margin-top:12px}
  .ref-invite{padding:16px;gap:14px}
  .ref-comm{min-height:0;gap:16px}
  .ref-figs{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:14px}
  .ref-fig:nth-child(3){padding-left:0;border-left:0}
  .ref-fig .v{font-size:18px}
  .ref-weekly{min-height:170px}
  .ref-people{margin-top:12px}
  .ref-ppl-h{padding:14px 16px}
  .ref-c-meth,.ref-c-last,.ref-c-st{display:none}
  .ref-c-amt{width:120px}
  .ref-tbl.is-empty thead{display:none}
  .ref-name{font-size:13px}
  .ref-name-m{display:block;font-family:var(--font-code);font-size:11px;color:var(--text-3);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
