.rp-referral-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.rp-referral-benefits span {
  position: relative;
  overflow: hidden;
  padding: 9px 13px;
  border: 1px solid #dfb800;
  border-radius: 999px;
  background: linear-gradient(125deg, #ffe77a 0%, #ffd129 48%, #f0b900 100%);
  box-shadow: 0 5px 14px rgba(174, 129, 0, .17), inset 0 1px 0 rgba(255, 255, 255, .65);
  color: #17191c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
}

.rp-referral-benefits span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, .5) 47%, transparent 72%);
  transform: translateX(-120%);
  animation: rp-referral-shine 5.5s ease-in-out infinite;
  pointer-events: none;
}

.rp-referral-benefits span:nth-child(2)::after { animation-delay: .35s; }
.rp-referral-benefits span:nth-child(3)::after { animation-delay: .7s; }

.rp-referral-hero {
  background:
    radial-gradient(circle at 87% 18%, rgba(255, 209, 41, .32), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(255, 209, 41, .16), transparent 34%),
    linear-gradient(128deg, #fff 0%, #fffdf4 58%, #ffed91 100%);
  box-shadow: 0 22px 55px rgba(23, 25, 28, .12);
}

.rp-referral-title {
  max-width: 760px;
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 950;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.rp-referral-lead {
  color: #434a54;
  font-size: 17px;
}

.rp-referral-lead strong {
  color: #17191c;
  font-weight: 950;
}

.rp-referral-rule {
  position: relative;
  overflow: hidden;
  border: 1px solid #34373c;
  background:
    radial-gradient(circle at 105% -5%, rgba(255, 209, 41, .28), transparent 38%),
    linear-gradient(145deg, #24272c 0%, #111315 74%);
  box-shadow: 0 18px 32px rgba(23, 25, 28, .22);
}

.rp-referral-rule::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -62px;
  width: 155px;
  height: 155px;
  border: 24px solid rgba(255, 209, 41, .08);
  border-radius: 50%;
  pointer-events: none;
}

.rp-referral-rule strong {
  position: relative;
  z-index: 1;
  font-size: 38px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.rp-referral-rule strong b {
  display: inline-block;
  color: #fff;
  font-size: .56em;
  font-weight: 900;
  letter-spacing: -.01em;
  vertical-align: .16em;
}

.rp-referral-stat {
  background: linear-gradient(155deg, #fff 55%, #fff8d5 100%);
  box-shadow: 0 8px 20px rgba(23, 25, 28, .055);
}

.rp-referral-stat strong,
.rp-referral-card h2 {
  font-weight: 950;
  letter-spacing: -.025em;
}

.rp-referral-simulator {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 18px;
  margin: 18px 0;
  padding: 24px;
  border: 1px solid #d9b300;
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, .82), transparent 28%),
    linear-gradient(128deg, #fff6c7 0%, #ffd129 58%, #eab400 100%);
  box-shadow: 0 15px 34px rgba(160, 117, 0, .16);
}

.rp-referral-simulator-copy {
  display: grid;
  align-content: center;
  gap: 11px;
}

.rp-referral-simulator-kicker {
  color: #695100;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}

.rp-referral-simulator h2 {
  max-width: 680px;
  margin: 0;
  color: #17191c;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.rp-referral-simulator-copy p {
  max-width: 710px;
  margin: 0;
  color: #3d3b31;
  font-size: 14px;
  line-height: 1.55;
}

.rp-referral-simulator-copy label {
  margin-top: 5px;
  color: #312a13;
  font-size: 11px;
  font-weight: 900;
}

.rp-referral-simulator-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rp-referral-simulator-presets button {
  padding: 7px 10px;
  border: 1px solid rgba(23, 25, 28, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: #27220f;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.rp-referral-simulator-presets button.active {
  border-color: #17191c;
  background: #17191c;
  color: #ffd129;
}

#rpr-monthly-turnover {
  width: 90%;
  margin: 8px 5% 0;
  accent-color: #17191c;
}

.rp-referral-ruler {
  --rpr-ruler-position: 25%;
  position: relative;
  margin: 34px 0 4px;
  padding: 10px 12px 7px;
  border: 2px solid #17191c;
  border-radius: 7px;
  background: #ffd129;
  color: #17191c;
}

.rp-referral-ruler::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: var(--rpr-ruler-position);
  bottom: -9px;
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
  border-top: 9px solid #17191c;
  transform: translateX(-50%);
}

#rpr-ruler-value {
  position: absolute;
  z-index: 3;
  left: var(--rpr-ruler-position);
  bottom: calc(100% + 8px);
  min-width: 68px;
  padding: 6px 9px;
  border-radius: 6px;
  background: #17191c;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
}

.rp-referral-ruler-steps {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
}

.rp-referral-ruler-steps span {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  border-left: 1px solid rgba(23, 25, 28, .45);
}

.rp-referral-ruler-steps span:last-child {
  border-right: 1px solid rgba(23, 25, 28, .45);
}

.rp-referral-ruler-steps i {
  display: block;
  width: 2px;
  height: 13px;
  background: #17191c;
}

.rp-referral-ruler-steps b {
  overflow: hidden;
  color: #17191c;
  font-size: 9px;
  font-weight: 900;
  text-overflow: clip;
  white-space: nowrap;
}

#rpr-monthly-label {
  color: #17191c;
  font-size: 17px;
  font-weight: 950;
}

.rp-referral-simulator-result {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid #383b40;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 209, 41, .2), transparent 35%),
    linear-gradient(145deg, #25282d, #111315);
  color: #fff;
  box-shadow: 0 12px 28px rgba(23, 25, 28, .2);
}

.rp-referral-simulator-result > span {
  color: #cdd1d6;
  font-size: 11px;
  font-weight: 800;
}

.rp-referral-monthly-result,
.rp-referral-annual-result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 12px;
}

.rp-referral-monthly-result strong,
.rp-referral-annual-result strong {
  color: #ffd129;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.rp-referral-monthly-result b,
.rp-referral-annual-result b {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.rp-referral-monthly-result small,
.rp-referral-annual-result small {
  grid-column: 1 / -1;
  color: #aeb5bd;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rp-referral-annual-result {
  padding-top: 12px;
  border-top: 1px solid #42464d;
}

.rp-referral-annual-result strong {
  font-size: 30px;
  white-space: nowrap;
}

.rp-referral-annual-result b {
  color: #ffd129;
}

.rp-referral-simulator-result em {
  color: #b9bec5;
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}

@keyframes rp-referral-shine {
  0%, 66%, 100% { transform: translateX(-120%); }
  82% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .rp-referral-benefits span::after { animation: none; }
}

.rp-referral-rule small {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  color: #aeb5bd;
}

.rp-referral-rule em {
  padding-top: 10px;
  border-top: 1px solid #3a3f45;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.5;
}

.rp-referral-location {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 14px;
}

.rp-referral-location.full,
.rp-referral-check.full {
  grid-column: 1 / -1;
}

.rp-referral-validity {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff3b8;
  color: #6b5600;
  font-weight: 800;
}

.rp-referral-list {
  max-height: 650px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-color: #d7b200 #f3f4f5;
  scrollbar-width: thin;
}

.rp-referral-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
}

.rp-referral-points strong {
  color: #17191c;
  font-weight: 950;
}

.rp-referral-points span {
  color: #68727d;
}

@media (max-width: 600px) {
  .rp-referral-location {
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .rp-referral-simulator { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .rp-referral-simulator { padding: 18px; }
  .rp-referral-monthly-result,
  .rp-referral-annual-result { grid-template-columns: 1fr; }
}

/* Flat, high-contrast treatment: lively accents without gradients or faded copy. */
.rp-referral-hero {
  border-color: #d9dde2;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 25, 28, .08);
}

.rp-referral-title {
  color: #17191c;
  font-weight: 900;
}

.rp-referral-lead,
.rp-referral-card > p,
.rp-referral-simulator-copy p,
.rp-referral-meta,
.rp-referral-points span,
.rp-referral-note,
.rp-referral-simulator-result em {
  color: #343a40;
}

.rp-referral-kicker,
.rp-referral-simulator-kicker {
  color: #654f00;
}

.rp-referral-benefits span {
  border-color: #d5ad00;
  background: #ffd129;
  box-shadow: none;
  color: #17191c;
}

.rp-referral-benefits span::after {
  display: none;
  animation: none;
}

.rp-referral-rule {
  border-color: #17191c;
  background: #17191c;
  box-shadow: 0 8px 20px rgba(23, 25, 28, .14);
}

.rp-referral-rule::after {
  display: none;
}

.rp-referral-rule span,
.rp-referral-rule em,
.rp-referral-rule small {
  color: #fff;
}

.rp-referral-rule em {
  border-top-color: #565b62;
}

.rp-referral-simulator {
  border-color: #d9dde2;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 25, 28, .07);
}

.rp-referral-simulator-result {
  border-color: #d8b51a;
  background: #fff8d8;
  box-shadow: 0 10px 24px rgba(126, 94, 0, .1);
  align-content: start;
  gap: 14px;
  padding: 26px;
}

.rp-referral-simulator-result > span,
.rp-referral-monthly-result small,
.rp-referral-annual-result small,
.rp-referral-simulator-result em {
  color: #4c5157;
}

.rp-referral-result-slogan {
  padding-left: 13px;
  border-left: 4px solid #ffd129;
}

.rp-referral-result-slogan small {
  display: block;
  margin-bottom: 7px;
  color: #725800;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .13em;
}

.rp-referral-result-slogan strong {
  display: block;
  color: #17191c;
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 950;
  letter-spacing: -.035em;
  line-height: 1.08;
}

#rpr-result-context {
  margin: 2px 0 0;
  color: #343a40;
  font-size: 13px;
  font-weight: 850;
}

.rp-referral-monthly-result,
.rp-referral-annual-result {
  padding: 14px 15px;
  border: 1px solid #dfc75c;
  border-radius: 12px;
  background: #fff;
}

.rp-referral-annual-result {
  padding-top: 14px;
  border-top: 1px solid #dfc75c;
}

.rp-referral-monthly-result small,
.rp-referral-annual-result small {
  margin-bottom: 5px;
  color: #555b61;
}

.rp-referral-monthly-result strong,
.rp-referral-annual-result strong {
  color: #725800;
}

.rp-referral-monthly-result b,
.rp-referral-annual-result b {
  color: #17191c;
  font-size: 17px;
  text-align: right;
}

.rp-referral-simulator-result em {
  color: #555b61;
}

.rp-referral-presets-label {
  margin-top: 4px;
  color: #24282d;
  font-size: 11px;
  font-weight: 900;
}

.rp-referral-simulator-presets button {
  min-width: 118px;
  padding: 9px 12px;
  border: 2px solid #24282d;
  background: #fff;
  color: #24282d;
}

.rp-referral-simulator-presets button.active {
  border-color: #17191c;
  background: #ffd129;
  color: #17191c;
  box-shadow: 0 5px 13px rgba(181, 134, 0, .2);
}

.rp-referral-ruler {
  border-color: #17191c;
  background: #ffe47a;
}

.rp-referral-ruler::before {
  border-top-color: #17191c;
}

#rpr-ruler-value {
  background: #17191c;
}

.rp-referral-ruler-steps i {
  background: #17191c;
}

.rp-referral-stat {
  border-color: #d9dde2;
  background: #fff;
  box-shadow: none;
}

.rp-referral-stat:nth-child(1) { border-top: 4px solid #ffd129; }
.rp-referral-stat:nth-child(2) { border-top: 4px solid #20a464; }
.rp-referral-stat:nth-child(3) { border-top: 4px solid #e1ad00; }
.rp-referral-stat:nth-child(4) { border-top: 4px solid #e86c43; }

/* Ritmo e gerarchia del simulatore */
.rp-referral-simulator-copy {
  gap: 14px;
}

.rp-referral-simulator-kicker {
  justify-self: start;
  padding: 7px 11px;
  border-radius: 999px;
  background: #ffd129;
  color: #17191c;
  font-size: 11px;
  letter-spacing: .11em;
  box-shadow: 0 4px 10px rgba(173, 128, 0, .14);
}

.rp-referral-simulator-copy > p {
  max-width: 760px;
  color: #2f3439;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.55;
}

.rp-referral-presets-label {
  margin-top: 0;
  font-size: 13px;
}

.rp-referral-turnover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 3px;
}

.rp-referral-turnover-head label {
  margin: 0;
  color: #17191c;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.3;
}

.rp-referral-turnover-head #rpr-ruler-value {
  position: static;
  z-index: auto;
  left: auto;
  bottom: auto;
  flex: 0 0 auto;
  min-width: 76px;
  padding: 7px 10px;
  transform: none;
}

.rp-referral-ruler {
  margin: 0 0 4px;
}

@media (max-width: 620px) {
  .rp-referral-turnover-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Hero unico: immagine, messaggio e premio sono una sola composizione. */
.rp-referral-hero {
  display: block;
  min-height: 590px;
  padding: 42px;
  border-color: #ded8ca;
  background: #fffaf0;
  box-shadow: 0 16px 38px rgba(35, 29, 19, .13);
  isolation: isolate;
}

.rp-referral-hero::before {
  z-index: 5;
}

.rp-referral-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: #ffd129;
  clip-path: polygon(66% 0, 100% 0, 100% 100%, 76% 100%);
  pointer-events: none;
}

.rp-referral-hero > div:first-child {
  position: relative;
  z-index: 3;
  width: min(49%, 600px);
}

.rp-referral-hero .rp-referral-kicker { color: #6d5500; }
.rp-referral-hero .rp-referral-title { color: #17191c; }
.rp-referral-hero .rp-referral-lead { color: #30353b; }
.rp-referral-hero .rp-referral-lead strong { color: #17191c; }

.rp-referral-hero-slogan {
  margin: 18px 0 0;
  padding-left: 13px;
  border-left: 4px solid #ffd129;
  color: #292e34;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.rp-referral-hero-slogan strong {
  color: #6c5500;
  font-size: 16px;
  font-weight: 950;
}

.rp-referral-hero-visual {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 auto;
  width: 100%;
  margin: 0;
  pointer-events: none;
}

.rp-referral-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateX(8%) scale(.92);
  transform-origin: right center;
}

.rp-referral-hero .rp-referral-rule {
  position: relative;
  z-index: 3;
  width: min(49%, 600px);
  min-height: 0;
  margin-top: 24px;
  padding: 19px 20px 18px;
  border: 0;
  border-top: 2px solid #17191c;
  border-bottom: 1px solid #bdb6a8;
  border-left: 7px solid #ffd129;
  border-radius: 0;
  background: rgba(255, 255, 255, .64);
  box-shadow: none;
  backdrop-filter: blur(5px);
  color: #292e34;
}

.rp-referral-hero .rp-referral-rule span,
.rp-referral-hero .rp-referral-rule em,
.rp-referral-hero .rp-referral-rule small { color: #343a40; }
.rp-referral-hero .rp-referral-rule strong,
.rp-referral-hero .rp-referral-rule strong b { color: #17191c; }
.rp-referral-hero .rp-referral-rule em { border-top-color: #bbb4a7; }

/* Ripartizione definitiva dei 10 punti. */
.rp-referral-split {
  position: relative;
  overflow: hidden;
  grid-column: 1 / -1;
  margin: 8px 0 2px;
  padding: 22px;
  border: 1px solid #d8c46e;
  border-radius: 18px;
  background: #fffdf5;
  box-shadow: 0 13px 30px rgba(45, 38, 13, .09);
}

.rp-referral-split legend {
  display: grid;
  gap: 2px;
  padding: 0 11px;
  color: #17191c;
}

.rp-referral-split legend small {
  color: #8a6900;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}

.rp-referral-split legend strong {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.rp-referral-split-intro {
  display: grid;
  grid-template-columns: minmax(190px, .75fr) minmax(260px, 1.25fr);
  gap: 18px;
  align-items: center;
  margin: 2px 0 16px;
  padding: 12px 14px;
  border-left: 5px solid #ffd129;
  background: #fff7cf;
}

.rp-referral-split-intro > strong {
  color: #17191c;
  font-size: 14px;
  font-weight: 950;
}

.rp-referral-split-intro > p {
  margin: 0;
  color: #3c4249;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.rp-referral-split-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.rp-referral-split-options label { cursor: pointer; }
.rp-referral-split-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.rp-referral-split-options span {
  display: grid;
  min-height: 70px;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 2px;
  padding: 9px 6px;
  border: 1px solid #c9c4b7;
  border-radius: 12px;
  background: #fff;
  color: #343a40;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.rp-referral-split-options b {
  color: #17191c;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}
.rp-referral-split-options small {
  color: #343a40;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
}
.rp-referral-split-options label.active span {
  border-color: #17191c;
  background: #ffd129;
  color: #17191c;
  box-shadow: 0 5px 0 #17191c;
  transform: translateY(-3px);
}
.rp-referral-split-options label.active small { color: #17191c; }
.rp-referral-split-options input:focus-visible + span { outline: 3px solid rgba(255, 209, 41, .48); }

#rpr-split-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 17px;
}
#rpr-split-summary span {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid #d7d1c3;
  border-radius: 12px;
  background: #fff;
  color: #17191c;
}
#rpr-split-summary span:last-child { border-color: #e7bf16; background: #fff7cf; }
#rpr-split-summary small {
  color: #625c4f;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .1em;
}
#rpr-split-summary strong { font-size: 18px; font-weight: 950; }
#rpr-split-summary i {
  color: #8a6900;
  font-size: 21px;
  font-style: normal;
  font-weight: 950;
}

.rp-referral-split-lock {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 15px;
  padding: 13px 14px 0;
  border-top: 1px solid #d3cbb9;
  color: #292e34;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}
.rp-referral-split-lock input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #17191c;
}
.rp-referral-split-lock strong { color: #17191c; }

.rp-referral-split-locked {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 9px 11px;
  border-left: 4px solid #ffd129;
  background: #fff8d8;
  color: #292e34;
  font-size: 11px;
  line-height: 1.4;
}
.rp-referral-points strong.shared { color: #725800; }
.rp-referral-split-admin { color: #725800 !important; font-weight: 850 !important; }

@media (max-width: 700px) {
  .rp-referral-split { padding: 18px 14px; }
  .rp-referral-split-intro { grid-template-columns: 1fr; gap: 4px; }
  .rp-referral-split-options { grid-template-columns: repeat(3, 1fr); }
  #rpr-split-summary { grid-template-columns: 1fr; }
  #rpr-split-summary i { display: none; }
}

@media (max-width: 980px) {
  .rp-referral-hero {
    min-height: 0;
    padding: 30px 28px 430px;
  }

  .rp-referral-hero::after {
    background: #ffd129;
    clip-path: polygon(0 70%, 100% 56%, 100% 100%, 0 100%);
  }

  .rp-referral-hero > div:first-child,
  .rp-referral-hero .rp-referral-rule {
    width: 100%;
  }

  .rp-referral-hero-visual {
    inset: auto 0 0;
    width: 100%;
    height: 440px;
  }

  .rp-referral-hero-visual img { object-position: 72% center; }
  .rp-referral-hero-visual img { transform: none; }
}

@media (max-width: 600px) {
  .rp-referral-hero { padding: 24px 20px 315px; }
  .rp-referral-hero-visual { height: 320px; }
  .rp-referral-hero .rp-referral-rule { padding: 18px; }
}

/* Lato amministrativo RicambiPro Insieme */
.rp-referral-admin {
  max-width: 1320px;
  margin: 0 auto;
  color: #17191c;
}

.rp-referral-admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px 30px;
  border: 1px solid #d9dde2;
  border-left: 7px solid #ffd129;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(23, 25, 28, .06);
}

.rp-referral-admin-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #725800;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}

.rp-referral-admin-hero h2,
.rp-referral-admin-list h2,
.rp-referral-admin-detail h2 {
  margin: 0;
  color: #17191c;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -.035em;
}

.rp-referral-admin-hero p {
  max-width: 780px;
  margin: 9px 0 0;
  color: #4c535b;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}

.rp-referral-admin-formula {
  display: grid;
  gap: 5px;
  min-width: 285px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #17191c;
  color: #fff;
}

.rp-referral-admin-formula small {
  color: #ffd129;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .13em;
}

.rp-referral-admin-formula strong {
  color: #ffd129;
  font-size: 20px;
  font-weight: 950;
}

.rp-referral-admin-formula span {
  color: #e6e8ea;
  font-size: 11px;
  font-weight: 750;
}

.rp-referral-admin-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.rp-referral-admin-kpis > div {
  display: grid;
  gap: 4px;
  padding: 16px 17px;
  border: 1px solid #dfe2e6;
  border-top: 4px solid #ffd129;
  border-radius: 13px;
  background: #fff;
}

.rp-referral-admin-kpis span,
.rp-referral-admin-kpis small {
  color: #555d66;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.rp-referral-admin-kpis strong {
  color: #17191c;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.rp-referral-admin-detail,
.rp-referral-admin-list {
  border: 1px solid #d9dde2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 25, 28, .055);
}

.rp-referral-admin-detail {
  margin-bottom: 16px;
  overflow: hidden;
}

.rp-referral-admin-detail > header,
.rp-referral-admin-detail > footer,
.rp-referral-admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
}

.rp-referral-admin-detail > header {
  border-bottom: 1px solid #e2e5e9;
}

.rp-referral-admin-detail h2 {
  font-size: 26px;
}

.rp-referral-admin-detail header p {
  margin: 5px 0 0;
  color: #5a626b;
  font-size: 13px;
  font-weight: 700;
}

.rp-referral-admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 22px;
  background: #f7f8f9;
}

.rp-referral-admin-panel {
  padding: 18px;
  border: 1px solid #dde1e5;
  border-radius: 13px;
  background: #fff;
}

.rp-referral-admin-panel h3 {
  margin: 0 0 14px;
  color: #24282d;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.rp-referral-admin-panel dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 15px;
}

.rp-referral-admin-panel dl div {
  min-width: 0;
}

.rp-referral-admin-panel dt {
  color: #69727c;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.rp-referral-admin-panel dd {
  overflow: hidden;
  margin: 3px 0 0;
  color: #1f2328;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.rp-referral-admin-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rp-referral-admin-checks li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f0f2f4;
  color: #414850;
  font-size: 10px;
  font-weight: 800;
}

.rp-referral-admin-checks i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f1b900;
  color: #17191c;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.rp-referral-admin-checks li.ok {
  background: #eaf7ef;
  color: #175a34;
}

.rp-referral-admin-checks li.ok i {
  background: #20a464;
  color: #fff;
}

.rp-referral-admin-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 15px;
}

.rp-referral-admin-timeline > div {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe3e7;
  border-radius: 9px;
  background: #f7f8f9;
}

.rp-referral-admin-timeline i {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #dfe3e7;
  color: #4d555e;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.rp-referral-admin-timeline .done i,
.rp-referral-admin-timeline .current i {
  background: #ffd129;
  color: #17191c;
}

.rp-referral-admin-timeline strong,
.rp-referral-admin-timeline small {
  display: block;
}

.rp-referral-admin-timeline strong {
  color: #292e34;
  font-size: 10px;
  line-height: 1.25;
}

.rp-referral-admin-timeline small {
  margin-top: 3px;
  color: #737d87;
  font-size: 9px;
}

.rp-referral-admin-reward {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  padding: 12px 14px;
  border-left: 4px solid #ffd129;
  border-radius: 8px;
  background: #fff8d8;
}

.rp-referral-admin-reward span {
  color: #5a626b;
  font-size: 10px;
  font-weight: 800;
}

.rp-referral-admin-reward strong {
  color: #17191c;
  font-size: 11px;
  font-weight: 950;
  text-align: right;
}

.rp-referral-admin-detail > footer {
  border-top: 1px solid #e2e5e9;
}

.rp-referral-admin-activity {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 22px;
  border-top: 1px solid #e2e5e9;
  background: #fff;
}

.rp-referral-admin-activity h3 {
  margin: 5px 0 0;
  color: #20252a;
  font-size: 17px;
  font-weight: 950;
}

.rp-referral-admin-activity ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rp-referral-admin-activity li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #e1e5e9;
  border-radius: 9px;
  background: #f8f9fa;
}

.rp-referral-admin-activity time {
  color: #69727c;
  font-size: 9px;
  font-weight: 850;
}

.rp-referral-admin-activity strong,
.rp-referral-admin-activity small {
  display: block;
}

.rp-referral-admin-activity strong {
  color: #23282d;
  font-size: 11px;
  font-weight: 950;
}

.rp-referral-admin-activity small {
  margin-top: 3px;
  color: #636c76;
  font-size: 9px;
  font-weight: 700;
}

.rp-referral-admin-detail footer p {
  max-width: 700px;
  margin: 0;
  color: #535b64;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.rp-referral-admin-list {
  overflow: hidden;
}

.rp-referral-admin-list-head {
  border-bottom: 1px solid #e2e5e9;
}

.rp-referral-admin-list h2 {
  font-size: 23px;
}

#rpr-admin-visible-count {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff3b8;
  color: #6b5600;
  font-size: 10px;
  font-weight: 900;
}

.rp-referral-admin-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 220px;
  gap: 12px;
  padding: 15px 22px;
  background: #f7f8f9;
}

.rp-referral-admin-filters label {
  display: grid;
  gap: 5px;
}

.rp-referral-admin-filters label span {
  color: #565f68;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.rp-referral-admin-filters input,
.rp-referral-admin-filters select {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfd5dc;
  border-radius: 8px;
  background: #fff;
  color: #17191c;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.rp-referral-admin-columns,
.rp-referral-admin-row {
  display: grid;
  grid-template-columns: 1.2fr .9fr .72fr 1.1fr 1fr;
  gap: 14px;
  align-items: center;
}

.rp-referral-admin-columns {
  padding: 10px 22px;
  border-top: 1px solid #e2e5e9;
  border-bottom: 1px solid #e2e5e9;
  color: #66717d;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.rp-referral-admin-row {
  padding: 15px 22px;
  border-bottom: 1px solid #e6e9ec;
  background: #fff;
}

.rp-referral-admin-row:last-child {
  border-bottom: 0;
}

.rp-referral-admin-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rp-referral-admin-row strong {
  overflow: hidden;
  color: #20252a;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
}

.rp-referral-admin-row span,
.rp-referral-admin-row small {
  color: #69727c;
  font-size: 10px;
  font-weight: 700;
}

.rp-referral-admin-company > strong {
  font-size: 13px;
}

.rp-referral-admin-performance > strong {
  font-size: 15px;
}

.rp-referral-admin-row .rp-referral-progress {
  height: 5px;
  margin-top: 2px;
}

.rp-referral-admin-link {
  justify-self: start;
  margin-top: 4px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #17191c;
  background: transparent;
  color: #17191c;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.rp-referral-admin .rp-referral-actions button {
  min-height: 35px;
  padding: 8px 11px;
}

.rp-referral-admin .rp-referral-actions button:disabled {
  border-color: #d9dde2;
  background: #eceff1;
  color: #9299a1;
  cursor: not-allowed;
}

.rp-referral-reject-control {
  display: grid;
  grid-template-columns: minmax(170px, 230px) auto;
  gap: 5px 8px;
  align-items: end;
}

.rp-referral-reject-control label {
  grid-column: 1 / -1;
  color: #606973;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.rp-referral-reject-control select {
  min-height: 35px;
  padding: 7px 9px;
  border: 1px solid #cfd5dc;
  border-radius: 7px;
  background: #fff;
  color: #24292f;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
}

.rp-referral-rejected-reason {
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border-left: 3px solid #d34a4a;
  border-radius: 6px;
  background: #fff0f0;
}

.rp-referral-rejected-reason small {
  color: #7c5656;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.rp-referral-rejected-reason strong {
  color: #752626;
  font-size: 10px;
}

.rp-referral-admin-safety {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 15px;
  border-left: 4px solid #ffd129;
  border-radius: 8px;
  background: #fff9df;
  color: #51481f;
  font-size: 11px;
}

.rp-referral-admin-safety strong {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .rp-referral-admin-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rp-referral-admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .rp-referral-admin-activity {
    grid-template-columns: 1fr;
  }

  .rp-referral-admin-columns {
    display: none;
  }

  .rp-referral-admin-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 700px) {
  .rp-referral-admin-hero,
  .rp-referral-admin-kpis,
  .rp-referral-admin-row,
  .rp-referral-admin-filters {
    grid-template-columns: 1fr;
  }

  .rp-referral-admin-hero,
  .rp-referral-admin-detail > header,
  .rp-referral-admin-detail > footer,
  .rp-referral-admin-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rp-referral-admin-formula {
    min-width: 0;
    width: 100%;
  }

  .rp-referral-admin-panel dl,
  .rp-referral-admin-checks,
  .rp-referral-admin-timeline {
    grid-template-columns: 1fr;
  }

  .rp-referral-admin-safety {
    align-items: flex-start;
    flex-direction: column;
  }
}

.rp-referral-stat span,
.rp-referral-field label,
.rp-referral-check,
.rp-referral-item h4 {
  color: #24282d;
}

.rp-referral-card {
  border-color: #d9dde2;
  box-shadow: none;
}

.rp-referral-item {
  border-color: #d9dde2;
}

.rp-referral-progress {
  background: #dfe3e7;
}

.rp-referral-progress span {
  background: #f2c300;
}

.rp-referral-validity {
  background: #ffe36b;
  color: #3b3000;
}

.rp-referral-badge.active {
  background: #ccefdc;
  color: #0b522c;
}

.rp-referral-badge.review,
.rp-referral-badge.submitted {
  background: #ffe47a;
  color: #4d3d00;
}

.rp-referral-connection {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #d5dbe2;
  border-radius: 14px;
  background: #fff;
  color: #1d232b;
  box-shadow: 0 8px 24px rgba(28, 35, 43, .06);
}

.rp-referral-connection-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e1ad00;
  box-shadow: 0 0 0 5px rgba(225, 173, 0, .14);
}

.rp-referral-connection.connected .rp-referral-connection-dot {
  background: #20a464;
  box-shadow: 0 0 0 5px rgba(32, 164, 100, .14);
}

.rp-referral-connection.preview .rp-referral-connection-dot {
  background: #e86c43;
  box-shadow: 0 0 0 5px rgba(232, 108, 67, .14);
}

.rp-referral-connection strong,
.rp-referral-connection small {
  display: block;
}

.rp-referral-connection strong {
  font-size: 15px;
  line-height: 1.3;
}

.rp-referral-connection small {
  margin-top: 3px;
  color: #4e5968;
  font-size: 13px;
  line-height: 1.4;
}

.rp-referral-connection button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #252a30;
  border-radius: 9px;
  background: #fff;
  color: #1d232b;
  font-weight: 750;
  cursor: pointer;
}

@media (max-width: 680px) {
  .rp-referral-connection { grid-template-columns: auto 1fr; }
  .rp-referral-connection button { grid-column: 1 / -1; width: 100%; }
}
.rp-referral-activation-confirmation {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #a9dfbd;
  border-radius: 11px;
  background: #edf9f1;
  color: #174f2c;
}
.rp-referral-activation-confirmation > i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: #1f7a42;
  color: #fff;
  font-style: normal;
  font-weight: 900;
}
.rp-referral-activation-confirmation span,
.rp-referral-activation-confirmation strong,
.rp-referral-activation-confirmation small { display: block; }
.rp-referral-activation-confirmation strong { margin-bottom: 3px; font-size: 13px; }
.rp-referral-activation-confirmation small { color: #315f41; font-size: 11px; line-height: 1.45; }

/* Identità editoriale RicambiPro Insieme: un solo linguaggio visivo per tutti i moduli. */
.rp-referral-page {
  --rpr-ink: #17191c;
  --rpr-paper: #f3efe4;
  --rpr-cream: #fffaf0;
  --rpr-yellow: #ffd129;
  --rpr-petrol: #294f49;
  padding: 18px;
  border-radius: 26px;
  background: var(--rpr-paper);
}

.rp-referral-module {
  overflow: hidden;
  border: 1px solid #cfc7b8;
  border-radius: 22px;
  background: var(--rpr-cream);
  box-shadow: 0 16px 34px rgba(34, 29, 22, .1);
}

.rp-referral-module-visual,
.rp-referral-card-visual {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: var(--rpr-ink);
}

.rp-referral-module-visual img,
.rp-referral-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rp-referral-module-visual figcaption,
.rp-referral-card-visual figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px 10px;
  align-items: center;
  padding: 12px 14px;
  border-left: 5px solid var(--rpr-yellow);
  background: rgba(23, 25, 28, .93);
  color: #fff;
}

.rp-referral-module-visual figcaption > span,
.rp-referral-card-visual figcaption > span {
  grid-row: 1 / 3;
  color: var(--rpr-yellow);
  font-size: 29px;
  font-weight: 950;
  line-height: 1;
}

.rp-referral-module-visual figcaption strong,
.rp-referral-card-visual figcaption strong {
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .12em;
}

.rp-referral-module-visual figcaption small,
.rp-referral-card-visual figcaption small {
  color: #e8e4dc;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.rp-referral-simulator {
  grid-template-columns: minmax(220px, .72fr) minmax(320px, 1.08fr) minmax(275px, .82fr);
  gap: 0;
  padding: 0;
  border-color: #cfc7b8;
  background: var(--rpr-cream);
  box-shadow: 0 16px 34px rgba(34, 29, 22, .1);
}

.rp-referral-module-visual--simulator {
  min-height: 520px;
}

.rp-referral-module-visual--simulator img {
  object-position: 66% center;
}

.rp-referral-simulator-copy {
  padding: 30px 26px;
  background: var(--rpr-cream);
}

.rp-referral-simulator-result {
  align-self: stretch;
  margin: 18px 18px 18px 0;
  border-color: #d3bd5f;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.rp-referral-result-slogan {
  border-left-color: var(--rpr-petrol);
}

.rp-referral-result-slogan small,
.rp-referral-monthly-result strong,
.rp-referral-annual-result strong {
  color: var(--rpr-petrol);
}

.rp-referral-ruler,
.rp-referral-simulator-presets button.active {
  background: var(--rpr-yellow);
}

.rp-referral-stats {
  gap: 10px;
  margin: 16px 0;
  padding: 10px;
  border: 1px solid #cfc7b8;
  border-radius: 18px;
  background: var(--rpr-ink);
}

.rp-referral-stat,
.rp-referral-stat:nth-child(1),
.rp-referral-stat:nth-child(2),
.rp-referral-stat:nth-child(3),
.rp-referral-stat:nth-child(4) {
  position: relative;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.rp-referral-stat::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 5px;
  background: var(--rpr-yellow);
}

.rp-referral-stat span { color: #4b5054; }
.rp-referral-stat strong { color: var(--rpr-ink); font-size: 30px; }

.rp-referral-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}

.rp-referral-card {
  padding: 0;
  border-color: #cfc7b8;
  border-radius: 22px;
  background: var(--rpr-cream);
}

.rp-referral-card-visual {
  height: 310px;
}

.rp-referral-card-visual img { object-position: center 42%; }
.rp-referral-card--network .rp-referral-card-visual img { object-position: 61% center; }

.rp-referral-card-body {
  padding: 24px;
}

.rp-referral-card-body > h2 {
  margin: 0 0 8px;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.rp-referral-card-body > p {
  margin: 0 0 20px;
  color: #343a40;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
}

.rp-referral-form {
  padding-top: 4px;
}

.rp-referral-field input,
.rp-referral-field select {
  border-color: #bbb5aa;
  border-radius: 11px;
  background: #fff;
}

.rp-referral-check {
  border: 1px solid #ded7c9;
  background: #fff;
}

.rp-referral-submit {
  min-height: 52px;
  border-bottom: 5px solid var(--rpr-yellow);
  border-radius: 11px;
  background: var(--rpr-ink);
  font-size: 14px;
}

.rp-referral-note {
  border-left-color: var(--rpr-petrol);
  background: #e7efec;
  color: #253b37;
}

.rp-referral-list {
  max-height: 820px;
  padding-right: 6px;
  scrollbar-color: var(--rpr-yellow) #e6e0d5;
}

.rp-referral-item {
  border-color: #d6cfc2;
  border-left: 5px solid var(--rpr-yellow);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 15px rgba(36, 31, 23, .055);
}

.rp-referral-split {
  border-color: #c9bd92;
  background: #fff;
  box-shadow: none;
}

.rp-referral-split-intro { background: #fff4bf; }

@media (max-width: 1100px) {
  .rp-referral-simulator {
    grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr);
  }
  .rp-referral-simulator-result {
    grid-column: 1 / -1;
    margin: 0 18px 18px;
  }
  .rp-referral-module-visual--simulator { min-height: 470px; }
}

@media (max-width: 900px) {
  .rp-referral-page { padding: 12px; }
  .rp-referral-simulator { grid-template-columns: 1fr; }
  .rp-referral-module-visual--simulator { min-height: 310px; }
  .rp-referral-simulator-copy { padding: 24px; }
  .rp-referral-simulator-result { margin: 0 18px 18px; }
  .rp-referral-card-visual { height: 240px; }
}

@media (max-width: 600px) {
  .rp-referral-page { padding: 8px; border-radius: 18px; }
  .rp-referral-module-visual--simulator { min-height: 260px; }
  .rp-referral-card-visual { height: 205px; }
  .rp-referral-card-body { padding: 18px 16px; }
  .rp-referral-card-body > h2 { font-size: 23px; }
  .rp-referral-module-visual figcaption,
  .rp-referral-card-visual figcaption { right: 9px; bottom: 9px; left: 9px; }
}

/* Fotografie pulite: niente numerazione e nessun pannello dietro al testo. */
.rp-referral-module-visual figcaption,
.rp-referral-card-visual figcaption {
  right: auto;
  bottom: 24px;
  left: 26px;
  display: block;
  width: min(76%, 430px);
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .94), 0 8px 22px rgba(0, 0, 0, .72);
}

.rp-referral-module-visual figcaption > span,
.rp-referral-card-visual figcaption > span {
  display: none;
}

.rp-referral-module-visual figcaption strong,
.rp-referral-card-visual figcaption strong {
  display: block;
  color: var(--rpr-yellow);
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -.035em;
  text-transform: none;
}

.rp-referral-module-visual figcaption small,
.rp-referral-card-visual figcaption small {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: clamp(12px, 1.05vw, 16px);
  font-weight: 800;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .rp-referral-module-visual figcaption,
  .rp-referral-card-visual figcaption {
    right: auto;
    bottom: 16px;
    left: 17px;
    width: min(82%, 360px);
  }
}

/* Simulatore immersivo: fotografia e contenuti su un'unica superficie scura. */
.rp-referral-simulator {
  grid-template-columns: minmax(300px, .76fr) minmax(0, 1.24fr);
  grid-template-rows: auto 1fr;
  background: var(--rpr-ink);
  border-color: #24272b;
}

.rp-referral-module-visual--simulator {
  grid-column: 1;
  grid-row: 1 / 3;
  min-height: 650px;
}

.rp-referral-module-visual--simulator::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset -34px 0 40px -34px rgba(0, 0, 0, .9);
}

.rp-referral-simulator-copy {
  grid-column: 2;
  grid-row: 1;
  padding: 30px 30px 18px;
  background: var(--rpr-ink);
  color: #fff;
}

.rp-referral-simulator-copy h2,
.rp-referral-simulator-copy > p,
.rp-referral-simulator-copy label,
.rp-referral-presets-label {
  color: #fff;
}

.rp-referral-simulator-copy h2 {
  max-width: 670px;
  font-size: clamp(29px, 3vw, 45px);
  line-height: 1.02;
}

.rp-referral-simulator-copy > p {
  max-width: 710px;
  color: #e2e4e6;
}

.rp-referral-simulator-kicker {
  background: var(--rpr-yellow);
  color: #17191c;
}

.rp-referral-turnover-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 9px 0 20px;
}

.rp-referral-turnover-choices button,
.rp-referral-turnover-choices button.active {
  min-width: 0;
  min-height: 54px;
  padding: 8px 5px;
  border: 1px solid #555b61;
  border-radius: 10px;
  background: #292d31;
  color: #fff;
  box-shadow: none;
}

.rp-referral-turnover-choices button strong,
.rp-referral-turnover-choices button small {
  display: block;
}

.rp-referral-turnover-choices button strong {
  font-size: 17px;
  font-weight: 950;
}

.rp-referral-turnover-choices button small {
  margin-top: 1px;
  color: #bfc4c8;
  font-size: 9px;
  font-weight: 800;
}

.rp-referral-turnover-choices button:hover {
  border-color: var(--rpr-yellow);
  background: #34393e;
}

.rp-referral-turnover-choices button.active {
  border-color: var(--rpr-yellow);
  background: var(--rpr-yellow);
  color: #17191c;
}

.rp-referral-turnover-choices button.active small { color: #51420c; }

.rp-referral-ruler,
#rpr-monthly-turnover,
#rpr-monthly-label {
  display: none;
}

.rp-referral-turnover-head {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.rp-referral-turnover-head label { font-size: 13px; }

#rpr-ruler-value {
  border: 1px solid var(--rpr-yellow);
  background: transparent;
  color: var(--rpr-yellow);
  font-size: 16px;
}

.rp-referral-simulator-result {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 30px 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.rp-referral-result-slogan,
#rpr-result-context,
.rp-referral-simulator-result > em {
  grid-column: 1 / -1;
}

.rp-referral-result-slogan {
  margin: 0;
  padding: 0 0 0 14px;
  border-left-color: var(--rpr-yellow);
}

.rp-referral-result-slogan small { color: var(--rpr-yellow); }
.rp-referral-result-slogan strong { color: #fff; font-size: 25px; }

#rpr-result-context {
  margin: 2px 0 0;
  color: #d8dbde;
}

.rp-referral-monthly-result,
.rp-referral-annual-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #4b5055;
  border-radius: 12px;
  background: #25292d;
}

.rp-referral-monthly-result strong,
.rp-referral-annual-result strong {
  color: var(--rpr-yellow);
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.rp-referral-monthly-result b,
.rp-referral-annual-result b {
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.rp-referral-simulator-result > em {
  color: #b7bdc2;
}

@media (max-width: 1100px) {
  .rp-referral-simulator {
    grid-template-columns: minmax(270px, .68fr) minmax(0, 1.32fr);
    grid-template-rows: auto 1fr;
  }
  .rp-referral-module-visual--simulator {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 640px;
  }
  .rp-referral-simulator-result {
    grid-column: 2;
    margin: 0 24px 24px;
  }
  .rp-referral-simulator-copy { grid-column: 2; padding: 26px 24px 17px; }
}

@media (max-width: 820px) {
  .rp-referral-simulator { grid-template-columns: 1fr; grid-template-rows: auto; }
  .rp-referral-module-visual--simulator {
    grid-column: 1;
    grid-row: auto;
    min-height: 330px;
  }
  .rp-referral-simulator-copy,
  .rp-referral-simulator-result { grid-column: 1; grid-row: auto; }
  .rp-referral-simulator-copy { padding: 25px 22px 18px; }
  .rp-referral-simulator-result { margin: 0 22px 24px; }
}

@media (max-width: 520px) {
  .rp-referral-turnover-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-referral-simulator-result { grid-template-columns: 1fr; }
  .rp-referral-monthly-result,
  .rp-referral-annual-result { grid-column: 1; }
}

/* Accesso e schermata dedicata al network RicambiPro Insieme. */
.rp-referral-network-gateway {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
  border-radius: 16px;
  background: var(--rpr-ink);
  color: #fff;
}

.rp-referral-network-gateway small,
.rp-referral-network-gateway strong,
.rp-referral-network-gateway span { display: block; }

.rp-referral-network-gateway small {
  margin-bottom: 5px;
  color: var(--rpr-yellow);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .13em;
}

.rp-referral-network-gateway strong {
  font-size: 26px;
  font-weight: 950;
  line-height: 1.05;
}

.rp-referral-network-gateway > div > span {
  margin-top: 7px;
  color: #d4d8db;
  font-size: 13px;
  font-weight: 750;
}

.rp-referral-network-gateway button {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid #e5b914;
  border-radius: 11px;
  background: var(--rpr-yellow);
  color: #17191c;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.rp-referral-network-page {
  --rpr-network-ink: #17191c;
  --rpr-network-yellow: #ffd129;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 26px;
  background: #f3efe4;
  color: var(--rpr-network-ink);
}

.rp-referral-network-back {
  justify-self: start;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: #34383c;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.rp-referral-network-back span {
  margin-right: 7px;
  color: #9b7500;
  font-size: 18px;
}

.rp-referral-network-hero {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border-radius: 22px;
  background: var(--rpr-network-ink);
}

.rp-referral-network-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 20, 23, .98) 0%, rgba(18, 20, 23, .9) 38%, rgba(18, 20, 23, .18) 72%, transparent 100%);
}

.rp-referral-network-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

.rp-referral-network-hero > div {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  width: min(54%, 610px);
  min-height: 390px;
  padding: 42px;
  color: #fff;
}

.rp-referral-network-hero small {
  color: var(--rpr-network-yellow);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .15em;
}

.rp-referral-network-hero h1 {
  margin: 10px 0 13px;
  color: #fff;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -.045em;
}

.rp-referral-network-hero p {
  max-width: 520px;
  margin: 0;
  color: #e1e4e6;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.rp-referral-network-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: var(--rpr-network-ink);
}

.rp-referral-network-summary article {
  min-width: 0;
  padding: 18px 18px 17px;
  border-left: 5px solid var(--rpr-network-yellow);
  border-radius: 11px;
  background: #fff;
}

.rp-referral-network-summary small,
.rp-referral-network-summary strong,
.rp-referral-network-summary span { display: block; }

.rp-referral-network-summary small {
  color: #585d62;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .08em;
}

.rp-referral-network-summary strong {
  margin-top: 6px;
  color: #17191c;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.rp-referral-network-summary span {
  margin-top: 6px;
  color: #62676c;
  font-size: 11px;
  font-weight: 750;
}

.rp-referral-network-rules {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 26px;
  padding: 28px;
  border: 1px solid #d4cbb9;
  border-radius: 20px;
  background: #fffaf0;
}

.rp-referral-network-rules small,
.rp-referral-network-roster-head small {
  color: #8a6700;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .13em;
}

.rp-referral-network-rules h2,
.rp-referral-network-roster-head h2 {
  margin: 7px 0 9px;
  font-size: 29px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.rp-referral-network-rules p {
  margin: 0;
  color: #454a4f;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
}

.rp-referral-network-rules ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rp-referral-network-rules li {
  padding: 12px 14px;
  border-left: 4px solid var(--rpr-network-yellow);
  background: #fff;
}

.rp-referral-network-rules li strong,
.rp-referral-network-rules li span { display: block; }
.rp-referral-network-rules li strong { font-size: 13px; }
.rp-referral-network-rules li span { margin-top: 3px; color: #5e6469; font-size: 12px; line-height: 1.4; }

.rp-referral-network-roster {
  padding: 26px;
  border: 1px solid #d4cbb9;
  border-radius: 20px;
  background: #fffaf0;
}

.rp-referral-network-roster-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.rp-referral-network-roster-head h2 { margin-bottom: 0; }
.rp-referral-network-roster-head > span { color: #5e6469; font-size: 12px; font-weight: 850; }
.rp-referral-network-list { max-height: none; }

@media (max-width: 900px) {
  .rp-referral-network-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-referral-network-rules { grid-template-columns: 1fr; }
  .rp-referral-network-hero > div { width: 68%; padding: 32px; }
}

@media (max-width: 620px) {
  .rp-referral-network-gateway { align-items: stretch; flex-direction: column; }
  .rp-referral-network-gateway button { width: 100%; }
  .rp-referral-network-page { padding: 8px; border-radius: 18px; }
  .rp-referral-network-hero { min-height: 430px; }
  .rp-referral-network-hero::after { background: linear-gradient(0deg, rgba(18,20,23,.98) 0%, rgba(18,20,23,.78) 55%, rgba(18,20,23,.08) 100%); }
  .rp-referral-network-hero > div { align-content: end; width: 100%; min-height: 430px; padding: 25px 22px; }
  .rp-referral-network-summary { grid-template-columns: 1fr; }
  .rp-referral-network-rules,
  .rp-referral-network-roster { padding: 20px 17px; }
  .rp-referral-network-roster-head { align-items: flex-start; flex-direction: column; }
}

.rp-referral-demo-achievement {
  display: grid;
  grid-template-columns: minmax(170px, .72fr) minmax(0, 1.28fr);
  gap: 4px 18px;
  align-items: center;
  margin-top: 12px;
  padding: 17px 18px;
  border-left: 6px solid var(--rpr-network-yellow, #ffd129);
  border-radius: 12px;
  background: #17191c;
  color: #fff;
}

.rp-referral-demo-achievement small {
  grid-column: 1;
  color: #ffd129;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .13em;
}

.rp-referral-demo-achievement strong {
  grid-column: 1;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.12;
}

.rp-referral-demo-achievement span {
  grid-column: 2;
  grid-row: 1 / 3;
  color: #e2e5e7;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .rp-referral-demo-achievement { grid-template-columns: 1fr; }
  .rp-referral-demo-achievement span { grid-column: 1; grid-row: auto; margin-top: 5px; }
}

/* Variante perla: meno beige, più contrasto tra dati, fotografie e contenuti. */
.rp-referral-network-page {
  background: #f2f4f3;
}

.rp-referral-network-rules,
.rp-referral-network-roster {
  border-color: #d9dddc;
  background: #fff;
}

.rp-referral-network-rules li {
  border-right: 1px solid #e3e6e5;
  border-top: 1px solid #e3e6e5;
  border-bottom: 1px solid #e3e6e5;
  background: #f7f8f8;
}

.rp-referral-network-roster .rp-referral-item {
  border-color: #dce0df;
  background: #fff;
}

.rp-referral-network-back {
  color: #252a2e;
}

/* Palette perla condivisa: RicambiPro Insieme e Network parlano la stessa lingua. */
.rp-referral-page {
  --rpr-paper: #f2f4f3;
  --rpr-cream: #fff;
  background: #f2f4f3;
}

.rp-referral-hero {
  border-color: #d9dddc;
  background: #fff;
  box-shadow: 0 16px 38px rgba(23, 25, 28, .10);
}

.rp-referral-module,
.rp-referral-card {
  border-color: #d9dddc;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 25, 28, .08);
}

.rp-referral-card-body {
  background: #fff;
}

.rp-referral-hero .rp-referral-rule {
  border-bottom-color: #d0d4d3;
  background: rgba(255, 255, 255, .80);
}

.rp-referral-field input,
.rp-referral-field select {
  border-color: #cfd4d2;
  background: #fff;
}

.rp-referral-check {
  border-color: #dfe3e1;
  background: #f7f8f8;
}

.rp-referral-split {
  border-color: #d9dddc;
  background: #fff;
}

.rp-referral-split-intro {
  border-left: 5px solid var(--rpr-yellow);
  background: #f7f8f8;
}

#rpr-split-summary span:last-child {
  background: #fff8d5;
}

/* Layout orizzontale e compatto: tutta la larghezza, meno scorrimento, accessi rapidi. */
body.brand-v4.rp-c2-canary #page-app #main-content:has(> .rp-referral-page) {
  width: 100%;
  max-width: none;
  padding-inline: 14px !important;
}

.rp-referral-page {
  width: 100%;
  max-width: none;
  padding: 12px;
  border-radius: 20px;
}

.rp-referral-hero {
  min-height: 0;
  padding: 27px 30px;
}

.rp-referral-hero > div:first-child,
.rp-referral-hero .rp-referral-rule {
  width: min(57%, 760px);
}

.rp-referral-hero .rp-referral-title {
  margin-bottom: 9px;
  font-size: clamp(34px, 3.25vw, 47px);
  line-height: .98;
}

.rp-referral-hero .rp-referral-lead {
  max-width: 710px;
  font-size: 14px;
  line-height: 1.48;
}

.rp-referral-hero-slogan {
  margin-top: 12px;
  font-size: 12px;
}

.rp-referral-hero-slogan strong { font-size: 14px; }
.rp-referral-benefits { margin-top: 12px; }
.rp-referral-benefits span { padding: 8px 11px; font-size: 10px; }

.rp-referral-hero .rp-referral-rule {
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 3px 16px;
  align-items: center;
  margin-top: 14px;
  padding: 11px 14px;
}

.rp-referral-hero .rp-referral-rule small,
.rp-referral-hero .rp-referral-rule strong { grid-column: 1; }
.rp-referral-hero .rp-referral-rule strong { font-size: 25px; }
.rp-referral-hero .rp-referral-rule span { grid-column: 2; grid-row: 1 / 3; }
.rp-referral-hero .rp-referral-rule em { grid-column: 1 / -1; padding-top: 7px; font-size: 10px; }

.rp-referral-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 13px;
  background: #17191c;
}

.rp-referral-shortcuts strong {
  margin: 0 4px;
  color: #ffd129;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rp-referral-shortcuts button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #4b5055;
  border-radius: 9px;
  background: #272b2f;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.rp-referral-shortcuts button:hover,
.rp-referral-shortcuts button:focus-visible {
  border-color: #ffd129;
  background: #ffd129;
  color: #17191c;
}

.rp-referral-form-toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 12px 15px;
  border: 1px solid #d6dad9;
  border-left: 5px solid #ffd129;
  border-radius: 11px;
  background: #f7f8f8;
  color: #17191c;
  text-align: left;
  cursor: pointer;
}
.rp-referral-form-toggle span { font-size: 14px; font-weight: 950; }
.rp-referral-form-toggle small { color: #62686d; font-size: 10px; font-weight: 750; }
.rp-referral-form-toggle b { grid-column: 2; grid-row: 1 / 3; color: #9a7500; font-size: 25px; }
.rp-referral-form-toggle:hover,
.rp-referral-form-toggle:focus-visible { border-color: #d0aa12; background: #fff8d5; }
.rp-referral-form-panel { margin-top: 14px; }
.rp-referral-form-panel[hidden] { display: none; }

.rp-referral-stats {
  margin: 10px 0;
  padding: 7px;
}
.rp-referral-stat { padding: 12px 15px; }
.rp-referral-stat::before { top: 11px; bottom: 11px; }
.rp-referral-stat span { margin-bottom: 2px; font-size: 10px; }
.rp-referral-stat strong { font-size: 24px; }

.rp-referral-simulator { scroll-margin-top: 12px; }
.rp-referral-module-visual--simulator { min-height: 520px; }
.rp-referral-simulator-copy { padding: 23px 24px 14px; }
.rp-referral-simulator-copy h2 { font-size: clamp(27px, 2.5vw, 38px); }
.rp-referral-simulator-copy > p { margin-bottom: 14px; font-size: 12px; line-height: 1.45; }
.rp-referral-turnover-choices { gap: 6px; margin-bottom: 13px; }
.rp-referral-turnover-choices button,
.rp-referral-turnover-choices button.active { min-height: 46px; }
.rp-referral-simulator-result { margin: 0 24px 22px; }
.rp-referral-monthly-result,
.rp-referral-annual-result { padding: 12px 14px; }

@media (min-width: 1050px) {
  .rp-referral-card--present {
    display: grid;
    grid-template-columns: minmax(280px, .36fr) minmax(0, 1fr);
    scroll-margin-top: 12px;
  }

  .rp-referral-card--present .rp-referral-card-visual {
    height: auto;
    min-height: 260px;
  }

  .rp-referral-card--present .rp-referral-card-body { padding: 20px 22px; }
  .rp-referral-card--present .rp-referral-card-body > h2 { font-size: 24px; }
  .rp-referral-card--present .rp-referral-card-body > p { margin-bottom: 13px; }
  .rp-referral-card--present .rp-referral-form { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 10px; }
  .rp-referral-card--present .rp-referral-field.full:has(#rpr-business) { grid-column: span 2; }
  .rp-referral-card--present .rp-referral-location.full { grid-column: span 2; }
  .rp-referral-card--present .rp-referral-field input,
  .rp-referral-card--present .rp-referral-field select { min-height: 40px; padding: 8px 10px; }
  .rp-referral-card--present .rp-referral-split,
  .rp-referral-card--present .rp-referral-check.full,
  .rp-referral-card--present .rp-referral-submit { grid-column: 1 / -1; }
  .rp-referral-card--present .rp-referral-split { margin-top: 2px; padding: 14px; }
  .rp-referral-card--present .rp-referral-split-intro { margin-bottom: 10px; padding: 9px 11px; }
  .rp-referral-card--present .rp-referral-split-options span { min-height: 56px; padding: 6px 4px; }
  .rp-referral-card--present #rpr-split-summary { margin-top: 10px; }
  .rp-referral-card--present #rpr-split-summary span { padding: 8px 11px; }
  .rp-referral-card--present .rp-referral-split-lock { margin-top: 10px; padding-top: 9px; }
  .rp-referral-card--present .rp-referral-submit { min-height: 46px; }
  .rp-referral-card--present .rp-referral-note { margin-top: 10px; padding: 9px 12px; }
  .rp-referral-card--present.form-open .rp-referral-card-visual { min-height: 100%; }

  .rp-referral-card--network {
    display: grid;
    grid-template-columns: minmax(280px, .34fr) minmax(0, 1fr);
  }
  .rp-referral-card--network .rp-referral-card-visual { height: auto; min-height: 245px; }
  .rp-referral-card--network .rp-referral-card-body { align-self: center; padding: 22px; }
  .rp-referral-card--network .rp-referral-card-body > p { margin-bottom: 14px; }
}

@media (max-width: 1049px) {
  .rp-referral-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(240px, .78fr);
    grid-template-rows: auto auto;
    gap: 12px 16px;
    padding: 24px;
  }
  .rp-referral-hero::after { display: none; }
  .rp-referral-hero > div:first-child {
    grid-column: 1;
    grid-row: 1;
    width: auto;
  }
  .rp-referral-hero .rp-referral-rule {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    margin-top: 0;
  }
  .rp-referral-hero-visual {
    position: relative;
    grid-column: 2;
    grid-row: 1 / 3;
    inset: auto;
    width: auto;
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
  }
  .rp-referral-hero-visual img { object-position: 58% center; transform: none; }
  .rp-referral-card-visual { height: 205px; }
}

@media (max-width: 820px) {
  .rp-referral-shortcuts { align-items: stretch; flex-wrap: wrap; }
  .rp-referral-shortcuts strong { flex-basis: 100%; }
  .rp-referral-shortcuts button { flex: 1 1 150px; }
}

@media (max-width: 600px) {
  body.brand-v4.rp-c2-canary #page-app #main-content:has(> .rp-referral-page) { padding-inline: 8px !important; }
  .rp-referral-hero { display: block; padding: 22px 18px 255px; }
  .rp-referral-hero::after { display: block; }
  .rp-referral-hero-visual { position: absolute; inset: auto 0 0; width: 100%; height: 245px; border-radius: 0; }
  .rp-referral-hero > div:first-child,
  .rp-referral-hero .rp-referral-rule { width: 100%; }
  .rp-referral-hero .rp-referral-title { font-size: 34px; }
  .rp-referral-hero .rp-referral-rule { grid-template-columns: 1fr; }
  .rp-referral-hero .rp-referral-rule span,
  .rp-referral-hero .rp-referral-rule em { grid-column: 1; grid-row: auto; }
  .rp-referral-shortcuts button { flex-basis: 100%; }
}

/* Hero fotografica corale: messaggio dentro la scena, tipografia contemporanea. */
.rp-referral-hero {
  display: block;
  min-height: 520px;
  padding: 34px 36px;
  border-color: #2d3135;
  background: #17191c;
  color: #fff;
}

.rp-referral-hero::after {
  display: block;
  z-index: 2;
  background: linear-gradient(90deg, rgba(16, 18, 20, .98) 0%, rgba(16, 18, 20, .93) 35%, rgba(16, 18, 20, .66) 52%, rgba(16, 18, 20, .12) 72%, rgba(16, 18, 20, 0) 100%);
  clip-path: none;
}

.rp-referral-hero-visual {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
}

.rp-referral-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: none;
}

.rp-referral-hero > div:first-child,
.rp-referral-hero .rp-referral-rule {
  position: relative;
  z-index: 3;
  width: min(51%, 650px);
}

.rp-referral-hero .rp-referral-kicker {
  margin-bottom: 10px;
  color: #ffd129;
  font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 10px;
}

.rp-referral-hero .rp-referral-title {
  max-width: 12ch;
  margin-bottom: 12px;
  color: #fff;
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .94;
  text-wrap: balance;
}

.rp-referral-hero .rp-referral-lead {
  max-width: 590px;
  color: #f1f3f4;
  font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 540;
  line-height: 1.5;
}
.rp-referral-hero .rp-referral-lead strong { color: #ffd129; font-weight: 850; }

.rp-referral-hero-slogan {
  margin-top: 13px;
  padding-left: 12px;
  border-left-color: #ffd129;
  color: #fff;
  font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
}
.rp-referral-hero-slogan strong { color: #fff; font-size: 13px; }
.rp-referral-hero-slogan b { color: #ffd129; font-size: 13px; font-weight: 950; }

.rp-referral-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.rp-referral-benefits span {
  position: relative;
  display: grid;
  min-height: 58px;
  align-content: end;
  overflow: hidden;
  padding: 9px 9px 9px 38px;
  border: 1px solid rgba(255, 209, 41, .55);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 209, 41, .24), rgba(255, 255, 255, .07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 22px rgba(0,0,0,.18);
  color: #fff;
  font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
}
.rp-referral-benefits span::before {
  position: absolute;
  bottom: -3px;
  left: 8px;
  color: #ffd129;
  font-size: 29px;
  font-weight: 950;
  line-height: 1;
}
.rp-referral-benefits span:nth-child(1)::before { content: "12"; }
.rp-referral-benefits span:nth-child(2)::before { content: "+"; }
.rp-referral-benefits span:nth-child(3)::before { content: "✓"; }

.rp-referral-hero .rp-referral-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 14px;
  align-items: center;
  margin-top: 13px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 209, 41, .45);
  border-left: 5px solid #ffd129;
  border-radius: 10px;
  background: rgba(13, 15, 17, .72);
  backdrop-filter: blur(10px);
}
.rp-referral-hero .rp-referral-rule small { grid-column: 1; color: #ffd129; }
.rp-referral-hero .rp-referral-rule strong { grid-column: 1; color: #fff; font-size: 22px; }
.rp-referral-hero .rp-referral-rule strong b { color: #ffd129; }
.rp-referral-hero .rp-referral-rule span { grid-column: 2; grid-row: 1 / 3; color: #fff; font-size: 11px; }
.rp-referral-hero .rp-referral-rule em { grid-column: 1 / -1; padding-top: 6px; border-top-color: rgba(255,255,255,.2); color: #dfe3e6; }

@media (max-width: 900px) {
  .rp-referral-hero { min-height: 540px; padding: 30px 24px; }
  .rp-referral-hero > div:first-child,
  .rp-referral-hero .rp-referral-rule { width: min(62%, 540px); }
  .rp-referral-hero .rp-referral-title { font-size: clamp(34px, 5vw, 45px); }
  .rp-referral-hero-visual img { object-position: 64% center; }
}

@media (max-width: 600px) {
  .rp-referral-hero { min-height: 650px; padding: 25px 18px; }
  .rp-referral-hero::after { background: linear-gradient(180deg, rgba(15,17,19,.98) 0%, rgba(15,17,19,.91) 58%, rgba(15,17,19,.35) 100%); }
  .rp-referral-hero > div:first-child,
  .rp-referral-hero .rp-referral-rule { width: 100%; }
  .rp-referral-hero-visual { inset: 0; height: 100%; }
  .rp-referral-hero .rp-referral-title { max-width: 15ch; }
  .rp-referral-benefits { grid-template-columns: 1fr; }
  .rp-referral-benefits span { min-height: 46px; }
}

/* Rifinitura leggibilità: vantaggi proporzionati, stima compatta e modulo più vivo. */
.rp-referral-benefits span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
  align-content: center;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.rp-referral-benefits span::before {
  position: static;
  grid-column: 1;
  justify-self: center;
  align-self: center;
  color: #ffd129;
  font-size: 24px;
  line-height: 1;
}

.rp-referral-benefits span:nth-child(1)::before { font-size: 21px; }

.rp-referral-simulator-result {
  align-self: stretch;
  align-content: center;
  margin: 0;
  padding: 18px 24px 21px;
  border: 0;
  border-radius: 0;
  background: #17191c;
  color: #fff;
}

.rp-referral-result-slogan {
  padding-left: 13px;
  border-left: 4px solid #ffd129;
}

.rp-referral-result-slogan strong {
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.08;
}

#rpr-result-context {
  margin: 2px 0 0;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.rp-referral-monthly-result,
.rp-referral-annual-result {
  border-color: #76651e;
  background: #25292d;
}

.rp-referral-monthly-result small,
.rp-referral-annual-result small {
  color: #f2f4f5;
  font-weight: 900;
}

.rp-referral-simulator-result > em {
  padding-top: 8px;
  border-top: 1px solid #4a4f54;
  color: #eef0f1;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.45;
}

.rp-referral-simulator-result > em strong {
  color: #ffd129;
  font-weight: 950;
  letter-spacing: .06em;
}

.rp-referral-card--present .rp-referral-card-body {
  background: linear-gradient(145deg, #fffdf4 0%, #fff7cf 100%);
}

.rp-referral-card--present .rp-referral-card-body > p {
  color: #332f22;
  font-weight: 620;
}

.rp-referral-form-toggle {
  border-color: #d3a900;
  border-left: 0;
  background: linear-gradient(110deg, #ffd129 0%, #ffe889 100%);
  box-shadow: 0 8px 18px rgba(174, 130, 0, .16);
}

.rp-referral-form-toggle small,
.rp-referral-form-toggle b {
  color: #4a3b00;
}

.rp-referral-form-toggle:hover,
.rp-referral-form-toggle:focus-visible {
  border-color: #17191c;
  background: #ffe36f;
}

.rp-referral-form-panel {
  padding: 15px;
  border: 1px solid #e3bd29;
  border-radius: 13px;
  background: #fffdf7;
}

.rp-referral-card--present .rp-referral-field label {
  color: #17191c;
  font-weight: 900;
}

.rp-referral-card--present .rp-referral-field input,
.rp-referral-card--present .rp-referral-field select {
  border-color: #d4b432;
  background: #fff;
  color: #17191c;
}

.rp-referral-card--present .rp-referral-split {
  border-color: #dfb91b;
  background: #fff8d5;
}

.rp-referral-card--present .rp-referral-split-intro {
  border-left-color: #17191c;
  background: #ffe983;
}

.rp-referral-card--present .rp-referral-check {
  border-color: #e2c34f;
  background: #fff4bd;
  color: #2e2a1e;
}

.rp-referral-card--present .rp-referral-note {
  border-left-color: #ffd129;
  background: #fff0a8;
  color: #332b0c;
  font-weight: 680;
}

@media (max-width: 820px) {
  .rp-referral-simulator-result { margin: 0; }
}

@media (max-width: 600px) {
  .rp-referral-benefits span {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 48px;
  }
  .rp-referral-form-panel { padding: 11px; }
}

/* Testata: invito esplicito e vantaggi più leggibili. */
.rp-referral-hero > div:first-child,
.rp-referral-hero .rp-referral-rule {
  width: min(53%, 690px);
}

.rp-referral-hero .rp-referral-kicker {
  display: block;
  margin-bottom: 13px;
  color: #ffd129;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 950;
  letter-spacing: .045em;
  line-height: 1.1;
}

.rp-referral-benefits span {
  min-height: 62px;
  font-size: 11.5px;
  font-weight: 950;
  letter-spacing: .018em;
  line-height: 1.18;
  text-transform: uppercase;
}

.rp-referral-benefits span:nth-child(1)::before {
  content: "◷";
  font-size: 27px;
}

.rp-referral-benefits span:nth-child(2)::before,
.rp-referral-benefits span:nth-child(3)::before {
  font-size: 27px;
}

@media (max-width: 900px) {
  .rp-referral-hero > div:first-child,
  .rp-referral-hero .rp-referral-rule { width: min(65%, 570px); }
}

@media (max-width: 600px) {
  .rp-referral-hero > div:first-child,
  .rp-referral-hero .rp-referral-rule { width: 100%; }
  .rp-referral-hero .rp-referral-kicker { font-size: 14px; }
}

/* Indicatori in un'unica fascia editoriale: niente tessere separate. */
.rp-referral-stats {
  gap: 0;
  margin: 11px 0 15px;
  padding: 3px 0 0;
  border: 0;
  border-top: 1px solid #d9dddc;
  border-bottom: 1px solid #d9dddc;
  border-radius: 0;
  background:
    linear-gradient(90deg, #ffd129 0 150px, transparent 150px) top / 100% 3px no-repeat,
    #fff;
  box-shadow: none;
}

.rp-referral-stat,
.rp-referral-stat:nth-child(1),
.rp-referral-stat:nth-child(2),
.rp-referral-stat:nth-child(3),
.rp-referral-stat:nth-child(4) {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 11px;
  min-width: 0;
  min-height: 72px;
  padding: 14px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rp-referral-stat:not(:last-child) {
  border-right: 1px solid #d9dddc;
}

.rp-referral-stat::before { display: none; }

.rp-referral-stat span {
  order: 2;
  margin: 0;
  color: #3d4247;
  font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .055em;
  line-height: 1.2;
}

.rp-referral-stat strong {
  order: 1;
  flex: 0 0 auto;
  color: #17191c;
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(34px, 3vw, 44px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .9;
}

@media (max-width: 900px) {
  .rp-referral-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-referral-stat:nth-child(2) { border-right: 0; }
  .rp-referral-stat:nth-child(-n+2) { border-bottom: 1px solid #d9dddc; }
}

@media (max-width: 520px) {
  .rp-referral-stats { grid-template-columns: 1fr; }
  .rp-referral-stat,
  .rp-referral-stat:nth-child(2) { border-right: 0; }
  .rp-referral-stat:not(:last-child) { border-bottom: 1px solid #d9dddc; }
}

/* Modulo presentazione: bianco netto e titoli fotografici più leggibili. */
.rp-referral-card--present,
.rp-referral-card--present .rp-referral-card-body {
  border-color: #d9dddc;
  background: #fff;
}

.rp-referral-card--present .rp-referral-card-visual figcaption {
  bottom: 25px;
  left: 28px;
  width: min(88%, 540px);
  text-shadow: 0 3px 7px rgba(0, 0, 0, .98), 0 10px 28px rgba(0, 0, 0, .82);
}

.rp-referral-card--present .rp-referral-card-visual figcaption strong {
  font-size: clamp(31px, 3.15vw, 47px);
  line-height: .94;
}

.rp-referral-card--present .rp-referral-card-visual figcaption small {
  max-width: 460px;
  margin-top: 9px;
  font-size: clamp(15px, 1.35vw, 20px);
  font-weight: 850;
  line-height: 1.22;
}

.rp-referral-card--present .rp-referral-form-panel {
  background: #fff;
}

@media (max-width: 600px) {
  .rp-referral-card--present .rp-referral-card-visual figcaption {
    bottom: 18px;
    left: 18px;
  }
  .rp-referral-card--present .rp-referral-card-visual figcaption strong { font-size: 31px; }
  .rp-referral-card--present .rp-referral-card-visual figcaption small { font-size: 15px; }
}

/* Modulo network: stessa forza tipografica della fotografia PRESENTA. */
.rp-referral-card--network .rp-referral-card-visual figcaption {
  bottom: 25px;
  left: 28px;
  width: min(88%, 540px);
  text-shadow: 0 3px 7px rgba(0, 0, 0, .98), 0 10px 28px rgba(0, 0, 0, .82);
}

.rp-referral-card--network .rp-referral-card-visual figcaption strong {
  font-size: clamp(31px, 3.15vw, 47px);
  line-height: .94;
}

.rp-referral-card--network .rp-referral-card-visual figcaption small {
  max-width: 470px;
  margin-top: 9px;
  font-size: clamp(15px, 1.35vw, 20px);
  font-weight: 850;
  line-height: 1.22;
}

@media (max-width: 600px) {
  .rp-referral-card--network .rp-referral-card-visual figcaption {
    bottom: 18px;
    left: 18px;
  }
  .rp-referral-card--network .rp-referral-card-visual figcaption strong { font-size: 31px; }
  .rp-referral-card--network .rp-referral-card-visual figcaption small { font-size: 15px; }
}
