/* INLINE RSVP — one phone → code → success flow inside each existing card.
   The original card content reserves the same space during later steps. */
.sf-inline-host {
  --sf-stage-gap: var(--space-4);
  --sf-control-height: 3.25rem;
  --sf-code-size: 2rem;
  --sf-heading-size: clamp(1.75rem, 2.3vw, 2.125rem);
  isolation: isolate;
}
.sf-original {
  display: contents;
  visibility: visible;
}
.sf-original[aria-hidden='true'] {
  visibility: hidden;
}
.sf-inline-host .signup-form {
  position: relative;
}
.sf-inline-host .signup-form .form-message {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + var(--space-1));
  margin: 0;
  color: #b71b3f;
  font-size: var(--text-micro);
  line-height: 1.3;
}
.sf-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sf-stage-gap);
  justify-content: space-between;
  min-width: 0;
  padding: inherit;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border-radius: inherit;
  color: var(--ink);
  font-family: var(--font-body);
}
.sf-stage[hidden],
.sf-stage [hidden] {
  display: none !important;
}
.sf-step-main {
  display: flex;
  flex-direction: column;
  gap: var(--sf-stage-gap);
  min-width: 0;
}
.sf-stage .sf-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: var(--sf-heading-size);
  font-weight: var(--weight-display);
  font-variation-settings: var(--font-display-axes);
  line-height: var(--leading-heading-tight);
  letter-spacing: -0.02em;
}
.sf-stage .sf-heading p {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}
.sf-stage .sf-heading strong {
  font-weight: var(--weight-semibold);
  color: var(--ink);
}
.sf-code-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
}
.sf-stage .sf-code-input {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--sf-control-height);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: var(--sf-code-size);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  caret-color: var(--color-focus);
}
.sf-stage .sf-code-input::placeholder {
  color: var(--muted);
  opacity: 0.55;
}
.sf-stage .sf-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--sf-control-height);
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-action);
  color: var(--palette-white);
  font: var(--weight-semibold) var(--text-sm) / 1.3 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.sf-stage .sf-primary:hover {
  background: var(--color-action-hover);
}
.sf-stage .sf-back,
.sf-stage .sf-text-button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: var(--weight-medium) var(--text-caption) / 1.4 var(--font-body);
  cursor: pointer;
}
.sf-stage .sf-back {
  min-height: 32px;
}
.sf-stage .sf-text-button {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.sf-stage .sf-back:hover,
.sf-stage .sf-text-button:hover {
  color: var(--ink);
}
.sf-stage .sf-status {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-caption);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.sf-stage .sf-status:empty {
  display: none;
}
.sf-stage .sf-status[data-kind='error'] {
  color: #b71b3f;
}
.sf-stage [aria-invalid='true'] {
  border-color: #b71b3f;
}
.sf-stage-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.sf-stage .sf-demo-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-micro);
  line-height: 1.4;
}
.sf-stage .sf-stores {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-2);
}
/* Fixed badge sizes: the promo section's fluid (container-relative) sizing
   collapses inside the modal. Both badges share one visual height. */
.sf-stage .sf-stores .paper-app-store {
  flex: none;
}
.sf-stage .sf-stores .paper-app-store-apple {
  width: 9rem;
}
.sf-stage .sf-stores .paper-app-store-google {
  width: 10rem;
}
.sf-stage .sf-offer-note,
.sf-stage .sf-link-notice {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-caption);
  line-height: 1.4;
}
.sf-stage .sf-link-options,
.sf-stage .sf-reset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}
.sf-stage .sf-instructions {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 0 0 0 var(--space-5);
  margin: 0;
  color: var(--muted);
  font-size: var(--text-caption);
  line-height: 1.4;
}
.sf-stage .sf-email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-caption);
  color: var(--muted);
}
.sf-stage .sf-email-form > div {
  display: flex;
  gap: var(--space-2);
}
.sf-stage .sf-email-form input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: var(--space-2);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}
.sf-stage .sf-email-form .sf-primary {
  width: auto;
  min-height: 44px;
}
.sf-stage :is(input, button, a):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}
.sf-stage h2:focus {
  outline: none;
}
.sf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[data-theme='dark'] .sf-stage .sf-status[data-kind='error'],
[data-theme='dark'] .sf-inline-host .signup-form .form-message {
  color: var(--color-error-inverse-text);
}
[data-theme='dark'] .sf-stage [aria-invalid='true'] {
  border-color: var(--color-error-inverse);
}
@media (max-width: 1100px) {
  .sf-inline-host {
    --sf-stage-gap: var(--space-3);
    --sf-heading-size: 1.75rem;
  }
}
@media (max-width: 760px) {
  .sf-inline-host {
    --sf-control-height: 3.375rem;
    --sf-stage-gap: var(--space-4);
    --sf-heading-size: 2rem;
  }
  .sf-stage .sf-email-form input {
    font-size: var(--text-base);
  }
  .sf-stage .sf-back,
  .sf-stage .sf-text-button {
    min-height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  /* Global near-zero durations still create a visibility transition for a
     frame. Returning to email must be focusable inside the same tap gesture. */
  .sf-inline-host,
  .sf-inline-host * {
    transition: none !important;
  }
  .sf-stage {
    scroll-behavior: auto;
  }
}

/* Signup protection: the honeypot stays off-screen for people and assistive
   tech. (Bot checks run invisibly through Vercel BotID.) */
.sf-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Success modal and registered cards. The success screen lives in the shared
   RSVP dialog and offers the App Store and Google Play badges. */
.sf-stage .sf-success-lead {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.45;
  text-wrap: pretty;
}
.sf-stage .sf-registered {
  justify-content: center;
}
.sf-inline-host[data-signup-step='registered'] .sf-stage {
  justify-content: center;
}
