/* A glimpse of the letter, followed by a quiet place to leave an email. */
.result-letter-wrap { position: relative; }
.result-letter.is-locked {
  position: relative;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
}

/* Let the reader linger over the opening before revealing the email invitation. */
.result-letter.is-locked::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: #faf5e34d;
}

#result-gate {
  position: absolute;
  top: calc(45% + 24px);
  left: 16px;
  right: 16px;
  padding: 27px 32px 30px;
  z-index: 1;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--stationery);
  box-shadow: 5px 5px 0 #203b2b0c;
}

#result-gate h2 {
  font: 400 clamp(27px, 5vw, 33px)/1.2 var(--serif);
  letter-spacing: -.4px;
  margin: 8px 0 13px;
  text-wrap: balance;
}

#result-gate p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

#result-gate .eyebrow {
  font-size: 10px;
}

#result-gate label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 23px 0 9px;
}

#result-gate input[type="email"] {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  scroll-margin-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}

#result-gate input[type="email"]::placeholder {
  color: var(--muted);
  opacity: .85;
}

#result-gate input[type="email"]:focus {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

#result-gate input[aria-invalid="true"] {
  border-color: var(--rust);
}

#result-gate .result-email-disclosure {
  font-size: 11px;
  margin-top: 12px;
  line-height: 1.65;
}

#result-gate .result-email-status {
  font-size: 12px;
  margin-top: 12px;
  color: var(--green);
}

#result-gate .result-email-status[data-state="error"] {
  font-size: 13px;
  color: var(--rust);
}

#result-email-status:empty {
  display: none;
}

#result-email-submit[aria-busy="true"] {
  opacity: .8;
  cursor: progress;
}

#result-email-submit[aria-busy="true"] > [aria-hidden="true"] {
  display: none;
}

#result-email-submit[aria-busy="true"]::after {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid #faf5e355;
  border-top-color: var(--stationery);
  border-radius: 50%;
  animation: letter-opening .8s linear infinite;
}

@keyframes letter-opening {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  #result-gate {
    padding: 22px 20px 25px;
    left: 10px;
    right: 10px;
  }

}

@media (prefers-reduced-motion: reduce) {
  #result-email-submit[aria-busy="true"]::after {
    animation: none;
  }
}
