/* ============================================================
   BALLAVIMUS — Ball Party Host Planner
   Fonts: Cormorant Garamond (display), Work Sans (body),
          Quintessential (wordmark tagline only)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Quintessential&family=Work+Sans:wght@400;500;600&display=swap');

/* ============================================================
   VARIABLES
   ============================================================ */

:root {
  --bg:       #fffef3;
  --indigo:   #302579;
  --coral:    #ff5757;
  --yellow:   #ffe21d;
  --white:    #ffffff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Work Sans', system-ui, sans-serif;
  --font-script:  'Quintessential', cursive;

  --tracking-wide:   0.2em;
  --tracking-medium: 0.08em;
  --tracking-body:   0.04em;

  --container: 680px;
  --gap-section: 80px;
  --gap-section-mobile: 48px;
}

/* ============================================================
   RESET
   ============================================================ */

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

/* ============================================================
   BASE
   ============================================================ */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--indigo);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HEADER / WORDMARK
   ============================================================ */

.site-header {
  background-color: var(--yellow);
  padding: 22px 24px;
  text-align: center;
}

.wordmark-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: var(--tracking-wide);
  color: var(--indigo);
  text-transform: uppercase;
  line-height: 1;
}

.wordmark-tagline {
  font-family: var(--font-script);
  font-size: 1.05rem;
  color: var(--indigo);
  line-height: 1;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container--centered {
  text-align: center;
}

#section-landing .container--centered {
  max-width: 660px;
  border: 1.5px solid rgba(48, 37, 121, 0.18);
  border-radius: 6px;
  padding: 56px 48px;
}

.section {
  padding-top: var(--gap-section);
  padding-bottom: var(--gap-section);
  border-bottom: 1px solid rgba(48, 37, 121, 0.1);
}

.section:last-of-type {
  border-bottom: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 5vw, 2.25rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--indigo);
  margin-bottom: 24px;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.625rem, 4vw, 2.375rem);
  letter-spacing: var(--tracking-wide);
  line-height: 1.15;
  color: var(--indigo);
  margin-bottom: 16px;
}

.stage-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.175rem;
  letter-spacing: 0.03em;
  color: var(--indigo);
  margin-bottom: 14px;
  margin-top: -4px;
}

h3.stage-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
}

p {
  font-size: 1rem;
  line-height: 1.75;
}

.section-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 44px;
  opacity: 0.88;
}

.landing-intro {
  font-size: 0.975rem;
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

/* ============================================================
   BACK TO START LINK
   ============================================================ */

.btn-back-start {
  background: none;
  border: none;
  color: var(--indigo);
  opacity: 0.5;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  margin-bottom: 28px;
  display: inline-block;
  transition: opacity 0.15s;
}

.btn-back-start:hover {
  opacity: 1;
}

/* ============================================================
   START OVER BUTTON
   ============================================================ */

.btn-start-over {
  background: transparent;
  border: 1.5px solid var(--indigo);
  color: var(--indigo);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 13px 26px;
  margin: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-start-over:hover {
  background-color: var(--indigo);
  color: var(--white);
}

/* ============================================================
   SECTION TRANSITIONS
   ============================================================ */

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

.section-entering {
  animation: fadeSlideIn 0.38s ease forwards;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: var(--tracking-wide);
  line-height: 1.4;
  padding: 15px 40px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
  -webkit-font-smoothing: antialiased;
  appearance: none;
  border-radius: 0;
}

.btn:active {
  opacity: 0.85;
}

.btn-primary {
  background-color: var(--yellow);
  color: var(--indigo);
}

.btn-primary:hover {
  filter: brightness(0.93);
}

.btn-ghost {
  background: transparent;
  color: var(--indigo);
  border: 1.5px solid var(--indigo);
  padding: 13px 40px;
}

.btn-ghost:hover {
  background-color: var(--indigo);
  color: var(--white);
}

.btn-full {
  display: block;
  width: 100%;
}

.btn-small {
  padding: 10px 24px;
  font-size: 0.9rem;
}

/* ============================================================
   FORMS — shared inputs
   ============================================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: var(--tracking-medium);
  color: var(--indigo);
}

.field-hint {
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: var(--tracking-body);
  opacity: 0.65;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"] {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: var(--tracking-body);
  color: var(--indigo);
  background-color: var(--white);
  border: 1.5px solid rgba(48, 37, 121, 0.35);
  padding: 13px 16px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

input[type="date"] {
  -webkit-appearance: none;
}

input:focus {
  border-color: var(--coral);
}

input::placeholder {
  color: var(--indigo);
  opacity: 0.35;
}

.form-error {
  font-size: 0.875rem;
  color: var(--coral);
  min-height: 1.25rem;
  letter-spacing: var(--tracking-body);
}

/* ============================================================
   BUILDER HEADING
   ============================================================ */

.builder-type-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: var(--tracking-wide);
  color: var(--indigo);
  margin-top: 4px;
  margin-bottom: 22px;
}

.instructions-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 6px;
}

