.nav-link {
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  color: rgb(23 33 27 / 0.72);
}

.nav-link:hover {
  background: rgb(100 112 68 / 0.1);
  color: #17211b;
}

/* Domain move banner (dismissible) */
.site-banner {
  background: #17211b;
  color: #fbf7ee;
  font-size: 0.88rem;
}

.site-banner-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-banner a {
  color: #f4d37b;
  font-weight: 800;
  text-decoration: underline;
}

.site-banner code {
  background: rgb(255 255 255 / 0.1);
  padding: 0 0.3rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

.site-banner-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  opacity: 0.7;
}

.site-banner-close:hover {
  background: rgb(255 255 255 / 0.1);
  opacity: 1;
}

/* Sticky footer — body flex keeps footer at viewport bottom if content short */
html, body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
  /* In a flex column, mx-auto + max-width would collapse main to content
     width. Force full cross-axis width so max-w-6xl/md still center inside. */
  width: 100%;
}

.site-footer {
  flex-shrink: 0;
  margin-top: 2rem;
  padding: 1rem;
  border-top: 1px solid rgb(100 112 68 / 0.15);
  background: rgb(251 247 238 / 0.6);
  color: rgb(23 33 27 / 0.62);
  font-size: 0.86rem;
}

.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0 1rem;
}

.site-footer-copy {
  margin: 0;
}

.site-footer-sep {
  margin: 0 0.45rem;
  color: rgb(23 33 27 / 0.32);
}

.site-footer a {
  color: #17211b;
  font-weight: 700;
}

.site-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(100 112 68 / 0.32);
  background: white;
  color: #17211b;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.footer-button:hover {
  background: rgb(100 112 68 / 0.1);
  border-color: #b88b3e;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.primary-button {
  background: #17211b;
  color: white;
}

.secondary-button {
  border: 1px solid rgb(100 112 68 / 0.28);
  color: #17211b;
}

.field-label {
  display: grid;
  gap: 0.45rem;
  color: rgb(23 33 27 / 0.72);
  font-size: 0.86rem;
  font-weight: 700;
}

.field-input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgb(100 112 68 / 0.22);
  background: rgb(251 247 238 / 0.75);
  color: #17211b;
  padding: 0.8rem 0.95rem;
  outline: none;
}

.field-input:focus {
  border-color: #b88b3e;
  box-shadow: 0 0 0 3px rgb(184 139 62 / 0.16);
}

.form-section {
  border-top: 1px solid rgb(100 112 68 / 0.14);
  padding-top: 1.5rem;
}

