/* Mobile-first: base styles target phones; media queries add room as the screen grows. */

@font-face {
  font-family: 'Sorts Mill Goudy';
  src: url('/fonts/sorts-mill-goudy-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sorts Mill Goudy';
  src: url('/fonts/sorts-mill-goudy-italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Embassy';
  src: url('/fonts/embassy-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #dde7d5;
  --surface: #ffffff;
  --tint: #dde7d5;
  --ink: #000000;
  --muted: #000000;
  --line: #6f7c65;
  --accent: #c486bf;
  --accent-soft: #ebd9d5;
  --danger: #7a2c38;
  --danger-soft: #f5e1df;

  --heading: 'Embassy', var(--serif);
  --serif: 'Sorts Mill Goudy', 'Iowan Old Style', Georgia, serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgb(42 27 41 / 0.1), 0 10px 28px rgb(42 27 41 / 0.16);
  --gutter: 1.25rem;
  --header-h: 3.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-synthesis-weight: none;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 44rem;
}

.container--form {
  max-width: 38rem;
}

/* 80ch of text, plus the side gutters. */
.container--hotels {
  max-width: calc(80ch + 2 * var(--gutter));
}

.section {
  padding-block: 3.5rem;
}

.section--flush-top {
  padding-top: 0;
}

.section--tinted {
  background: var(--tint);
}

.section__title {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--ink);
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
}

.prose p {
  font-size: 1.08rem;
}

.page-header {
  padding: 3rem var(--gutter) 2.25rem;
  text-align: center;
  max-width: 44rem;
  margin-inline: auto;
}

.page-header h1 {
  font-size: clamp(2.6rem, 11vw, 4rem);
  font-weight: 400;
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--bg);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--header-h);
  padding-inline: var(--gutter);
}

.monogram {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}

.monogram span {
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  margin-inline: 0.12em;
}

.monogram--large {
  font-size: 2.6rem;
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -0.5rem;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -7px;
}

.nav-toggle__bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
}

.site-nav.is-open {
  display: block;
}

/* Without JavaScript the menu can't open, so keep it visible. */
.no-js .site-nav {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem var(--gutter) 1.25rem;
}

