.rsvp-page { min-height: 100svh; background: var(--rsvp-paper); color: #222521; }
.rsvp-bg { position: fixed; inset: 0; z-index: -1; background: url("/media/rsvp-leaves.jpg") center / cover no-repeat, var(--rsvp-paper); }
.rsvp-back { position: absolute; top: calc(env(safe-area-inset-top, 0px) + var(--s-4)); left: var(--gutter); display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-size: 1.125rem; text-decoration: none; }
.rsvp-back svg { width: 18px; height: 18px; }
.icon-flip { transform: scaleX(-1); }
.rsvp { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; padding: clamp(88px, 14vh, 140px) 0 calc(var(--s-9) + env(safe-area-inset-bottom, 0px)); text-align: center; }
.rsvp__title { margin-right: -0.2em; font-weight: 300; font-size: var(--step-4); line-height: 1; letter-spacing: 0.2em; color: #121512; }
.rsvp__rule { width: 64px; height: 1px; margin: var(--s-5) auto var(--s-7); background: rgb(18 21 18 / 0.45); }

/* Step 1 */
.find { display: grid; gap: var(--s-4); width: min(100%, 480px); margin-inline: auto; }
.find__city { display: grid; gap: var(--s-3); margin-top: var(--s-2); }
.label { font-family: var(--font-label); font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; text-align: left; color: #2B2E2A; }
.input { width: 100%; min-height: 52px; padding: 0 var(--s-4); border: 1px solid rgb(34 37 33 / 0.28); border-radius: 2px; background: var(--field); font-size: 1.1875rem; color: #222521; }
.input::placeholder { color: rgb(34 37 33 / 0.5); }
.input:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; }
.turnstile { justify-self: center; min-height: 65px; }
.turnstile:empty { display: none; }
.find .btn { justify-self: center; margin-top: var(--s-4); }
.msg { min-height: 1.5em; font-size: 1.0625rem; }
.msg.is-error { color: var(--error); }

/* Step 2 */
.greeting { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); color: #222521; }
.greeting:focus { outline: none; }
.greeting__sub { font-size: var(--step-1); text-wrap: balance; }
.status { margin-top: var(--s-2); font-style: italic; font-size: 1.0625rem; }
#reply-form { display: grid; justify-items: center; margin-top: var(--s-5); }
#reply-grid, #reply-plus, #reply-shuttle { width: 100%; }
.reply-event { margin-top: var(--s-5); text-align: left; }
.reply-event__title { padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); font-style: italic; font-size: var(--step-2); color: var(--ink); }
.reply-event__day { font-size: 0.6em; letter-spacing: 0.04em; }
.reply-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-3) var(--s-4); margin: 0; padding: var(--s-4) 0; border: 0; border-bottom: 1px solid rgb(34 37 33 / 0.14); text-align: left; }
.reply-row legend { float: left; padding: 0; font-weight: 500; font-size: 1.25rem; overflow-wrap: anywhere; }
.reply-row__choices { --choices-gap: var(--s-3); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--choices-gap); width: min(500px, 62vw); }
.reply-row__error { grid-column: 1 / -1; color: var(--error); font-size: 1rem; }
.reply-row__error:empty { display: none; }
.choice { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: 0 var(--s-5); border: 1px solid rgb(34 37 33 / 0.22); border-radius: 4px; background: var(--field); font-size: 1.125rem; cursor: pointer; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice__dot { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1.5px solid rgb(34 37 33 / 0.6); border-radius: 50%; }
.choice__dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); opacity: 0; transform: scale(0.6); }
.choice:has(input:checked) { border-color: var(--sage); background: #fff; }
.choice:has(input:checked) .choice__dot { border-color: var(--sage); }
.choice:has(input:checked) .choice__dot::after { opacity: 1; transform: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--sage); outline-offset: 2px; }
.choice:has(input:disabled) { cursor: default; opacity: 0.8; }
.reply-row.is-missing .choice { border-color: var(--error); }
.reply-note { margin-top: var(--s-5); font-size: 1.0625rem; }
.plus-ones { display: grid; gap: var(--s-4); margin-top: var(--s-6); text-align: left; }
.field { display: grid; gap: var(--s-2); }
.shuttle { margin-top: var(--s-5); }
.empty { margin-top: var(--s-5); font-size: var(--step-1); }
#reply-form .btn { margin-top: var(--s-6); }
.not-you { margin-top: var(--s-4); }
.link { min-height: 44px; padding: var(--s-2); border: 0; background: none; font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 599px) {
  .reply-row { grid-template-columns: 1fr; }
  .reply-row legend { float: none; margin-bottom: var(--s-1); }
  .reply-row__choices { --choices-gap: var(--s-2); width: 100%; }
  .choice { gap: var(--s-2); padding: 0 10px; font-size: 1.0625rem; white-space: nowrap; }
  .choice__dot { width: 20px; height: 20px; }
  .choice__dot::after { width: 10px; height: 10px; }
}

/* Step 3 */
.summary { display: grid; gap: var(--s-4); margin: var(--s-6) auto var(--s-4); text-align: left; width: min(100%, 520px); }
.summary__list { display: grid; gap: var(--s-2); padding: 0; list-style: none; }
.summary__list li { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) 0; border-bottom: 1px solid rgb(34 37 33 / 0.12); }
.summary__name { font-weight: 500; }
.summary__status { font-style: italic; }
.thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-6); }

/* Easter egg: the couple's runaway "Unable to attend" (spec §15). Each attempt toggles .is-swapped
   and the two equal-width boxes trade cells, so the pointer always lands on "Attending".
   `translate`, not `transform`, so the press scale in motion.css still applies on top. */
.choice--dodge { z-index: 1; }
.reply-row.is-swapped .choice--dodge { translate: calc(-100% - var(--choices-gap)) 0; }
.reply-row.is-swapped .choice:not(.choice--dodge) { translate: calc(100% + var(--choices-gap)) 0; }
.reply-row__quip { grid-column: 1 / -1; font-style: italic; font-size: 1.0625rem; color: var(--sage); }
.reply-row__quip:empty { display: none; }
