/* Personal referrals: one offer, one invite action, and a readable reward history. */
.referrals-home{display:flex;flex-direction:column;min-height:0;height:100%;gap:16px;width:100%}
.referrals-home .page-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.referrals-home .page-heading>.text-button{font-size:11px;white-space:nowrap}
.invite-card{display:grid;grid-template-columns:1fr 1.2fr;border:1px solid #dcd2e8;background:#eee6f6;border-radius:18px;overflow:hidden;flex-shrink:0}
.invite-value{padding:22px 28px}.invite-eyebrow{display:flex;gap:8px;align-items:center;font-size:11px;color:#71598a}.invite-eyebrow .hp-icon{width:24px;height:24px}
.invite-amounts{display:flex;gap:26px;align-items:center;margin:16px 0 12px}.invite-amounts>div>span{font-size:12px;color:#705b81}.invite-amounts strong{display:block;font-size:58px;letter-spacing:-3px;line-height:1.1;margin-top:3px;color:#372543}.invite-plus{font-size:25px;color:#a18cb3}
.invite-value>p{font-size:11px;color:#705b81;margin:0}.invite-action{padding:24px 28px;background:#fcfafc;display:flex;flex-direction:column;justify-content:center;min-width:0}.invite-action label{font-size:12px;font-weight:600;margin-bottom:12px}.invite-link{display:flex;gap:8px;min-width:0}.invite-link input{min-width:0;flex:1;width:100%;border:1px solid #ded6e5;background:#fff;border-radius:8px;padding:12px;font:11px var(--mono)}.invite-link>.primary{flex-shrink:0;font-size:12px;min-height:42px;padding:10px 14px;gap:10px}.invite-share{display:flex;gap:20px;margin-top:8px}.invite-share>.text-button{font-size:11px;padding:6px 0}.invite-condition{font-size:10px;color:#776986;margin:12px 0 0;line-height:1.5}.invite-action h2{font-size:18px;margin:0 0 12px}.invite-checklist{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}.invite-checklist>span{display:flex;align-items:center;gap:8px;font-size:12px}.invite-checklist .hp-icon{width:18px;height:18px}.invite-action>a.primary{align-self:flex-start;min-height:39px;font-size:12px}
.referral-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;flex-shrink:0}.referral-stats>div{display:flex;align-items:center;gap:12px;padding:14px 18px;border:1px solid #e0e6d5;border-radius:12px;background:#f2f6e9;min-width:0}.referral-stats .hp-icon{width:29px;height:29px;flex-shrink:0}.referral-stats strong{font-size:26px;letter-spacing:-1px;line-height:1.1;display:block}.referral-stats small{display:block;font-size:10px;color:#687458;margin-top:5px}
.referral-bottom{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(220px,1fr);gap:16px;flex:1;min-height:0}.referral-activity{border:1px solid #e0e4d8;border-radius:14px;background:#fff;display:flex;flex-direction:column;min-height:0;overflow:hidden}.referral-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.referral-section-heading h2{font-size:14px;margin:0}.referral-activity>.referral-section-heading{padding:16px 18px;border-bottom:1px solid #eef0e8;flex-wrap:wrap}.referral-filters{display:flex;gap:4px}.referral-filters button{border:0;border-radius:6px;background:transparent;padding:6px 9px;font-size:10px;color:#69765a;cursor:pointer}.referral-filters .selected{background:#eaf3d5;color:#40562b}.referral-activity-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 18px}.invite-row{display:flex;gap:10px;align-items:center;border-bottom:1px solid #eef0e8;padding:13px 0}.invite-row:last-child{border-bottom:0}.invite-avatar{width:30px;height:30px;display:grid;place-items:center;background:#f2edf8;border-radius:9px;flex-shrink:0}.invite-avatar .hp-icon{width:21px;height:21px}.invite-row>div{flex:1;min-width:0}.invite-row strong{display:block;font-size:12px}.invite-row small{display:block;font-size:10px;margin-top:5px;color:#76806a;line-height:1.4}.referral-status{display:flex;align-items:center;gap:6px;flex-shrink:0;border:0;background:#f0f1ed;color:#6a725e;border-radius:6px;font-size:10px;padding:6px 8px;cursor:pointer}.referral-status .hp-icon{width:12px;height:12px}.referral-status.pending{background:#f0e8f8;color:#7c5e98}.referral-status.earned{background:#eaf3d5;color:#526f26}.referral-status.rejected{background:#f9eee6;color:#8b6549}
.referral-empty{height:100%;min-height:90px;display:flex;flex-direction:column;align-items:center;justify-content:safe center;padding:14px 0;text-align:center}.referral-empty>.hp-icon{width:30px;height:30px;margin-bottom:9px}.referral-empty strong{font-size:12px}.referral-empty p{font-size:10px;line-height:1.5;color:#76806a;margin:6px 0 0}.referral-month{border:1px solid #e1e5d8;border-radius:14px;padding:18px;background:#f5f7ed;min-height:0;overflow:auto}.referral-month .referral-section-heading>span{font-size:11px;color:#718254}.referral-slots{display:flex;gap:9px;margin:18px 0}.referral-slots>span{display:grid;place-items:center;width:34px;height:34px;border:1px dashed #cdd7ba;border-radius:50%;background:#fafbf7}.referral-slots .hp-icon{width:21px;height:21px;opacity:.4;filter:grayscale(1)}.referral-slots .filled{border-style:solid;background:#e6f2b5;border-color:#c1d58a}.referral-slots .filled .hp-icon{opacity:1;filter:none}.referral-month>strong{font-size:14px;display:block}.referral-month>p{font-size:11px;color:#6b775b;margin:8px 0}.referral-month>small{font-size:9px;color:#7e8871;display:block}.referral-month>.text-button{font-size:10px;padding:0;margin-top:14px}
.referral-welcome,.signup-invitation{display:flex;align-items:center;gap:9px;padding:10px 13px;border-radius:10px;background:#f3ecfa;border:1px solid #dfd0ee;color:#4f2c8c;font-size:12px;font-weight:600;line-height:1.45;flex-shrink:0}.signup-invitation{width:fit-content;margin:0 0 14px}.referral-welcome .hp-icon,.signup-invitation .hp-icon{width:20px;height:20px;flex-shrink:0}
.referral-rules{display:flex;flex-direction:column;gap:20px}.referral-rules>div{display:flex;gap:13px}.referral-rules .hp-icon{width:28px;height:28px;flex-shrink:0}.referral-rules strong{font-size:14px}.referral-rules p{font-size:12px;line-height:1.55;color:#555b4d;margin:5px 0 0}.referral-timeline{position:relative;display:flex;flex-direction:column;gap:18px}.referral-timeline::before{content:"";position:absolute;left:13px;top:14px;bottom:14px;width:2px;background:#dce2cf;z-index:0}.referral-timeline>div{display:flex;gap:14px;align-items:center}.referral-timeline .hp-icon{position:relative;z-index:1;width:28px;height:28px;background:#fff;border-radius:50%;color:#7c8372}.referral-timeline .is-active .hp-icon{color:#6d44b8}.referral-timeline strong{display:block;font-size:13px}.referral-timeline small{display:block;font-size:11.5px;color:#555e49;margin-top:3px}
.workspace-shell:has(#screen[data-screen="invite"]){grid-template-rows:64px minmax(0,1fr)}
.workspace-shell:has(#screen[data-screen="invite"]) .app-footer{display:none}
#screen[data-screen="invite"]>.referrals-home{flex-shrink:1}
@media(max-height:780px) and (min-width:641px){.referrals-home{gap:12px}.invite-value,.invite-action{padding:18px 22px}.invite-amounts{margin:10px 0;gap:22px}.invite-amounts strong{font-size:48px}.referral-stats>div{padding:10px 15px}.referral-slots{margin:12px 0}.referral-month{padding:15px}.referral-activity>.referral-section-heading{padding:12px 15px}}
@media(min-width:641px) and (max-width:1000px){.invite-card{grid-template-columns:1fr 1.25fr}.invite-value,.invite-action{padding:18px}.invite-amounts{gap:15px}.invite-amounts strong{font-size:45px}.invite-link{flex-wrap:wrap}.invite-link input{flex-basis:100%}.invite-link>.primary{width:100%;justify-content:space-between}.referral-bottom{grid-template-columns:minmax(0,1.5fr) minmax(180px,1fr)}.referral-slots{gap:5px}.referral-slots>span{width:27px;height:27px}.referral-stats>div{padding:12px;gap:8px}}
@media(max-width:640px){
 .workspace-shell:has(#screen[data-screen="invite"]){grid-template-rows:52px minmax(0,1fr)}
 #screen[data-screen="invite"]{padding:12px 14px}
 .referrals-home{gap:10px}.referrals-home .page-heading{align-items:flex-start;gap:5px}.referrals-home .page-heading h1{font-size:22px}.referrals-home .page-heading p{font-size:10px;max-width:190px}.referrals-home .page-heading>.text-button{font-size:9px;padding:4px 0;max-width:64px;white-space:normal;text-align:right}
 .invite-card{grid-template-columns:1fr;border-radius:13px}.invite-value{padding:12px 16px}.invite-eyebrow{font-size:10px}.invite-eyebrow .hp-icon{width:18px;height:18px}.invite-amounts{gap:20px;margin:7px 0 0}.invite-amounts>div{display:flex;align-items:center;gap:9px}.invite-amounts>div>span{font-size:10px}.invite-amounts strong{font-size:36px;margin:0;letter-spacing:-1.5px}.invite-plus{font-size:19px}.invite-value>p{display:none}.invite-action{padding:12px 16px}.invite-action label{font-size:10px;margin-bottom:8px}.invite-link{gap:6px}.invite-link input{font-size:10px;padding:10px}.invite-link>.primary{font-size:10px;padding:9px 10px;min-height:36px;gap:7px}.invite-share{margin-top:5px;gap:16px}.invite-share>.text-button{font-size:10px;padding:4px 0}.invite-condition{font-size:9px;margin-top:5px}.invite-action h2{font-size:14px;margin-bottom:8px}.invite-checklist{flex-direction:row;gap:9px;margin-bottom:10px}.invite-checklist>span{font-size:9px;gap:4px}.invite-checklist .hp-icon{width:15px;height:15px;flex-shrink:0}.invite-action>a.primary{font-size:10px;min-height:34px;padding:8px 12px}
 .referral-stats{gap:6px}.referral-stats>div{padding:10px;gap:7px}.referral-stats .hp-icon{width:19px;height:19px}.referral-stats strong{font-size:20px}.referral-stats small{font-size:8px;margin-top:4px}
 .referral-bottom{display:flex;flex-direction:column;gap:8px;min-height:0}.referral-month{order:-1;flex-shrink:0;display:grid;grid-template-columns:1fr auto;column-gap:10px;align-items:center;padding:10px 12px;border-radius:10px;overflow:visible}.referral-month .referral-section-heading{gap:9px;justify-content:flex-start}.referral-month .referral-section-heading h2{font-size:11px}.referral-month .referral-section-heading>span{font-size:10px}.referral-slots{grid-column:2;grid-row:1/3;margin:0;gap:5px}.referral-slots>span{width:24px;height:24px}.referral-slots .hp-icon{width:16px;height:16px}.referral-month>strong{font-size:10px;margin-top:5px}.referral-month>p,.referral-month>small,.referral-month>.text-button{display:none}
 .referral-activity{flex:1;border-radius:11px}.referral-activity>.referral-section-heading{padding:10px 12px;gap:6px}.referral-section-heading h2{font-size:12px}.referral-filters{gap:2px}.referral-filters button{padding:5px 6px;font-size:9px}.referral-activity-list{padding:0 12px}.invite-row{padding:10px 0;gap:7px}.invite-avatar{width:25px;height:25px}.invite-avatar .hp-icon{width:18px;height:18px}.invite-row strong{font-size:11px}.invite-row small{font-size:9px}.referral-status{font-size:9px;padding:5px 6px;gap:4px}.referral-empty{min-height:70px;padding:10px 0}.referral-empty>.hp-icon{width:24px;height:24px;margin-bottom:7px}.referral-empty strong{font-size:11px}.referral-empty p{font-size:9px}.referral-welcome{font-size:10px;padding:8px 10px}
}
@media(max-width:640px) and (max-height:700px){.referrals-home{gap:8px}.invite-value{padding:9px 13px}.invite-eyebrow{display:none}.invite-amounts{margin:0}.invite-amounts strong{font-size:32px}.invite-action{padding:10px 13px}.referral-stats>div{padding:8px}.referral-empty>.hp-icon{display:none}.referral-empty{min-height:50px}.referral-welcome{font-size:9px;padding:6px 9px}}
@media(max-height:520px){#screen[data-screen="invite"]{overflow:auto}.referrals-home{height:auto;min-height:min-content}.referral-bottom{min-height:210px}.referral-activity{min-height:160px}.referral-activity-list{max-height:250px}}
@media(max-width:640px) and (max-height:640px){
 body:has(#screen[data-screen="invite"]) .sidebar>.brand{display:none}
 .referrals-home .page-heading p{display:none}
 .referral-month{display:none}
 .referral-stats>div{padding:8px}
}
.referral-status.rewarded,.referral-status.used{background:#eaf3d5;color:#466121}
.referral-status.review{background:#fdf3df;color:#7a5614}
.referral-status.reversed{background:#fcebe5;color:#8e3e27}
.referral-status.expired{background:#f1f2ee;color:#6f7467}
.referral-slots .reserved{border-style:dashed;border-color:#a28ad2;background:#f3ecfa;color:#5f3f88}
.referral-slots .reserved .hp-icon{opacity:.85;filter:none}
.invite-checklist .is-done{color:#3c5420;font-weight:500}
.invite-checklist .is-todo{color:#666d5c}
.invite-checklist .is-todo .hp-icon{opacity:.65}
.referral-rules-notes{margin:8px 0 0;padding-left:18px;display:grid;gap:6px;font-size:12px;line-height:1.55;color:#555b4d}
.referral-rules+.referral-rules-notes{margin-top:18px;padding-top:14px;border-top:1px solid #eceee5}
#screen[data-screen="invite"]{padding:16px 30px 16px}
.referrals-home{height:100%;flex:1 1 0;min-height:0;gap:13px;max-width:1080px;margin:0 auto}
.referrals-home>.page-heading h1{font-size:26px}
.referral-bottom{flex:1 1 0;min-height:0;align-items:stretch}
.referral-activity{min-height:0;max-height:none}
.referral-month>small{font-size:11px;color:#555e49;margin-top:4px}
.referral-month .referral-section-heading>span{color:#46582c;font-weight:600}
.invite-row small{font-size:11px;color:#555e49}
.referral-status{color:#4b5242;border:1px solid rgba(36,37,33,.08);font-size:11px}
@media(max-width:640px){
  .referrals-home .page-heading>.text-button{font-size:12px;min-height:44px;display:inline-flex;align-items:center;max-width:none;white-space:nowrap}
  .invite-link{flex-direction:column;gap:8px}
  .invite-link input{font-size:12px;min-height:44px;padding:10px 12px}
  .invite-link>.primary{width:100%;min-height:44px;font-size:13px}
  .invite-share{gap:16px;margin-top:6px}
  .invite-share>.text-button{font-size:12px;min-height:44px;display:inline-flex;align-items:center;padding:8px 0}
  .referral-stats{gap:8px}
  .referral-stats>div{flex-direction:column;align-items:flex-start;gap:6px;padding:11px}
  .referral-stats small{font-size:11px;line-height:1.3;margin-top:2px}
  .referral-filters{gap:4px}
  .referral-filters button{min-height:36px;padding:6px 10px;font-size:11px}
  .referral-status{min-height:36px;padding:6px 10px;font-size:11px}
}

/* Wave 2: Connected 5-slot monthly milestone spine. */
.referral-slots{position:relative;justify-content:space-between;gap:6px;margin:16px 0}
.referral-slots::before{content:"";position:absolute;left:16px;right:16px;top:17px;height:2px;background:#dce2cf;z-index:0}
.referral-slots>span{position:relative;z-index:1}
.invite-avatar.is-pending{background:#f3ecfa;color:#5f3f88}
.invite-avatar.is-earned,.invite-avatar.is-rewarded{background:#eaf3d5}
@media(max-width:640px){.referral-slots{margin:0}.referral-slots::before{display:none}}
