/* Wordmark face (logo 1, planning/branding): Fraunces, subset to the header's letters. */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,650,100,1&text=PurpleWizardEvnts&display=swap");

:root {
  --bg: #f7f1fc;
  --fg: #1a0a2e;
  --muted: #6b5a80;
  --accent: #590896;
  --accent-contrast: #f7f1fc;
  --border: #e0d0f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2d0548;
    --fg: #f7f1fc;
    --muted: #a899b8;
    --accent: #f7f1fc;
    --accent-contrast: #2d0548;
    --border: #4a1e6b;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

header.site-header .site-name {
  font-family: Fraunces, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 1.0625rem;
  font-weight: 650;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.1;
  text-decoration: none;
  letter-spacing: 0.01em;
}

header.site-header .site-name::before {
  content: "";
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  background: url("/logo.svg") center / contain no-repeat;
}

header.site-header .site-name:hover {
  opacity: 0.85;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Session area: "Sign in", or the bell plus your avatar and name (header.js) */
.session-area {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

.session-who {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.session-link {
  color: var(--accent);
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.session-link:hover {
  text-decoration: underline;
}

/* Avatar + name, centred on each other so the pair lines up with the bell. */
.session-me {
  display: inline-flex;
  align-items: center;
}

.session-me .avatar.tiny {
  vertical-align: 0;
}

.session-area .link-button {
  font-size: 0.8125rem;
}

main {
  max-width: 34rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  flex: 1;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
  color: var(--accent);
}

/* Co-host credit: a subheader tucked under the title, above the
   date/location line. */
h1 + .hosts {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--fg);
  margin: -1rem 0 1.25rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
  color: var(--accent);
}

p.lede {
  font-size: 1.125rem;
  margin: 0 0 1rem;
}

p.lede + p.lede {
  margin-top: 0;
}

a {
  color: var(--accent);
}

img.hero {
  display: block;
  width: 100%;
  max-height: 20rem;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 0 0 2rem;
}

/* Attribution for a licensed hero photo (event.json heroCredit). The hero's
   bottom margin moves onto the caption so the pair sits as one block. */
img.hero:has(+ .hero-credit) {
  margin-bottom: 0.35rem;
}

.hero-credit {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  margin: 0 0 2rem;
}

.hero-credit a {
  color: inherit;
}

/* Shown by the hub's script when every listed event has aged out, in place
   of an empty "Upcoming" list. */
.empty-note {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.event-list li {
  margin: 0;
}

.event-list .event-link {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.event-list .event-link:hover h3 {
  text-decoration: underline;
}

.event-list .event-thumb {
  width: 7rem;
  height: 7rem;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.event-list .event-text {
  flex: 1;
  min-width: 0;
}

.event-list h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.25;
}

.event-list .when {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
  font-family: system-ui, -apple-system, sans-serif;
}

.event-list .blurb {
  margin: 0;
  font-size: 1rem;
  color: var(--fg);
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="number"] {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.875rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  width: 100%;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  margin-top: 0.25rem;
}

button:hover {
  opacity: 0.9;
}

.fine-print {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

.rsvp-button {
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  margin: 1.25rem 0;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 0.375rem;
  text-decoration: none;
}

.rsvp-button:hover {
  opacity: 0.9;
}

.rsvp-button[hidden] {
  display: none;
}

/* ── RSVP widget ─────────────────────────────────────────────────── */

.rsvp-box {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.25rem 1.5rem;
  margin: 2.5rem 0 0;
}

.rsvp-box h2 {
  margin-top: 0;
}

.rsvp-box h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.25rem;
  color: var(--accent);
}

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

/* Revealed private address, shown directly under the date. Deliberately
   more legible than fine-print — it's the thing a confirmed guest needs. */
.rsvp-where {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  color: var(--fg);
}

.rsvp-where-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.4rem;
}

.rsvp-banner {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin: 0 0 1.25rem;
}

.rsvp-banner.good {
  background: var(--accent);
  color: var(--accent-contrast);
}

.rsvp-banner.bad {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}

.pill-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-group label {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.4rem 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9375rem;
  color: var(--fg);
}

.pill-group input:checked + label {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.pill-group input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.plus-ones {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plus-ones input[type="number"] {
  width: 5.5rem;
}

.guest-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guest-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.guest-row input {
  flex: 1;
}

.check-row {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.check-row label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--fg);
  cursor: pointer;
}

.payment {
  margin: 0 0 1rem;
}

.payment .fine-print {
  margin-bottom: 0.5rem;
}

.payment-link {
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 2rem;
  color: var(--accent);
  text-decoration: none;
}

.payment-link:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}

.payment-alt {
  display: inline-block;
  margin-left: 0.75rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  color: var(--accent);
}

/* Add-to-calendar block, shown after a yes/maybe RSVP */
/* Optional note-to-organizer field on the RSVP form. */
.rsvp-note-label {
  display: block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0.75rem 0 0.3rem;
}
textarea.rsvp-note {
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: var(--bg);
  color: var(--fg);
  resize: vertical;
  box-sizing: border-box;
}
.rsvp-your-note-label { color: var(--muted); font-weight: 600; }

/* Ticketed events: the buy form + Stripe button. */
.ticket-form label { display: block; margin-top: 0.75rem; margin-bottom: 0.3rem; }
.ticket-buy {
  width: 100%;
  margin-top: 0.9rem;
  font-size: 1.0625rem;
}

/* Attendee comments (attendees-only). */
.comments { margin-top: 1.5rem; }
.comment-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.comment { border-left: 2px solid var(--border); padding-left: 0.75rem; }
.comment-meta {
  margin: 0 0 0.15rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  color: var(--muted);
}
.comment-author { font-weight: 600; color: var(--fg); }
.comment-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-del, .comment-reply { font-size: 0.8125rem; }
.comment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.comment-actions .reactions { margin-top: 0; }
.comment-replies {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.6rem 0 0 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}
.comment-replies .comment { border-left: none; padding-left: 0; }

/* Emoji reactions — a chip per reaction + a "+" that opens a picker */
.reactions { position: relative; display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.reaction, .reaction-add {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  margin: 0;
  padding: 0.2rem 0.5rem;
  background: none;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  cursor: pointer;
}
.reaction:hover, .reaction-add:hover { border-color: var(--fg); opacity: 1; }
.reaction.mine { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.reaction-add { color: var(--muted); padding: 0.2rem 0.55rem; }

.reaction-pop {
  position: absolute;
  z-index: 5;
  top: 100%;
  left: 0;
  margin-top: 0.3rem;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  width: max-content;
  max-width: min(20rem, 90vw);
}
.reaction-quick { display: flex; flex-wrap: wrap; gap: 0.15rem; margin-bottom: 0.4rem; }
.reaction-quick button {
  font-size: 1.15rem;
  line-height: 1;
  margin: 0;
  padding: 0.2rem 0.3rem;
  background: none;
  border: none;
  border-radius: 0.35rem;
  cursor: pointer;
}
.reaction-quick button:hover { background: var(--border); opacity: 1; }
input[type="text"].reaction-emoji-input {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
}

.comment-compose { display: flex; flex-direction: column; gap: 0.4rem; }
.reply-compose { margin: 0.6rem 0 0 1rem; }

.reaction.static { cursor: default; }
.reaction.static:hover { border-color: var(--border); }

/* Recurring: browse past occurrences */
.occ-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.occ-nav .occ-here {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.occ-nav button[disabled] { visibility: hidden; }
textarea.comment-input {
  width: 100%;
  font: inherit;
  font-size: 0.9375rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: var(--bg);
  color: var(--fg);
  resize: vertical;
  box-sizing: border-box;
}
.comment-post { align-self: flex-start; }
.admin-note {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.15rem;
}

.calendar-label {
  display: block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.calendar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.calendar-link {
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  padding: 0.4rem 0.9rem;
  background: none; /* also used on a <button> (Copy link), which defaults filled */
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--fg);
  text-decoration: none;
}

.calendar-link:hover {
  border-color: var(--fg);
}

/* Collapsible "Add to calendar" tab (this-event links + subscribe feed) */
.calendar-details {
  margin: 0 0 1rem;
}

.calendar-summary {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
}

.calendar-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
}

.calendar-group .fine-print {
  margin: 0 0 0.5rem;
}
.calendar-dupe-note {
  font-style: italic;
  margin-top: 0.4rem;
}

/* Venmo-vs-PayPal chooser after a fresh "yes" */
.pay-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 10, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 10;
}

.pay-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 22rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
}

.pay-modal p {
  margin: 0;
}

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

.pay-modal-buttons button {
  flex: 1;
  margin-top: 0;
}

.pay-modal .link-button {
  align-self: center;
}

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  padding: 0;
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  cursor: pointer;
  align-self: flex-start;
}

/* The "notifications on this device" switch (push-ui.js). */
.push-control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.push-control .fine-print { margin: 0; }

.link-button:hover {
  opacity: 0.8;
}

.rsvp-error {
  color: var(--accent);
}

.attendees {
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.attendee-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.attendee-list li {
  margin: 0.2rem 0;
}

/* Plus-ones: indented under their host, subtly muted, with a "↳" so they read
   as accompanying guests rather than independent RSVPs. */
.attendee-list li.guest {
  margin-left: 1.1rem;
  color: var(--muted);
}

.attendee-list li.guest::before {
  content: "↳ ";
}

.attendee-list .plus {
  color: var(--muted);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
}

/* Avatars (avatar.js): a profile photo, or initials on a colour derived from
   the name. Inline so a guest line stays one line of text. */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  vertical-align: middle;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  user-select: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar.small {
  width: 1.375rem;
  height: 1.375rem;
  font-size: 0.5625rem;
}

.avatar.tiny {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.5rem;
  margin-right: 0.3em;
  vertical-align: -0.35em;
}

.avatar.large {
  width: 6rem;
  height: 6rem;
  font-size: 2rem;
}

.comment-meta .avatar {
  margin-right: 0.4em;
}

.attendee-list li .avatar {
  margin-right: 0.5em;
}

.attendee-list li.pending .avatar {
  opacity: 0.6;
}

/* /profile */
.profile-photo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.profile-photo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.profile-notify,
.profile-signout {
  margin-top: 1.5rem;
}

.profile-choose {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--accent);
  border-radius: 0.375rem;
  color: var(--accent);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

/* Pending guests, only shown to organizers, marked with a dashed underline. */
.attendee-list li.pending {
  color: var(--muted);
  text-decoration: underline dashed var(--border);
  text-underline-offset: 3px;
}

/* Organizer only: tap a guest for their note / Approve. */
.attendee-list li.admin-tap {
  cursor: pointer;
}

.attendee-list .note-mark {
  margin-left: 0.35em;
  font-size: 0.8em;
  color: var(--muted);
}

.attendee-list li.attendee-detail {
  margin: 0.25rem 0 0.75rem 2.25rem;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--border);
}

.attendee-list li.attendee-detail p {
  margin: 0 0 0.4rem;
}

.attendee-list .attendee-note {
  white-space: pre-wrap;
  font-style: italic;
}

/* ── Organizer panel (admin-widget.js) — collapsible <details> ─────── */

.admin-box {
  border: 1px dashed var(--accent);
  border-radius: 0.5rem;
  margin: 1.5rem 0 0;
}

.admin-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
  list-style: none;
}

.admin-summary::-webkit-details-marker { display: none; }
.admin-summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 0.75rem;
}
.admin-box[open] .admin-summary::before { content: "▾"; }

.admin-tag {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 0.75rem;
}

.admin-content {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-section h3 {
  margin: 0;
  color: var(--accent);
}

.admin-audience {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.admin-audience label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--fg);
  cursor: pointer;
}

.admin-label {
  margin-bottom: -0.4rem;
}

.admin-box textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.875rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  width: 100%;
  resize: vertical;
}

.admin-box textarea:focus,
.admin-box input:focus,
.admin-box select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.admin-section > button {
  align-self: flex-start;
}

.admin-result.good { color: var(--accent); }
.admin-result.bad { color: var(--accent); }

/* RSVP admin rows */
.admin-rsvp-list {
  display: flex;
  flex-direction: column;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
}
.admin-row:first-child { border-top: none; }
.admin-row.pending { opacity: 0.85; }

.admin-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-name {
  font-size: 0.9375rem;
  color: var(--fg);
}

.admin-email {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
}

.admin-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-box select {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  padding: 0.3rem 0.4rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
}

.admin-plus-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
}

