/* Envoys' Hall (referrals, v0.21): the link to share, three totals, how it works, and the referrals list.
   Also the "Invite friends" box in the side tower, and the vault's stats as buttons to the Profile. */

/* the three-person glyph, drawn as lines like the landing page's icons */
.ref-glyph{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* ---------- the link box (the tab and the side box share it) ---------- */
.ref-link{display:flex;gap:8px;align-items:stretch}
.ref-link input{flex:1;min-width:0;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:10px 12px;
  font-family:var(--mono);font-size:.88rem;color:var(--gold-hi);text-overflow:ellipsis}
:root[data-theme="light"] .ref-link input{color:var(--gold)}
.ref-link input:focus{border-color:var(--gold)}
.ref-link .btn{flex:none;white-space:nowrap}
.ref-link .btn.done{filter:saturate(.6) brightness(1.08)}

/* ---------- the tab ---------- */
.ref-empty{margin-top:20px;padding:28px 16px;text-align:center;border:1px dashed var(--line);border-radius:10px;background:var(--bg)}
.ref-share{margin-top:22px;display:flex;flex-direction:column;gap:8px}
.ref-hint{margin:0;font-size:.86rem;color:var(--muted)}
.ref-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:22px}
.ref-tiles > div{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;padding:16px 10px;
  border:1px solid var(--line);border-radius:10px;background:var(--bg);min-width:0}
.ref-tiles .ref-glyph,.ref-tiles svg{width:26px;height:26px;color:var(--gold);margin-bottom:4px}
.ref-tiles img{width:26px;height:26px;border-radius:50%;margin-bottom:4px;box-shadow:0 0 0 1px rgba(244,221,148,.5)}
.ref-tiles .mono{font-size:1.45rem;color:var(--gold-hi);line-height:1.2;overflow-wrap:anywhere}
:root[data-theme="light"] .ref-tiles .mono{color:var(--gold)}
.ref-tiles small{font-size:.76rem;color:var(--muted)}
@media (max-width:520px){.ref-tiles{grid-template-columns:minmax(0,1fr)}.ref-tiles > div{flex-direction:row;flex-wrap:wrap;justify-content:center;column-gap:10px}}
.ref-how{list-style:none;counter-reset:step;margin:24px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ref-how li{counter-increment:step;position:relative;padding:14px 14px 14px 52px;border-left:2px solid var(--gold);
  background:color-mix(in srgb,var(--gold) 6%,transparent);border-radius:0 8px 8px 0;font-size:.9rem;color:var(--muted)}
.ref-how li::before{content:counter(step);position:absolute;left:14px;top:13px;width:26px;height:26px;border-radius:50%;
  display:grid;place-items:center;border:1px solid var(--gold);font-family:var(--display);color:var(--gold-hi);font-size:.9rem}
:root[data-theme="light"] .ref-how li::before{color:var(--gold)}
.ref-how b{display:block;font-family:var(--display);font-weight:400;letter-spacing:.04em;color:var(--ink);font-size:.98rem;margin-bottom:2px}
@media (max-width:760px){.ref-how{grid-template-columns:minmax(0,1fr)}}
.ref-list{margin-top:26px}
.ref-list table .num{text-align:right}
.ref-list td,.ref-list th{white-space:nowrap}
.ref-who{max-width:16ch;overflow:hidden;text-overflow:ellipsis}
.ref-gone td{color:var(--muted)}
.ref-gone .num{text-decoration:line-through;text-decoration-color:var(--line)}
.ref-none{color:var(--muted);white-space:normal!important}
/* phones: the date column steps aside */
@media (max-width:600px){.ref-list th:nth-child(2),.ref-list td.ref-joined{display:none}.ref-list td,.ref-list th{padding:8px 4px}}

/* ---------- the side tower's "Invite friends" box ---------- */
.ref-invite{display:flex;flex-direction:column;gap:10px}
.ref-invite .rowbetween{align-items:center}
.ref-invite h3{display:flex;align-items:center;gap:8px}
.ref-pitch{margin:0;font-size:.88rem;color:var(--muted);line-height:1.45}
.ref-invite .ref-link input{padding:8px 10px;font-size:.8rem}
.ref-check{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}
.ref-check .ref-glyph{width:18px;height:18px}
.ref-check .ptc-left{margin-left:2px}

/* ---------- the vault's stats: each one a button to the Profile ---------- */
.stats3 .stat{display:flex;flex-direction:column;align-items:flex-start;min-width:0;text-align:left;cursor:pointer;
  background:none;border:1px solid transparent;border-radius:6px;padding:4px 6px;margin:-4px -6px;transition:border-color .15s,background-color .15s}
.stats3 .stat:hover{border-color:var(--line);background:var(--surface-2)}
.stats3 .stat .mono{color:var(--ink)}

/* ---------- v1.27.1: on the faucet tab, "Invite friends" is a wide row under Ascension ----------
   title + pitch on the left, the link and Copy in the middle, "Check referrals" on the right; stacked on phones */
.ref-invite.ref-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) auto;
  grid-template-areas:"head link check" "pitch link check";gap:4px 20px;align-items:center;
  border-left:3px solid var(--gold);background:linear-gradient(90deg,color-mix(in srgb,var(--gold) 7%,var(--surface)),var(--surface) 45%)}
.ref-row > .rowbetween{grid-area:head;justify-content:flex-start;gap:10px}
.ref-row .ref-pitch{grid-area:pitch}
.ref-row .ref-link{grid-area:link}
.ref-row .ref-link input{padding:10px 12px;font-size:.85rem}
.ref-row .ref-check{grid-area:check;width:auto;padding:9px 16px;white-space:nowrap}
@media (max-width:760px){
  .ref-invite.ref-row{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "pitch" "link" "check";gap:10px}
  .ref-row .ref-check{width:100%}
}
