/* Responsive feedback for the public earnings calculator. */
.earnings-lab {
  --calculator-progress: 0%;
  --calculator-level: 0;
  position: relative;
  isolation: isolate;
  transition:
    border-color 180ms ease,
    box-shadow 240ms ease;
}
.earnings-lab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    ellipse at var(--calculator-progress) 10%,
    #ff8bbc42,
    #ffd2e814 45%,
    transparent 72%
  );
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.earnings-lab::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #f490bb;
  border-radius: inherit;
  opacity: 0;
  box-shadow:
    0 0 30px #ed3d7e22,
    inset 0 1px 0 #fff;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.earnings-lab.calculator-engaged::before,
.earnings-lab.calculator-engaged::after {
  opacity: 1;
}
.earnings-lab .lab-top output {
  white-space: nowrap;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  transition: text-shadow 180ms ease;
}
.earnings-lab.calculator-engaged .lab-top output {
  text-shadow:
    0 0 20px #ef3b7b55,
    0 5px 25px #ef3b7b22;
}
.earnings-lab #views-range {
  height: 48px;
  background-color: transparent;
  background-image: linear-gradient(
    to right,
    #ff6ba0 0%,
    #ec296d var(--range-progress),
    #eddae5 var(--range-progress),
    #eddae5 100%
  );
  background-size: 100% 8px;
  background-position: center;
  background-repeat: no-repeat;
  margin-block: 9px 5px;
}
.earnings-lab #views-range::-webkit-slider-thumb {
  width: 29px;
  height: 29px;
  border: 4px solid white;
  background: linear-gradient(135deg, #ff71a6, #e92068);
  box-shadow:
    0 0 0 5px #f12d7012,
    0 3px 11px #c4215c50;
  transition:
    transform 150ms ease,
    box-shadow 180ms ease;
}
.earnings-lab #views-range::-moz-range-thumb {
  width: 21px;
  height: 21px;
  border: 4px solid white;
  background: linear-gradient(135deg, #ff71a6, #e92068);
  box-shadow:
    0 0 0 5px #f12d7012,
    0 3px 11px #c4215c50;
  transition:
    transform 150ms ease,
    box-shadow 180ms ease;
}
.earnings-lab.calculator-engaged #views-range::-webkit-slider-thumb {
  transform: scale(1.14);
  box-shadow:
    0 0 0 9px #f12d7016,
    0 0 24px #f12d7045,
    0 4px 13px #c4215c55;
}
.earnings-lab.calculator-engaged #views-range::-moz-range-thumb {
  transform: scale(1.14);
  box-shadow:
    0 0 0 9px #f12d7016,
    0 0 24px #f12d7045,
    0 4px 13px #c4215c55;
}
.earnings-lab .range-labels {
  font-variant-numeric: tabular-nums;
}
.earnings-lab .estimate-grid > div {
  transition:
    border-color 180ms ease,
    box-shadow 220ms ease;
}
.earnings-lab .estimate-grid > div::before,
.earnings-lab .estimate-grid > div::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 3px;
  border-radius: 3px;
  pointer-events: none;
}
.earnings-lab .estimate-grid > div::before {
  background: #f3dfe9;
}
.earnings-lab .estimate-grid > div::after {
  background: linear-gradient(90deg, #ff96bb, #ee3679);
  box-shadow: 0 0 8px #ee36792b;
  transform: scaleX(var(--calculator-level));
  transform-origin: left center;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.earnings-lab .estimate-grid > .estimate-highlight::after {
  background: linear-gradient(90deg, #fa7eb3, #d92676);
}
.earnings-lab .estimate-grid strong {
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 2.25vw, 32px);
  letter-spacing: -0.055em;
}
.earnings-lab.calculator-engaged .estimate-grid > div {
  border-color: #eda9c8;
  box-shadow:
    0 7px 20px -12px #ca327358,
    inset 0 1px #fff;
}
.earnings-lab.calculator-engaged .estimate-grid > .estimate-highlight {
  border-color: #e982b1;
  box-shadow:
    0 9px 24px -10px #df3e8359,
    inset 0 1px #fff;
}
@media (max-width: 520px) {
  .earnings-lab .lab-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .earnings-lab .lab-top label {
    max-width: none;
  }
  .earnings-lab .lab-top output {
    font-size: 35px;
    line-height: 1.25;
  }
  .earnings-lab .estimate-grid strong {
    font-size: 27px;
  }
}
@media (max-width: 360px) {
  .earnings-lab {
    padding-inline: 15px;
  }
  .earnings-lab .lab-top output {
    font-size: 32px;
  }
  .earnings-lab .estimate-grid strong {
    font-size: 21px;
    letter-spacing: -0.06em;
  }
}
.motion-paused .earnings-lab *,
.motion-paused .earnings-lab *::before,
.motion-paused .earnings-lab *::after,
.motion-paused .earnings-lab::before,
.motion-paused .earnings-lab::after,
.page-hidden .earnings-lab *,
.page-hidden .earnings-lab *::before,
.page-hidden .earnings-lab *::after,
.page-hidden .earnings-lab::before,
.page-hidden .earnings-lab::after {
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .earnings-lab,
  .earnings-lab *,
  .earnings-lab *::before,
  .earnings-lab *::after,
  .earnings-lab::before,
  .earnings-lab::after {
    transition: none !important;
    animation: none !important;
  }
}