.site-nav a {
  text-transform: lowercase;
  display: block;
  padding: 0.85rem 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a[aria-current='page'] {
  color: var(--ink);
  font-style: italic;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  --pad-y: 0.75rem;
  --pad-x: 1.6rem;
  /* Offsets center the capitals optically: they sit high in the line, and letter-spacing
     adds a trailing gap after the last letter. */
  padding: calc(var(--pad-y) + 0.22em) var(--pad-x) calc(var(--pad-y) - 0.22em) calc(var(--pad-x) + 0.14em);
  border: 1px solid transparent;
  border-radius: 999px;
  font: 400 0.8rem/1.2 var(--serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  background: var(--accent);
  color: var(--ink);
}

.button--primary:hover {
  background: var(--accent-soft);
}

.button--secondary {
  background: var(--surface);
  color: var(--ink);
}

.button--secondary:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.button--danger {
  background: transparent;
  color: var(--ink);
  border-color: currentColor;
}

.button--danger:hover {
  background: var(--danger-soft);
  border-color: var(--ink);
  color: var(--ink);
}

.button--small {
  min-height: 2.25rem;
  --pad-y: 0.45rem;
  --pad-x: 1rem;
  font-size: 0.7rem;
}

.button--block {
  display: flex;
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button-row--center {
  justify-content: center;
}

/* ---------- Home ---------- */

.hero {
  padding: 3rem var(--gutter);
  text-align: center;
  background: var(--bg);
}

.hero__inner {
  max-width: 40rem;
  margin-inline: auto;
}

.carousel {
  max-width: 60rem;
  margin: 2.5rem auto 0;
}

.carousel__frame {
  position: relative;
}

/* Slides stack in one grid cell, so a neighboring photo can never show at the edge. */
.carousel__track {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  touch-action: pan-y;
}

.carousel__slide {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: #767676;
  cursor: pointer;
  transform: translateY(-50%);
  transition: box-shadow 0.2s ease;
}

.carousel__arrow:hover {
  box-shadow: inset 0 0 0 1px currentColor;
}

.carousel__arrow svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel__arrow--prev {
  left: 0.6rem;
}

.carousel__arrow--next {
  right: 0.6rem;
}

/* The arrows and dots need JavaScript; without it, guests see the first photo. */
.no-js .carousel__arrow,
.no-js .carousel__dots {
  display: none;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.carousel__dot {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.carousel__dot::before {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid #3d3d3d;
  border-radius: 50%;
}

.carousel__dot[aria-current='true']::before {
  background: #3d3d3d;
}

.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.25rem 0 1.25rem;
  font-size: clamp(3.4rem, 17vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
}

.hero__amp {
  font-style: italic;
  font-size: 0.6em;
  color: var(--ink);
  margin-block: 0.1em;
}

/* Matches the invitation: true small caps with old-style numerals, one size throughout. */
.hero__date,
.hero__place,
.site-footer__date {
  font-size: 1.25rem;
  font-variant-caps: all-small-caps;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.hero__date {
  margin: 0;
}

.hero__place {
  margin: 0 0 2rem;
}

.countdown {
  margin-bottom: 2rem;
}

.countdown__units {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 4.5rem));
  justify-content: center;
  gap: 0.5rem;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.6);
}

.countdown__value {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.countdown__done {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-style: italic;
}

.link-cards {
  display: grid;
  gap: 1rem;
}

.link-card {
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgb(42 27 41 / 0.12), 0 16px 36px rgb(42 27 41 / 0.22);
}

.link-card__title {
  font-family: var(--heading);
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.2;
}

.link-card__text {
  font-family: var(--serif);
  margin: 0.4rem 0 1rem;
  color: var(--muted);
}

.link-card__more {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink);
}

/* ---------- Cards ---------- */

.card {
  border: 1px solid var(--line);
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* ---------- Schedule ---------- */

.schedule-day {
  margin-bottom: 2.75rem;
}

.schedule-day__title {
  font-size: 1.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.timeline {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.timeline__item {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
  border-left: 1px solid var(--line);
  margin-left: 0.4rem;
}

.timeline__item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -0.4rem;
  top: 0.3rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--ink);
}

.timeline__time {
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.timeline__title {
  font-size: 1.55rem;
  margin-bottom: 0.25rem;
}

.timeline__item p:not(.timeline__time) {
  margin-bottom: 0.35rem;
}

.timeline__meta {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Travel ---------- */

.venue {
  display: grid;
  gap: 1.75rem;
}

.venue__address {
  font-style: normal;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.notes {
  padding-left: 1.2rem;
  color: var(--muted);
}

.notes li + li {
  margin-top: 0.35rem;
}

.map {
  position: relative;
  min-height: 18rem;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint);
  box-shadow: var(--shadow);
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hotel-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hotel {
  display: flex;
  flex-direction: column;
  border: 0;
}

.hotel__name {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.hotel__distance {
  color: var(--muted);
  font-size: 0.95rem;
}

.hotel__facts {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: var(--accent-soft);
}

.hotel__facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hotel__facts dt {
  /* Capitals sit above the middle of the line box; this nudge centers them optically. */
  position: relative;
  top: 0.11em;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.hotel__facts dd {
  margin: 0;
  text-align: right;
  font-weight: 400;
}

.hotel__address {
  font-style: normal;
  margin-bottom: 0.75rem;
}

.hotel__notes {
  color: var(--muted);
  font-size: 0.95rem;
}

.hotel .button {
  margin-top: auto;
}

.info-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.info-list__item {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgb(0 0 0 / 0.15);
}

.info-list__item h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.info-list__item p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Registry ---------- */

.funds {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fund,
.give,
[data-rsvp-form] {
  border: 0;
}

.card[data-rsvp-form] {
  padding-top: 1.25rem;
}

.fund__title {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.fund p {
  margin: 0;
  color: var(--muted);
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.chip {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: 400 1.05rem var(--serif);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--ink);
}

.input-prefix {
  position: relative;
}

.input-prefix span {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 400;
}

/* Extra specificity so the general input padding below doesn't override this. */
.input-prefix input[type='number'] {
  padding-left: calc(2rem + 3px);
}

.give__summary {
  min-height: 1.5em;
  font-family: var(--serif);
  font-size: 1.25rem;
  text-align: center;
}

.pay-buttons {
  display: grid;
  gap: 0.75rem;
}

.button--pay {
  width: 100%;
  min-height: 3.25rem;
  letter-spacing: 0.08em;
}

.button--venmo {
  background: #008cff;
  color: #fff;
}

.button--venmo:hover {
  background: #0074d4;
}

.button--paypal {
  background: #ffc439;
  color: #1a2b4a;
}

.button--paypal:hover {
  background: #f2b52a;
}

.button--card {
  background: var(--accent-soft);
  color: var(--ink);
}

.button--card:hover {
  background: var(--accent);
}

.fine-print {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: 1.5rem;
}

.form__section {
  display: grid;
  gap: 1.5rem;
}

.form__section--guest {
  padding: 1.25rem;
  border-radius: 12px;
  background: var(--accent-soft);
}

.form__section-title {
  margin: 0;
  font-family: var(--heading);
  font-size: 1.4rem;
  font-weight: 400;
}

.field {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field__label {
  padding: 0;
  font-weight: 400;
  font-size: 0.95rem;
}

.field__hint {
  margin: 0;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

.field__sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.field__error {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='search'],
select,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  /* 16px+ stops iOS Safari zooming into the field on focus. */
  font: 1rem/1.4 var(--serif);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

[aria-invalid='true'] {
  border-color: var(--danger);
}

textarea {
  resize: vertical;
}

.choices {
  display: grid;
  gap: 0.6rem;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.choice:hover {
  border-color: var(--ink);
}

.choice:has(input:checked) {
  border-color: var(--ink);
  background: var(--accent-soft);
}

.choice:has(input:checked) .choice__text {
  color: var(--ink);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.choice input {
  grid-row: span 2;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--ink);
}

.choice__title {
  font-weight: 400;
}

.choice__text {
  grid-column: 2;
  font-size: 0.9rem;
  color: var(--muted);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 400;
}

.alert--error {
  background: var(--danger-soft);
  color: var(--ink);
}

.thanks .section__title {
  margin-top: 0.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 3rem var(--gutter) calc(3rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgb(0 0 0 / 0.15);
}

.site-footer .monogram {
  margin-bottom: 0.5rem;
}

.site-footer p {
  margin-bottom: 0.4rem;
}

.site-footer__hashtag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}

.site-footer__small {
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Old-style figures make the zero read as a letter "o" in the email address. */
.site-footer__small a {
  font-variant-numeric: lining-nums;
}

.site-footer__date {
  font-size: 1rem;
}

/* ---------- Admin ---------- */

.page-admin {
  background: var(--bg);
}

.admin-login {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: var(--gutter);
}

.admin-login .form {
  width: 100%;
  max-width: 24rem;
}

.admin-login .monogram {
  margin-bottom: -0.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-header__actions form {
  margin: 0;
}

.admin-header__user {
  display: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin {
  display: grid;
  gap: 1.25rem;
  max-width: 80rem;
  margin-inline: auto;
  padding: 1.5rem var(--gutter) 3rem;
}

.admin__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin__title-row .section__title {
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.stat {
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat__value {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.meal-tally__title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.meal-tally ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.meal-tally li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.meal-tally li:last-child {
  border-bottom: 0;
}

.responses__toolbar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.responses__toolbar .meal-tally__title {
  margin: 0;
}

.responses__filters {
  display: grid;
  gap: 0.5rem;
}

.empty {
  margin: 1rem 0;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
}

.badge--yes {
  background: var(--bg);
  color: var(--ink);
}

.badge--no {
  background: var(--danger-soft);
  color: var(--ink);
}

/* On phones each response is a stacked card; it becomes a table on wider screens. */
.rsvp-table,
.rsvp-table tbody,
.rsvp-table tr,
.rsvp-table td {
  display: block;
}

.rsvp-table thead {
  display: none;
}

.rsvp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.rsvp-table tr {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.rsvp-table td {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  padding: 0.25rem 0;
  overflow-wrap: anywhere;
}

.rsvp-table td::before {
  content: attr(data-label);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.15rem;
}

.rsvp-table td form {
  margin: 0.5rem 0 0;
}

/* ---------- Larger screens ---------- */

@media (min-width: 40rem) {
  .carousel__track {
    aspect-ratio: 3 / 2;
  }

  :root {
    --gutter: 2rem;
  }

  .section {
    padding-block: 5rem;
  }

  .section--flush-top {
    padding-top: 0;
  }

  .card {
    padding: 2rem;
  }

  .hero__names {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0 0.3em;
  }

  .countdown__units {
    grid-template-columns: repeat(4, 5.5rem);
  }

  .countdown__value {
    font-size: 2.2rem;
  }

  .chips {
    grid-template-columns: repeat(4, 1fr);
  }

  .choices--two {
    grid-template-columns: 1fr 1fr;
  }

  .funds {
    grid-template-columns: repeat(2, 1fr);
  }

  /* auto-fit plus centering keeps a lone hotel card in the middle of the page. */
  .hotel-grid {
    grid-template-columns: repeat(auto-fit, minmax(0, 30rem));
    justify-content: center;
  }


  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .admin-header__user {
    display: inline;
  }

  .responses__filters {
    grid-template-columns: 1fr 12rem;
  }
}

@media (min-width: 56rem) {
  .nav-toggle {
    display: none;
  }

  .site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: var(--gutter);
    min-height: var(--header-h);
  }

  .site-header__bar {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: block;
    border-top: 0;
  }

  .site-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0;
  }

  .site-nav a {
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: lowercase;
  }

  .site-nav a:hover,
  .site-nav a[aria-current='page'] {
    border-bottom-color: var(--ink);
    font-style: normal;
  }

  .site-nav a.site-nav__rsvp {
    padding: 0.55rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
  }

  .link-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .venue {
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    gap: 3rem;
  }

  .pay-buttons {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }

  .responses__toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .responses__filters {
    grid-template-columns: 18rem 12rem;
  }

  .rsvp-table {
    display: table;
  }

  .rsvp-table thead {
    display: table-header-group;
  }

  .rsvp-table tbody {
    display: table-row-group;
  }

  .rsvp-table tr {
    display: table-row;
    padding: 0;
  }

  .rsvp-table th,
  .rsvp-table td {
    display: table-cell;
    padding: 0.85rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--line);
  }

  .rsvp-table th {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border-top: 0;
    white-space: nowrap;
  }

  .rsvp-table td::before {
    content: none;
  }

  .rsvp-table td form {
    margin: 0;
  }

  .rsvp-table__note {
    max-width: 18rem;
  }

  .rsvp-table tbody tr:hover {
    background: var(--bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
