/* A saved result's words and its marked ring, this page's own, after the shared stylesheet. */
.result-label,
.result-invite {
  margin: 0.5rem auto;
  text-align: center;
}

.result-label {
  color: var(--muted);
  font-size: 0.875rem;
}

.result-invite {
  color: var(--ink);
  font-weight: 600;
}

.result-label[hidden],
.result-invite[hidden] {
  display: none !important;
}

/* The result's ring stays, marked, until the visitor's own change takes the previews. */
.ring.tagged {
  animation: none !important;
  opacity: 1 !important;
}

.ring .tag {
  position: absolute;
  top: -0.8em;
  left: 0.6em;
  padding: 0.05em 0.6em;
  border-radius: 999px;
  background: var(--ring);
  color: var(--ink);
  font: 700 clamp(8px, calc(32px * var(--s)), 12px) / 1.4 var(--body);
  white-space: nowrap;
}

.preview[data-kind="phone"] .ring .tag {
  font-size: clamp(7px, calc(24px * var(--s)), 10px);
}

/* A ring with no room above it inside the page keeps its mark just under it. */
.ring.tag-under .tag {
  top: calc(100% + 3px + 0.2em);
}

/* While the result is awaited the previews are in their places, setting up, so the box is never empty. */
body[data-demo] #demo.result-wait:not(.look) .previews .preview {
  opacity: 1 !important;
}

/* No words of the page's own are drawn inside a phone. */
body[data-demo] #demo.result-wait:not(.look) .preview[data-kind="phone"] .screen::after {
  content: none;
}

@media (min-width: 1024px) {
  body[data-r3][data-demo] #demo:not(.look) .result-label,
  body[data-r3][data-demo] #demo:not(.look) .result-invite {
    position: absolute;
    left: calc(50% - 160 * var(--r));
    width: calc(740 * var(--r));
    margin: 0;
    pointer-events: auto;
  }

  /* Over the box, under the line about the demo. */
  body[data-r3][data-demo] #demo:not(.look) .result-label {
    top: calc(112 * var(--r));
    font-size: calc(13 * var(--r));
  }

  /* Under Before and After; the arrow to the questions goes a line lower. */
  body[data-r3][data-demo] #demo:not(.look) .result-invite {
    top: calc(680 * var(--r));
    font-size: calc(16 * var(--r));
  }

  body[data-r3][data-demo] #demo.result:not(.look) > #r3-faq {
    top: calc(716 * var(--r));
  }
}

@media (max-width: 1023.98px) {
  body[data-pr3][data-demo] #demo:not(.look) .result-label,
  body[data-pr3][data-demo] #demo:not(.look) .result-invite {
    position: absolute;
    left: calc(50% - 187 * var(--r));
    width: calc(374 * var(--r));
    margin: 0;
    font-size: calc(11.5 * var(--r));
    line-height: 1.3;
    pointer-events: auto;
  }

  /* The words under the previews, the row of Before and After raised a line, and the visitor's turn under it, just
     over the texting phone. */
  body[data-pr3][data-demo] #demo:not(.look) .result-label {
    top: calc(250 * var(--r));
  }

  body[data-pr3][data-demo] #demo.result:not(.look) .done {
    bottom: calc(494 * var(--r));
  }

  body[data-pr3][data-demo] #demo:not(.look) .result-invite {
    top: calc(304 * var(--r));
  }
}