.builder-instructions {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--indigo);
  font-style: italic;
}

/* Non-blocking warning under a form field, banner-style not error-style */
.form-warning:not(:empty) {
  background-color: var(--yellow);
  color: var(--indigo);
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 10px 14px;
  margin-top: 8px;
}

/* ============================================================
   PAST STAGES BANNER
   ============================================================ */

.past-stages-banner {
  background-color: var(--yellow);
  padding: 16px 20px;
  margin-bottom: 18px;
}

.past-stages-banner p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--indigo);
}

/* Override generic banner p rule for the heading inside */
.past-stages-banner .instructions-label {
  font-size: 0.8rem;
  margin-bottom: 6px;
}

/* ============================================================
   STAGES — card layout
   ============================================================ */

.stage {
  border: 1.5px solid rgba(48, 37, 121, 0.18);
  border-radius: 6px;
  padding: 16px 20px 14px;
  margin-bottom: 8px;
}

.stage:last-of-type {
  margin-bottom: 0;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

/* Past stage — still visible, subtly marked */
.stage--past {
  opacity: 0.72;
}

.stage--past .stage-title::after {
  content: 'Past';
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Unchecked items in past stages: clearly readable, normal weight */
.stage--past .checklist-item input[type="checkbox"]:not(:checked) + span,
.stage--past .checklist-item input[type="checkbox"]:not(:checked) ~ span {
  opacity: 0.75;
  font-weight: 400;
  color: var(--indigo);
}

/* ============================================================
   DATE BADGE
   ============================================================ */

.date-badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--indigo);
  background: transparent;
  border: 1px solid rgba(48, 37, 121, 0.3);
  padding: 6px 14px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.3;
  min-width: 152px;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
  border-radius: 0;
  flex-shrink: 0;
}

.date-badge::before {
  content: 'Complete by';
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 3px;
  line-height: 1;
}

.date-badge:hover {
  border-color: var(--indigo);
  background-color: var(--indigo);
  color: var(--white);
}

.date-badge:hover::before {
  opacity: 0.85;
}

/* ============================================================
   CHECKLIST — items
   ============================================================ */

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.checklist-item label {
  flex-direction: row;
  align-items: flex-start;
  gap: 13px;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.6;
  cursor: pointer;
  letter-spacing: var(--tracking-body);
}

/* Custom checkbox */
.checklist-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.5px solid rgba(48, 37, 121, 0.45);
  background-color: var(--white);
  cursor: pointer;
  position: relative;
  top: 2px;
  flex-shrink: 0;
  transition: background-color 0.15s, border-color 0.15s;
  border-radius: 0;
}

/* Checked = indigo */
.checklist-item input[type="checkbox"]:checked {
  background-color: var(--indigo);
  border-color: var(--indigo);
}