.form-section h2,
.wizard-step h2,
.profile-panel h2 {
  margin-bottom: 1rem;
  font-size: 1.18rem;
  font-weight: 800;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.field-grid {
  display: grid;
  gap: 0.9rem;
}

.compact-field-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.repeater-row {
  position: relative;
  display: grid;
  gap: 0.75rem;
  border-radius: 1.25rem;
  border: 1px solid rgb(100 112 68 / 0.14);
  background: rgb(251 247 238 / 0.55);
  padding: 1rem;
}

[data-kind="relationship-person"] .repeater-row,
[data-kind="yahrzeit"] .repeater-row {
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  [data-kind="yahrzeit"] .repeater-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

[data-kind="child"] .repeater-row {
  grid-template-columns: 1fr;
}

.row-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed rgb(100 112 68 / 0.18);
}

.drag-handle {
  cursor: grab;
  user-select: none;
  color: rgb(23 33 27 / 0.45);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.15em;
  padding: 0 0.4rem;
  border-radius: 0.5rem;
}

.drag-handle:hover {
  background: rgb(100 112 68 / 0.1);
  color: #17211b;
}

.row-number {
  font-weight: 800;
  font-size: 0.82rem;
  color: rgb(23 33 27 / 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.row-preview {
  flex: 1;
  color: rgb(23 33 27 / 0.55);
  font-size: 0.95rem;
}

.row-header .remove-row {
  margin-left: auto;
}

.spouse-block {
  margin-top: 0.25rem;
}

.spouse-fields {
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.62);
  padding: 1rem;
}

.subsection-label {
  margin-bottom: 0.85rem;
  color: rgb(23 33 27 / 0.58);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sortable-ghost {
  opacity: 0.35;
}

.sortable-chosen {
  box-shadow: 0 0 0 2px rgb(184 139 62 / 0.35);
}

.remove-row {
  justify-self: start;
  color: #9f392f;
  font-size: 0.8rem;
  font-weight: 800;
}

.profile-panel {
  display: grid;
  gap: 0.75rem;
  border-radius: 1.5rem;
  background: white;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgb(23 33 27 / 0.06);
  border: 1px solid rgb(100 112 68 / 0.1);
}

.profile-panel dl {
  display: grid;
  gap: 0.6rem;
}

.profile-panel dt {
  color: rgb(23 33 27 / 0.52);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-panel dd {
  margin: 0;
  font-weight: 650;
}

.wizard-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wizard-stepper li {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgb(100 112 68 / 0.18);
  background: rgb(251 247 238 / 0.5);
  color: rgb(23 33 27 / 0.6);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.wizard-stepper li:focus-visible {
  outline: 3px solid rgb(184 139 62 / 0.28);
  outline-offset: 2px;
}

.wizard-stepper li:hover {
  border-color: #b88b3e;
  color: #17211b;
}

.wizard-stepper .step-current:hover {
  background: #17211b;
  color: white;
  border-color: #17211b;
}

.wizard-stepper .step-current:hover .step-status {
  color: rgb(255 255 255 / 0.78);
}

.wizard-stepper .step-saved:hover,
.wizard-stepper .step-done:hover {
  color: #17211b;
}

.wizard-stepper .step-dot {
  display: inline-flex;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: rgb(100 112 68 / 0.15);
  color: inherit;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.wizard-stepper .step-text {
  min-width: 0;
  display: grid;
  gap: 0.05rem;
}

.wizard-stepper .step-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-stepper .step-status {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(23 33 27 / 0.45);
}

.wizard-stepper .step-current {
  background: #17211b;
  color: white;
  border-color: #17211b;
}

.wizard-stepper .step-current .step-dot {
  background: #b88b3e;
  color: white;
}

.wizard-stepper .step-current .step-status {
  color: rgb(255 255 255 / 0.78);
}

.wizard-stepper .step-done {
  background: rgb(100 112 68 / 0.16);
  color: rgb(23 33 27 / 0.9);
  border-color: rgb(100 112 68 / 0.3);
}

.wizard-stepper .step-done .step-dot {
  background: #647044;
  color: white;
}

.wizard-stepper .step-saved {
  background: rgb(16 122 79 / 0.1);
  border-color: rgb(16 122 79 / 0.28);
}

.wizard-stepper .step-saved .step-dot {
  background: #107a4f;
}

.wizard-stepper .step-saved .step-status {
  color: #107a4f;
}

/* Landing card deck — 3D scroll-cycled stack of real print cards */
.card-deck-wrap {
  position: relative;
  perspective: 3200px;
  width: 100%;
  max-width: 540px;
  height: 540px;
  margin: 0 auto;
  padding-top: 80px;
}

.card-deck {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.card-deck-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6in;
  height: 4in;
  margin-left: -3in;
  margin-top: -2in;
  transform-origin: center center;
  transition:
    transform 0.7s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.7s cubic-bezier(0.65, 0, 0.35, 1),
    filter 0.7s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform, opacity;
  box-shadow:
    0 30px 60px rgb(23 33 27 / 0.18),
    0 8px 18px rgb(23 33 27 / 0.10);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  cursor: grab;
  user-select: none;
}

.card-deck-slot .print-card {
  margin: 0;
  border: 0;
  width: 6in;
  height: 4in;
}

@media (max-width: 1100px) {
  .card-deck-wrap {
    height: 360px;
    max-width: 460px;
    perspective: 1500px;
  }
  .card-deck-slot { transform-origin: center center; }
}

@media (max-width: 720px) {
  .card-deck-wrap {
    height: 280px;
    max-width: 360px;
  }
}

.card-deck-hint {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(23 33 27 / 0.45);
}

.card-preview {
  min-height: 32rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at top left, rgb(184 139 62 / 0.22), transparent 34%),
    linear-gradient(145deg, #fffdf7, #efe5d2);
  box-shadow: 0 20px 70px rgb(23 33 27 / 0.14);
  padding: 2rem;
  border: 1px solid rgb(100 112 68 / 0.14);
}
