.referral-ribbon {
  box-sizing: border-box; width: 100%; margin-block: 16px 22px;
  border: 1px solid #d5e5f6; border-radius: 15px; background: #edf6fc;
}
body .referral-ribbon > a {
  display: flex; align-items: center; gap: 12px 18px; width: 100%; box-sizing: border-box;
  padding: 16px clamp(16px, 3vw, 28px); min-height: 72px;
  color: #133665; text-decoration: none; border-radius: inherit;
}
body .referral-ribbon > a:hover { background: #e3f1fc; }
.referral-ribbon a:focus-visible, .referral-page :is(a,button,summary,input):focus-visible {
  outline: 3px solid #264fc0; outline-offset: 3px;
}
.referral-ribbon .referral-gift {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center;
  color: #183c8a; background: #ffde65; border-radius: 50%;
}
.referral-gift .ui-icon { display: block; width: 26px; height: 26px; }
.referral-banner-copy { display: grid; min-width: 0; line-height: 1.35; gap: 3px; }
.referral-banner-copy strong { font: inherit; font-size: clamp(16px,1.8vw,20px); font-weight: 750; color: #142c50; }
.referral-banner-copy > span { font-size: 15px; color: #274361; }
.referral-more { margin-inline-start: auto; white-space: nowrap; color: #173f9e; font-size: 15px; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
body[data-page="/"] #contenido > .referral-ribbon {
  width: min(calc(100% - 2 * var(--visu-frame-gutter, 20px)), calc(var(--visu-frame-width, 1200px) - 2 * var(--visu-frame-gutter, 20px)));
  margin: 14px auto 0;
}
.auth-card .referral-ribbon { margin: 16px 0 22px; }
.auth-card .referral-ribbon > a { display: grid; grid-template-columns: auto minmax(0,1fr); column-gap: 12px; padding: 14px; }
.auth-card .referral-more { grid-column: 2; margin: 0; }
.referral-page { max-width: 750px; margin: clamp(24px,4vw,54px) auto 55px; color: #142a49; }
.referral-page p { line-height: 1.55; }
.referral-back { color: #2146a1; text-decoration: underline; text-underline-offset: .2em; }
.referral-intro {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(110px, 29%); align-items: center;
  gap: clamp(12px,3vw,28px); margin: 21px 0;
}
.referral-intro > img { display: block; width: 100%; height: auto; }
.referral-intro h1 { margin: 0 0 12px; color: #142a49; font-size: clamp(32px,4.7vw,54px); line-height: 1.04; letter-spacing: -.035em; }
.referral-intro p { margin: 0; font-size: clamp(16px,1.8vw,19px); }
.referral-card, .referral-how {
  background: #fff; border: 1px solid #d5deea; border-radius: 16px; padding: clamp(18px,3.5vw,30px);
}
.referral-card h2 { margin: 0 0 12px; font-size: clamp(21px,3vw,27px); }
.referral-card .referral-chip {
  display: inline-block; margin: 0 0 14px; padding: 6px 13px;
  color: #173d93; background: #eaf5ff; border-radius: 99px; font-size: 15px; font-weight: 650; line-height: 1.25;
}
.referral-code-row {
  display: flex; align-items: stretch; overflow: hidden; border: 1px solid #9dacc0;
  border-radius: 10px; background: #fff;
}
.referral-code-row input, .referral-url input, .referral-entry input, .checkout-coupon input {
  box-sizing: border-box; min-width: 0; width: 100%; font: inherit; background: #fff; color: #172f52;
  border: 1px solid #9dacc0; border-radius: 7px; padding: 10px 12px;
}
.referral-code-row input[name="share_code"] {
  flex: 1; width: 0; border: 0; border-radius: 0; padding: 12px 15px; font-size: clamp(17px,3vw,24px);
  letter-spacing: .025em; font-variant-numeric: tabular-nums;
}
.referral-code-row button {
  display: grid; place-items: center; flex: 0 0 52px; min-height: 48px;
  background: transparent; border: 0; color: #193a70; cursor: pointer;
}
.referral-code-row button:hover { background: #edf4ff; }
.referral-code-row :is(button,input):focus-visible { outline-offset: -3px; }
.referral-code-row .ui-icon, .referral-channels .ui-icon { width: 23px; height: 23px; }
.referral-channels { margin: 14px 0 0; }
body .referral-channels > summary {
  display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box;
  min-height: 52px; padding: 11px 17px; border-radius: 10px; border: 1px solid #214bc5;
  background: #214bc5; color: #fff; cursor: pointer; font-size: 17px; line-height: 1.35; font-weight: 700;
}
.referral-channels > summary::-webkit-details-marker { display: none; }
.referral-channels > summary .ui-icon { color: inherit; }
body .referral-channels > summary:hover { background: #173b9f; }
.referral-channel-list, .referral-actions, .referral-entry form, .checkout-coupon .coupon-line {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center;
}
.referral-channel-list { margin: 14px 0; }
.referral-channel-list :is(a,button) {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 13px;
  box-sizing: border-box; color: #19419d; background: #f7faff; border: 1px solid #ccd9ed; border-radius: 8px;
  cursor: pointer; font: inherit; font-weight: 650; text-decoration: none;
}
.referral-channel-list [hidden] { display: none; }
.referral-channel-list :is(a,button):hover { background: #eaf1ff; }
.referral-url { display: grid; gap: 5px; margin: 0; font-size: 14px; }
.referral-url input { font-size: 16px; }
.referral-feedback:empty { display: none; }
.referral-feedback, .referral-balance { margin: 14px 0 0; }
.referral-how { margin-top: 24px; }
.referral-how summary { cursor: pointer; color: #142a49; font-size: clamp(19px,2vw,23px); font-weight: 700; }
.referral-how ol { margin: 18px 0 0; padding-inline-start: 1.5em; }
.referral-how li { padding-left: 4px; margin: .8em 0; line-height: 1.55; }
.referral-how p { margin-bottom: 0; }
.referral-actions .button, .referral-entry button, .checkout-coupon button { min-height: 44px; }
.referral-entry { margin: 12px 0 20px; }
.referral-entry form { padding-block: 10px; align-items: end; }
.referral-entry label, .checkout-coupon label { display: grid; gap: 5px; }
.referral-entry summary, .checkout-coupon summary { cursor: pointer; font-weight: 650; padding-block: 8px; }
.referral-notice { border-left: 3px solid #214bc5; padding: 6px 12px; }
.checkout-coupon { margin-block: 12px; }
.checkout-coupon p { margin: 5px 0; }
.checkout-coupon [role="alert"] { color: #8d2420; }
@media (max-width: 620px) {
  body .referral-ribbon > a { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 11px; padding: 14px; }
  .referral-more { grid-column: 2; margin: 2px 0 0; }
  .referral-ribbon .referral-gift { width: 36px; height: 36px; }
  .referral-intro { grid-template-columns: minmax(0,1fr) 92px; gap: 10px; }
  .referral-intro h1 { font-size: 32px; }
  .referral-intro p { font-size: 16px; }
  .referral-channel-list > :is(a,button) { flex: 1 1 43%; }
  .referral-entry form, .checkout-coupon .coupon-line { min-width: 0; }
}
@media (max-width: 380px) {
  .referral-intro { grid-template-columns: minmax(0,1fr); }
  .referral-intro > img { display: none; }
}