/* White tick */
.checklist-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 1.5px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Unchecked = dimmed but still legible */
.checklist-item input[type="checkbox"]:not(:checked) ~ span,
.checklist-item input[type="checkbox"]:not(:checked) + span {
  opacity: 0.55;
  font-weight: 400;
}

/* Mandatory items — always checked, cannot be unticked */
.checklist-item--mandatory input[type="checkbox"] {
  pointer-events: none;
  cursor: default;
}

.checklist-item--mandatory label {
  cursor: default;
}

/* ============================================================
   CUSTOM ACTIONS
   ============================================================ */

.custom-actions {
  margin-top: 8px;
}

.custom-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-action-label {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.custom-text {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--indigo);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(48, 37, 121, 0.25);
  padding: 4px 0;
  outline: none;
  letter-spacing: var(--tracking-body);
  width: 100%;
}

.custom-text:focus {
  border-bottom-color: var(--coral);
}

.custom-text::placeholder {
  color: var(--indigo);
  opacity: 0.3;
}

.btn-remove-action {
  background: none;
  border: none;
  color: var(--indigo);
  opacity: 0.35;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.btn-remove-action:hover {
  opacity: 0.8;
  color: var(--coral);
}

.btn-add-action {
  background: none;
  border: none;
  color: var(--indigo);
  opacity: 0.5;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 0;
  margin-top: 6px;
  display: block;
  transition: opacity 0.15s;
  min-height: 36px;
}

.btn-add-action:hover {
  opacity: 1;
  color: var(--coral);
}

.btn-add-action:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  color: var(--indigo);
}

/* ============================================================
   BUILDER ACTIONS
   ============================================================ */