.admin-plus {
  width: 3.25rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  padding: 0.3rem 0.4rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
}

.admin-approve {
  font-size: 0.8125rem;
  padding: 0.3rem 0.7rem;
  margin: 0;
}

.admin-remove {
  font-size: 0.8125rem;
}

/* add-by-hand */
.admin-occ { font-style: italic; margin: -0.25rem 0 0.5rem; }
.admin-resend { margin-top: 0.75rem; }
.admin-resend summary,
.admin-add summary {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  color: var(--accent);
  cursor: pointer;
  margin-top: 0.25rem;
}

.admin-add-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
}

.admin-add-fields input[type="text"],
.admin-add-fields input[type="email"] {
  width: auto;
  flex: 1;
  min-width: 8rem;
  font-size: 0.875rem;
  padding: 0.4rem 0.5rem;
}

.admin-add-fields button { margin: 0; }

/* Named plus-ones in the add-by-hand form. */
.admin-guests {
  margin-top: 0.5rem;
}

.admin-guest-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  line-height: 1.1;
}

.admin-guest-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-guest-row input[type="text"] {
  flex: 1;
  min-width: 8rem;
  font-size: 0.875rem;
  padding: 0.4rem 0.5rem;
}

.admin-guests > button { margin: 0.4rem 0 0; }

