:root {
  color-scheme: dark;
  --night: #101622;
  --panel: #151e2c;
  --field: #0f1724;
  --text: #f7f0e5;
  --muted: #b7c0cd;
  --gold: #f0c983;
  --line: #303a49;
  --serif: 'Iowan Old Style', Baskerville, Georgia, serif;
  --sans: Inter, 'Segoe UI', system-ui, sans-serif;
  font-family: var(--sans);
  background: var(--night);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[id] { scroll-margin-top: 1.5rem; }

.shell { width: min(74rem, calc(100% - 5rem)); margin-inline: auto; }
.muted { color: var(--muted); }
.skip-link {
  position: absolute;
  top: .8rem;
  left: .8rem;
  z-index: 4;
  padding: .6rem 1rem;
  background: var(--gold);
  color: var(--night);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header { position: relative; z-index: 1; border-bottom: 1px solid #252e3c; background: #101622; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 4.65rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font: 1.35rem/1.25 var(--serif);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.brand-mark { color: var(--gold); font: 1.55rem/1 var(--sans); }
.public-nav, .header-actions { display: flex; align-items: center; gap: 1.6rem; }
.header-actions { gap: .5rem; }
.public-nav a { color: var(--muted); font-size: .95rem; text-decoration: none; }
.public-nav a:hover { color: var(--text); }

.button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  padding: .5rem .95rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.button-outline { border-color: #50515a; background: #161e2c; color: var(--text); }
.button-outline:hover { border-color: var(--gold); color: var(--gold); }
.button-primary { background: var(--gold); color: #1d1710; }
.button-primary:hover { background: #ffe0a8; }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { color: var(--text); background: var(--panel); }

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(30rem, 69vh, 42rem);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 77% 27%, #344a65 0%, #192943 32%, #0c1423 75%);
}
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-image { object-fit: cover; object-position: 65% 55%; color: transparent; }
.hero-shade {
  background: linear-gradient(90deg, #060b15e6 0%, #091221ae 32%, #10162212 70%),
    linear-gradient(0deg, #101622 0%, #10162200 37%);
}
.hero-content { padding-block: 5.75rem 6.25rem; }
.hero-date {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.1rem;
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero-date span { width: 2rem; height: 1px; background: var(--gold); }
.hero h1 {
  max-width: 54rem;
  font: 400 clamp(3.6rem, 8vw, 8rem)/.99 var(--serif);
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.hero-intro {
  max-width: 30rem;
  margin-top: 1.4rem;
  color: #e0e5ec;
  font-size: clamp(1.07rem, 1.4vw, 1.22rem);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; }
.hero .button { min-height: 3.05rem; padding-inline: 1.35rem; }
.hero-deadline { margin-top: .7rem; color: #e0e5ec; font-size: .92rem; }

.details { padding-block: 1.8rem 3.7rem; }
.details h2, .gallery-section h2 {
  font: 400 clamp(2rem, 3.5vw, 3rem)/1.15 var(--serif);
  letter-spacing: -.032em;
  margin-bottom: 1.3rem;
}
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.fact {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.45rem 1.5rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.fact:first-child { padding-left: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact-icon {
  display: grid;
  flex: 0 0 2.75rem;
  place-items: center;
  height: 2.75rem;
  border: 1px solid #5d5244;
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.35rem;
  line-height: 1;
}
.fact dt { font-size: .875rem; font-weight: 600; color: var(--muted); }
.fact dd { font-size: 1.07rem; font-weight: 600; }
.fact .fact-extra { margin-top: .1rem; color: var(--muted); font-size: .95rem; font-weight: 400; }
.map-link { display: inline-block; padding-block: .35rem; color: var(--gold); font-size: .95rem; }
.detail-copy { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 2.5rem; margin-top: 2.5rem; }
.detail-copy h3 { font: 400 1.65rem/1.2 var(--serif); margin-bottom: .7rem; }
.detail-copy p { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; max-width: 44rem; }
.detail-copy { align-items: start; gap: 1.2rem; }
.practical-card { display: grid; gap: 1rem; }
.practical-card h3 { margin-bottom: 0; }
.practical-item h4 { margin: 0 0 .25rem; color: var(--gold); font-size: .95rem; }
.dress-code { padding: .85rem 1rem; border: 1px solid #5d5244; border-radius: .35rem; background: var(--field); }
.dress-code p { color: var(--text); }
.program-card .program-caption { font-size: .88rem; margin-bottom: .65rem; }
.program-list { list-style: none; padding: 0; margin: 0; }
.program-list li { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: .75rem; align-items: baseline; padding: .65rem 0; border-top: 1px solid var(--line); }
.program-list time { color: var(--gold); font-weight: 650; font-variant-numeric: tabular-nums; }
.program-list .program-note { display: block; color: var(--muted); }
.rsvp-section { margin-bottom: 4rem; }
.rsvp-section .editor-card { max-width: 32rem; }
.rsvp-section .rsvp-card-wide { max-width: 48rem; }
.rsvp-section .notice { margin-top: 0; }
.rsvp-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.rsvp-form-pick-profile:not(:has(input[name='profileId']:checked)) .rsvp-details,
.rsvp-form:has(input[name='profileId']:checked) .rsvp-name { display: none; }
.rsvp-form .rsvp-profile-comment { display: none; }
.rsvp-form:has(input[name='attending'][value='yes']:checked) .rsvp-profile-comment { display: block; }
.rsvp-form:has(.profile-picker):not(:has(input[name='profileId']:checked)) .rsvp-profile-comment { display: none; }
.rsvp-form .rsvp-budget { display: none; }
.rsvp-form:has(input[name='attending'][value='yes']:checked) .rsvp-budget { display: grid; }
.rsvp-options { display: grid; gap: .25rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.rsvp-options legend { font-size: .92rem; font-weight: 650; }
.rsvp-options label { display: flex; min-height: 2.75rem; align-items: center; gap: .6rem; }
.rsvp-options input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--gold); }
.profile-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.profile-picker legend { padding: 0; font-weight: 650; margin-bottom: .3rem; }
.profile-heading { display: flex; align-items: center; gap: .85rem; overflow-wrap: anywhere; }
.profile-avatar {
  display: block;
  flex: 0 0 auto;
  width: 3.75rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: .45rem;
  background: var(--field);
}
.profile-initials {
  display: grid;
  place-items: center;
  font: 400 1.4rem/1 var(--serif);
  color: var(--gold);
}
.profile-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 7.5rem), 1fr)); gap: .75rem; }
.profile-choice {
  position: relative;
  display: grid;
  align-content: start;
  gap: .45rem;
  padding: .4rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--field);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.profile-choice .profile-avatar { width: 100%; background: var(--panel); }
.profile-choice > span:last-child { padding-inline: .3rem; font-weight: 650; }
.profile-choice input { position: absolute; top: .65rem; right: .65rem; width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--gold); }
.profile-choice:hover, .profile-choice:has(input:checked) { border-color: var(--gold); }
.profile-access { max-width: 34rem; margin-block: clamp(2rem, 8vh, 5rem); }
.profile-access-wide { max-width: 43rem; }
.profile-access h1 { font: 400 clamp(1.9rem, 4vw, 2.85rem)/1.15 var(--serif); letter-spacing: -.035em; }
.profile-event { color: var(--gold); font-weight: 650; overflow-wrap: anywhere; }
.profile-code { font-size: clamp(.95rem, 4.25vw, 1.35rem); letter-spacing: .06em; color: var(--gold); user-select: all; }
.profile-assignment { border-block: 1px solid var(--line); padding-block: .65rem; }
.profile-assignment summary { cursor: pointer; font-weight: 650; color: var(--gold); }
.profile-assignment form { margin-top: .75rem; }
.guest-overview { margin-bottom: 4rem; }
.guest-overview h2 { font: 400 clamp(2rem, 3.5vw, 3rem)/1.15 var(--serif); letter-spacing: -.032em; }
.guest-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.guest-card { align-content: start; }
.guest-comment { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.discussion { max-width: 46rem; margin-block: clamp(2rem, 6vw, 4rem) 5rem; }
.discussion-intro { margin-bottom: 1.75rem; }
.discussion-intro h1 {
  margin-bottom: .6rem;
  font: 400 clamp(2.65rem, 8vw, 4.4rem)/1.05 var(--serif);
  letter-spacing: -.045em;
}
.discussion-intro p { max-width: 37rem; }
.discussion-compose { margin-top: 1rem; }
.discussion-compose-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .35rem 1rem; }
.discussion-compose-heading p { font-size: .9rem; overflow-wrap: anywhere; }
.discussion-compose select { max-width: 18rem; }
.discussion-thread { margin-top: 2rem; }
.discussion-thread h2 { font: 400 1.65rem/1.15 var(--serif); }
.discussion-messages { display: grid; gap: .65rem; list-style: none; margin: 0; padding: 0; }
.discussion-message { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: start; }
.discussion-message:target { border-color: var(--gold); }
.discussion-message .profile-avatar { width: 2.5rem; }
.discussion-message-header, .discussion-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .65rem; }
.discussion-message-header { overflow-wrap: anywhere; }
.discussion-topic, .host-label { color: var(--gold); font-size: .85rem; }
.discussion-meta { color: var(--muted); font-size: .875rem; }
.discussion-text { margin-top: .55rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.discussion-moderation { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .45rem; }
.discussion-moderation .button { padding-inline: .5rem; }
.discussion-delete { color: #ffb9b7; }
.discussion-delete:hover { color: #ffdfdd; background: #38232b; }
.discussion-delete-preview { background: var(--field); }
.discussion-delete-confirm { border-color: #a46061; color: #ffdfdd; background: #652d38; }
.discussion-delete-confirm:hover { background: #773944; }
.discussion-notice { margin-top: 0; }
.discussion-pagination { margin-top: 1rem; }
.rsvp-table { width: 100%; border-collapse: collapse; text-align: left; }
.rsvp-table th, .rsvp-table td { border-bottom: 1px solid var(--line); padding: .6rem .4rem; overflow-wrap: anywhere; }
.rsvp-table th:last-child { width: 8rem; }
.gallery-section { padding-bottom: 4rem; }
.public-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.2rem; }
.public-gallery figure { background: var(--panel); border-radius: .45rem; overflow: hidden; }
.public-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; min-height: 5rem; }
.footer-inner .brand { color: var(--muted); font-size: 1.05rem; }
.footer-inner .brand-mark { font-size: 1rem; }

.stack { display: grid; gap: 1rem; }
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(61rem, calc(100% - 5rem));
  margin-block: clamp(2rem, 9vh, 6rem);
  border: 1px solid var(--line);
  border-radius: .65rem;
  overflow: hidden;
  background: var(--panel);
}
.login-photo { position: relative; min-height: 31rem; background: #202f46; }
.login-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 73% center; }
.login-content { padding: clamp(2rem, 5vw, 4rem); align-self: center; }
.login-content h1, .editor-main h1, .error-page h1 {
  font: 400 clamp(2.2rem, 5vw, 3.55rem)/1.1 var(--serif);
  letter-spacing: -.035em;
  margin-bottom: .75rem;
}
.login-content form { margin-top: 1.5rem; }
.login-content button { min-height: 2.95rem; margin-top: .4rem; }

.editor-layout { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); margin-block: 3.2rem 5rem; }
.editor-nav { display: flex; flex-direction: column; gap: .35rem; align-self: start; }
.editor-nav a {
  padding: .6rem .9rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.editor-nav a:hover { background: var(--panel); color: var(--text); }
.editor-nav a[aria-current] { background: var(--panel); border-color: #5d5244; color: var(--gold); }
.editor-main { max-width: 54rem; }
.editor-main > .stack { margin-top: 1.55rem; }
.editor-hint { margin-bottom: 1rem; }
.editor-card { padding: clamp(1rem, 3vw, 1.65rem); border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); }
.editor-card h2 { font: 400 1.65rem/1.15 var(--serif); letter-spacing: -.02em; }
.form-row, .editor-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
label { display: block; font-size: .92rem; font-weight: 650; min-width: 0; }
label > span { font-weight: 400; }
input:not([type='hidden'], [type='radio']), select, textarea {
  display: block;
  width: 100%;
  min-height: 2.8rem;
  margin-top: .35rem;
  padding: .55rem .7rem;
  background: var(--field);
  color: var(--text);
  border: 1px solid #4a5565;
  border-radius: .3rem;
  font-size: 1rem;
  font-weight: 400;
}
textarea { resize: vertical; }
input::file-selector-button {
  margin-right: .6rem;
  border: 1px solid #50515a;
  border-radius: .25rem;
  background: var(--panel);
  color: var(--text);
  padding: .3rem .55rem;
  cursor: pointer;
}
.editor-actions { display: flex; justify-content: flex-end; }
.notice {
  margin-top: 1rem;
  border: 1px solid #507162;
  border-radius: .35rem;
  background: #20362e;
  color: #d6f5df;
  padding: .7rem .85rem;
}
.notice-error { border-color: #8d5053; background: #38232b; color: #ffd6d4; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; }
.section-head p { font-size: .88rem; }
.cover-preview { display: grid; gap: .65rem; justify-items: start; }
.cover-preview img { width: 100%; aspect-ratio: 3; object-fit: cover; border-radius: .3rem; }
.image-card { min-width: 0; border: 1px solid var(--line); border-radius: .35rem; overflow: hidden; background: var(--field); }
.image-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.image-card figcaption { display: grid; gap: .5rem; padding: .7rem; color: var(--muted); overflow-wrap: anywhere; }
.error-page { margin-block: 5rem; }
.error-page .button { margin-top: 1rem; }

@media (width > 50rem) {
  .rsvp-section .rsvp-card-wide { max-width: 43rem; }
  .profile-choices { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)); gap: .5rem; }
  .profile-choice {
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    padding: .45rem .55rem;
  }
  .profile-choice .profile-avatar { grid-area: 1 / 1; width: 2.75rem; }
  .profile-choice > span:last-child { grid-area: 1 / 2; padding: 0; line-height: 1.25; }
  .profile-choice input { grid-area: 1 / 3; position: static; }
  .guest-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: .7rem; align-items: start; }
  .guest-card { padding: .8rem; gap: .55rem; }
  .guest-card .profile-heading { gap: .55rem; }
  .guest-card .profile-avatar { width: 2.75rem; }
  .guest-card h3 { font-size: 1rem; line-height: 1.25; }
}

@media (max-width: 50rem) {
  .shell, .login-layout { width: calc(100% - 3rem); }
  .hero { min-height: 31rem; }
  .hero-content { padding-block: 4.5rem; }
  .fact { padding-inline: .9rem; gap: .65rem; }
  .fact-icon { flex-basis: 2.25rem; height: 2.25rem; font-size: 1.15rem; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); margin-top: 1.5rem; }
  .editor-nav { flex-flow: row wrap; border-bottom: 1px solid var(--line); padding-bottom: .75rem; }
}

@media (max-width: 36rem) {
  .shell, .login-layout { width: calc(100% - 2.25rem); }
  .header-inner { gap: .75rem; min-height: 4rem; padding-block: .5rem; }
  .brand { font-size: 1.12rem; gap: .45rem; }
  .brand-mark { font-size: 1.18rem; }
  .public-nav { display: none; }
  .header-actions .button { padding-inline: .55rem; }
  .hero { min-height: 29rem; }
  .hero-content { padding-block: 6.25rem 2.85rem; align-self: end; }
  .hero h1 { font-size: clamp(3.05rem, 13vw, 4.65rem); }
  .hero-intro { margin-top: 1rem; }
  .hero-shade { background: linear-gradient(0deg, #101622 0%, #091221d8 37%, #0a121d10 93%); }
  .hero-image { object-position: 70% center; }
  .details { padding-block: 1.25rem 2.75rem; }
  .facts, .login-layout, .form-row { grid-template-columns: minmax(0, 1fr); }
  .fact { padding: .8rem 0; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .fact-icon { align-self: center; }
  .login-photo { min-height: 11rem; }
  .login-content { padding: 1.5rem; }
  .cover-preview img { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