.builder-actions {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(48, 37, 121, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ============================================================
   SHARE PANEL
   ============================================================ */

.share-panel {
  display: none;
  margin-top: 20px;
  border: 1.5px solid rgba(48, 37, 121, 0.18);
  padding: 20px 24px;
}

.share-panel.is-open {
  display: block;
}

.share-panel-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
  opacity: 0.65;
  margin-bottom: 14px;
}

.share-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-option {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--indigo);
  background: transparent;
  border: 1px solid rgba(48, 37, 121, 0.3);
  padding: 8px 18px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.04em;
  line-height: 1.4;
  display: inline-block;
  border-radius: 0;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.share-option:hover {
  background-color: var(--indigo);
  color: var(--white);
  border-color: var(--indigo);
}

/* ============================================================
   PREVIEW
   ============================================================ */

.pdf-preview {
  background-color: var(--white);
  border: 1.5px solid rgba(48, 37, 121, 0.15);
  padding: 52px 48px;
  margin-bottom: 44px;
  min-height: 240px;
}

.preview-placeholder {
  text-align: center;
  opacity: 0.35;
  font-size: 0.9rem;
  padding: 48px 0;
}

.preview-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(48, 37, 121, 0.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background-color: var(--bg);
  padding: 36px 40px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
}

.modal > p {
  margin-bottom: 22px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.field-checkbox {
  gap: 10px;
}

.checkbox-label {
  flex-direction: row;
  align-items: flex-start;
  gap: 13px;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.6;
  cursor: pointer;
  letter-spacing: var(--tracking-body);
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.5px solid rgba(48, 37, 121, 0.45);
  background-color: var(--white);
  cursor: pointer;
  position: relative;
  top: 2px;
  flex-shrink: 0;
  transition: background-color 0.15s, border-color 0.15s;
  border-radius: 0;
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: var(--indigo);
  border-color: var(--indigo);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 1.5px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.checkbox-hint {
  padding-left: 30px;
}

.fine-print {
  font-size: 0.775rem;
  text-align: center;
  opacity: 0.55;
  margin-top: 16px;
  letter-spacing: var(--tracking-body);
}

.fine-print a {
  color: var(--indigo);
  text-decoration: underline;
}

/* ============================================================
   SUCCESS MODAL
   ============================================================ */

.modal-success-inner {
  text-align: center;
  padding: 64px 44px;
  max-width: 440px;
}

.success-message {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 4vw, 1.875rem);
  letter-spacing: var(--tracking-wide);
  line-height: 1.35;
  color: var(--indigo);
}

.modal-success-inner .btn {
  margin-top: 28px;
}

/* ============================================================
   DATE PICKER OVERLAY
   ============================================================ */

.datepicker-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(48, 37, 121, 0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.datepicker-overlay.is-open {
  display: flex;
}

.datepicker-popup {
  background-color: var(--bg);
  padding: 36px 40px;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.datepicker-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-medium);
  opacity: 0.75;
}

.datepicker-actions {
  display: flex;
  gap: 12px;
}

/* ============================================================
   RESPONSIVE — mobile
   ============================================================ */

@media (max-width: 640px) {
  .section {
    padding-top: var(--gap-section-mobile);
    padding-bottom: var(--gap-section-mobile);
  }

  /* Larger, easier-to-tap checkboxes */
  .checklist-item input[type="checkbox"],
  .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  /* Stage cards: tighter padding on small screens */
  .stage {
    padding: 14px 14px 12px;
    border-radius: 5px;
  }

  /* Stage header: allow date badge to wrap below title */
  .stage-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Date badge fills row on mobile for easy tapping */
  .date-badge {
    min-width: 0;
    width: 100%;
    min-height: 52px;
    justify-content: center;
  }

  .pdf-preview {
    padding: 28px 20px;
  }

  .modal {
    padding: 36px 24px;
  }

  .modal-success-inner {
    padding: 44px 24px;
  }

  .preview-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-actions .btn {
    text-align: center;
  }

  .builder-actions {
    margin-top: 28px;
    padding-top: 28px;
    flex-direction: column;
    align-items: stretch;
  }

  .builder-actions .btn {
    text-align: center;
  }

  .datepicker-popup {
    padding: 28px 20px;
  }

  .datepicker-actions {
    flex-direction: column;
  }

  .share-options {
    flex-direction: column;
  }

  .share-option {
    text-align: center;
  }

  .wordmark {
    font-size: 1.625rem;
  }

  .past-stages-banner {
    padding: 16px 18px;
  }
}

/* ============================================================
   PREVIEW PANEL — generated content
   ============================================================ */

.preview-cover {
  border-bottom: 2px solid var(--indigo);
  padding-bottom: 28px;
  margin-bottom: 32px;
  text-align: center;
}

.preview-ball-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.625rem;
  letter-spacing: var(--tracking-wide);
  color: var(--indigo);
  line-height: 1.2;
  margin-bottom: 6px;
}

.preview-type-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--indigo);
  opacity: 0.78;
  margin-top: 2px;
  margin-bottom: 8px;
}

.preview-date {
  font-size: 0.9rem;
  opacity: 0.7;
  letter-spacing: var(--tracking-medium);
}

.preview-party {
  font-size: 0.8rem;
  color: #ff5757;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: var(--tracking-body);
}

.preview-stage {
  margin-bottom: 28px;
}

.preview-stage-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(48, 37, 121, 0.15);
  padding-bottom: 6px;
}

.preview-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-list li {
  font-size: 0.875rem;
  line-height: 1.55;
  padding-left: 16px;
  position: relative;
  color: var(--indigo);
}

.preview-list li::before {
  content: '\25A1';   /* □ empty square — matches the printable box in the PDF */
  position: absolute;
  left: 0;
  color: var(--indigo);
  font-size: 0.8em;
  line-height: 1.9;
}

/* ============================================================
   PDF RENDER — hidden A4 layout captured by html2canvas
   A4 @ 96 dpi = 794 × 1123 px per page.
   Must stay position:fixed off-screen (NOT display:none)
   so the browser renders fonts and images for html2canvas.
   ============================================================ */

#pdf-render {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px;
  background: #fffef3;
  font-family: 'Work Sans', system-ui, sans-serif;
  color: #302579;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
}