/* "More upcoming events" — compact teaser at the foot of an event page.
   Hidden until the client-side filter confirms at least one is still
   upcoming (see build.js), so a stale event never flashes up. */
.more-events {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.more-events h2 {
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
}

.more-events .event-list {
  gap: 1rem;
  margin-bottom: 0;
}

.more-events .event-thumb {
  width: 4rem;
  height: 4rem;
}

.more-events h3 {
  font-size: 1rem;
}

/* Markdown body copy (build.js renders description.md with `marked` into
   <div class="prose">). Paragraphs carry .lede and are styled above; these are
   the other elements a description can now legitimately contain. Scoped to
   .prose so none of it reaches the hub's .event-list. */
.prose ul,
.prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.4rem;
  line-height: 1.7;
}

.prose li {
  margin: 0.15rem 0;
}

.prose li > ul,
.prose li > ol {
  margin: 0.15rem 0;
}

.prose blockquote {
  margin: 0 0 1.5rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

.prose code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.prose pre {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.prose table {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

/* Share button on listed event pages (src/share.js). */
.share-row {
  margin: 0.75rem 0 0;
}
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  background: none;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
}
.share-button:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}
.share-button[hidden] {
  display: none;
}

/* Hub: "All public events" / "My RSVPs" toggle (src/hub.js). */
.view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 2px;
  margin: 0.5rem 0 0.5rem;
}
.view-toggle[hidden] {
  display: none;
}
.view-toggle button {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--accent);
  cursor: pointer;
}
.view-toggle button[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
}
.rsvp-state {
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  vertical-align: 0.1em;
}
.rsvp-state-going {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

/* Notifications bell + dropdown (header.js) */
.notif {
  display: inline-flex;
  align-self: center;
  margin-right: 0.625rem;
}

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.notif-bell:hover,
.notif-bell[aria-expanded="true"] {
  background: var(--border);
}

.notif-badge {
  position: absolute;
  top: -0.125rem;
  right: -0.25rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #d6336c;
  color: #fff;
  font: 700 0.6875rem/1.125rem system-ui, -apple-system, sans-serif;
  text-align: center;
  box-sizing: border-box;
}

.notif-badge[hidden] {
  display: none;
}

.notif-panel {
  position: fixed;
  right: max(1rem, calc((100vw - 40rem) / 2 + 1.25rem));
  width: min(22rem, calc(100vw - 2rem));
  max-height: 70vh;
  overflow-y: auto;
  z-index: 50;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(26, 10, 46, 0.18);
  font-family: system-ui, -apple-system, sans-serif;
  text-align: left;
}

.notif-head {
  margin: 0;
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.notif-empty {
  margin: 0;
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notif-item {
  padding: 0.625rem 1rem 0.625rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-unread::before {
  content: "";
  position: absolute;
  left: 0.625rem;
  top: 1rem;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #d6336c;
}

.notif-link {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  color: inherit;
  text-decoration: none;
}

.notif-link:hover .notif-title {
  text-decoration: underline;
}

.notif-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.notif-unread .notif-title {
  font-weight: 700;
}

.notif-body {
  font-size: 0.8125rem;
  color: var(--fg);
  opacity: 0.85;
}

.notif-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.notif-action {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.notif-done {
  display: inline-block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* The hub's mailing-list call to action (was a header button until 2026-10-24). */
.join-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 2rem;
}

.join-button {
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
}

.join-button:hover {
  opacity: 0.9;
}

.join-hint {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  color: var(--muted);
}
