:root {
  --ivory: #FBF8F5;
  --paper: #FFFFFF;
  --ink: #1C1C1C;
  --ink-soft: #6B6B6B;
  --teal: #22314D;
  --teal-deep: #131E30;
  --brass: #E14032;
  --brass-soft: #F2A99B;
  --line: #E5E0D8;
  --radius: 2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: var(--teal-deep);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }

p { line-height: 1.55; }

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

.hidden { display: none !important; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.masthead-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.masthead a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.mark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--paper);
  background: var(--teal-deep);
  border-radius: 3px;
  padding: 4px 9px;
  letter-spacing: 0.02em;
}

.masthead-name {
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* ---------- stage / panels ---------- */

.stage {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  flex: 1;
}

.panel { animation: rise 0.35s ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow-line {
  font-size: 0.85rem;
  color: var(--brass);
  margin: 0 0 10px;
}

.back-link {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0;
  margin-top: 18px;
  cursor: pointer;
  text-align: left;
}
.back-link:hover { color: var(--teal-deep); }

/* ---------- chapter list ---------- */

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.chapter-item {
  background: var(--paper);
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  width: 100%;
  font-family: inherit;
}

.chapter-item:hover { background: #FBF7EE; }

.chapter-item .ci-name {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--teal-deep);
  display: block;
  margin-bottom: 4px;
}

.chapter-item .ci-meta {
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: block;
  min-height: 1.2em;
}

.chapter-item .ci-arrow {
  font-size: 1.3rem;
  color: var(--brass);
  flex-shrink: 0;
}

/* ---------- ticket ---------- */

.ticket {
  display: flex;
  background: var(--paper);
  border: 1px solid var(--line);
  margin-bottom: 36px;
  position: relative;
}

.ticket-main {
  flex: 1;
  padding: 28px 26px;
}

.ticket-label {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--brass);
}

.ticket-main h2 { margin-bottom: 10px; }

.ticket-time {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.ticket-venue {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.ticket-address {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.ticket-stub {
  width: 148px;
  flex-shrink: 0;
  background: var(--teal-deep);
  color: var(--ivory);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-left: 2px dashed var(--brass-soft);
}

.stub-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--brass-soft);
}

.stub-cost {
  margin: 0 0 6px;
  font-family: 'Fraunces', serif;
  font-size: 1.7rem;
}

.stub-note {
  margin: 0;
  font-size: 0.74rem;
  color: #C9D6D2;
}

/* ---------- membership choice ---------- */

.choice-row {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.choice-btn {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: 18px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

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

.choice-btn.primary {
  background: var(--teal-deep);
  color: var(--paper);
  border-color: var(--teal-deep);
}

.choice-btn.primary:hover { background: var(--teal); }

/* ---------- map link + cadence note ---------- */

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--brass);
  text-decoration: none;
  margin-top: 6px;
}

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

.cadence-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 2px 0 0;
}

/* ---------- form ---------- */

.rsvp-form { display: flex; flex-direction: column; gap: 6px; }

.rsvp-form label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 14px;
  margin-bottom: 6px;
}

.rsvp-form input {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 13px 14px;
  font-size: 1rem;
  font-family: inherit;
  border-radius: var(--radius);
  color: var(--ink);
}

.rsvp-form input:focus {
  outline: none;
  border-color: var(--brass);
}

.rsvp-form button[type="submit"] {
  margin-top: 26px;
  background: var(--brass);
  color: var(--paper);
  border: none;
  padding: 15px 20px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
}

.rsvp-form button[type="submit"]:hover { background: #C6351F; }
.rsvp-form button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }

.form-error {
  color: #A23B2E;
  font-size: 0.9rem;
  margin-top: 10px;
}

/* ---------- result ---------- */

.result-panel { text-align: center; padding-top: 24px; }

.result-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal-deep);
  color: var(--ivory);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.result-mark.is-error { background: var(--brass); }

/* ---------- footer ---------- */

.foot {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

.foot p { margin: 0; }

@media (max-width: 480px) {
  .stage { padding: 36px 20px 60px; }
  .ticket { flex-direction: column; }
  .ticket-stub {
    width: 100%;
    border-left: none;
    border-top: 2px dashed var(--brass-soft);
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 22px;
  }
  .stub-label, .stub-note { display: none; }
  .choice-row { flex-direction: column; }
}