/* ---- COVER PAGE — exactly one A4 page tall ---- */

.pdfr-page {
  width: 794px;
  height: 1123px;
  display: flex;
  flex-direction: column;
  background: #fffef3;
  overflow: hidden;
}

.pdfr-measure { background: #fffef3; }

.pdfr-cover-header { flex-shrink: 0; }

.pdfr-page-body {
  flex: 1 1 auto;
  padding: 0 60px;
}

.pdfr-page-body--cont { padding-top: 44px; }

.pdfr-titleblock {
  padding: 30px 80px 18px;
  text-align: center;
}

.pdfr-band {
  height: 220px;           /* ~58 mm */
  background: #ffe21d;
  display: flex;
  align-items: center;
  justify-content: center; /* centre the logo group */
  padding: 0 60px;
  gap: 18px;
  flex-shrink: 0;
}

.pdfr-couple {
  width: 132px;
  height: 132px;
  object-fit: contain;
  flex-shrink: 0;
}

.pdfr-wordmark {
  height: 132px;
  width: auto;
  object-fit: contain;
  object-position: center;
}

.pdfr-coral-rule {
  width: 56px;
  height: 2px;
  background: #ff5757;
  margin: 0 auto 16px;
}

.pdfr-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  color: #302579;
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin-bottom: 8px;
}

.pdfr-ball-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 38px;
  font-weight: 600;
  color: #302579;
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.pdfr-date {
  font-size: 13px;
  font-weight: 400;
  color: #302579;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.pdfr-party {
  font-size: 11px;
  color: #ff5757;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pdfr-thin-rule {
  width: 80px;
  height: 1px;
  background: rgba(48, 37, 121, 0.2);
  margin: 24px 0 12px;
}

.pdfr-generated {
  font-size: 8px;
  color: #6e64b4;
  letter-spacing: 0.06em;
}

/* ---- FOOTER (cover page and end of content) ---- */

.pdfr-footer {
  padding: 0 60px 20px;
  flex-shrink: 0;
}

.pdfr-footer-rule {
  height: 1px;
  background: #ff5757;
  border: none;
  margin-bottom: 10px;
}

.pdfr-footer-row1 {
  display: flex;
  justify-content: space-between;
  font-size: 8.5px;
  color: #302579;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.pdfr-footer-row2 {
  text-align: center;
  font-size: 7.5px;
  color: #302579;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}

.pdfr-footer-disc {
  text-align: center;
  font-size: 7px;
  color: #6e64b4;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

/* ---- CONTENT SECTION (page 2 onwards) ---- */

.pdfr-content {
  width: 794px;
  padding: 28px 60px 0;
  background: #fffef3;
}

.pdfr-content-head {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 18px;
}

.pdfr-head-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #302579;
  margin-bottom: 4px;
}

.pdfr-head-rule {
  width: 100%;
  height: 1px;
  background: rgba(48, 37, 121, 0.2);
}

/* ---- STAGE BLOCKS ---- */

.pdfr-stage {
  margin-bottom: 18px;
}

.pdfr-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #302579;
  padding-bottom: 6px;
  margin-bottom: 9px;
}

.pdfr-stage-label {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #302579;
}

.pdfr-stage-date {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: #302579;
  white-space: nowrap;
  padding-left: 16px;
}

.pdfr-stage--priority .pdfr-stage-head { border-bottom-color: #ff5757; }
.pdfr-stage--priority .pdfr-stage-label,
.pdfr-stage--priority .pdfr-stage-date { color: #ff5757; }

/* ---- CHECKLIST ITEMS ---- */

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

.pdfr-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 2px;
  border-bottom: 1px solid rgba(48, 37, 121, 0.08);
}

.pdfr-cb {
  font-size: 11px;
  color: #302579;
  line-height: 1.5;
  flex-shrink: 0;
  width: 13px;
}

.pdfr-item-text {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 11.5px;
  color: #302579;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
