@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* Same palette and type as the Spiritual Gifts Assessment, so the two tools feel like a set. */
body.moments-page {
  --ink: #1a1612;
  --ash: #2e2923;
  --bone: #f2ede6;
  --parchment: #e8e0d4;
  --ember: #c4501a;
  --gold: #b8932a;
  --steel: #6b7280;
  --white: #fafaf8;
  background: var(--bone);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

.mm-shell { min-height: calc(100vh - 72px); }
.mm-screen { display: none; }
.mm-screen.is-active { display: block; }
.mm-narrow { max-width: 720px; margin: 0 auto; padding: 3.5rem 1.25rem 4rem; }

.mm-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- cover ---------- */
.mm-cover {
  min-height: calc(100vh - 72px);
  background: var(--ash);
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.mm-cover.is-active { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mm-cover::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.03) 39px, rgba(255,255,255,0.03) 40px);
  pointer-events: none;
}
.mm-cover > * { position: relative; }
.mm-brand {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 2.5rem;
}
.mm-cover-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  max-width: 820px;
  margin: 0;
}
.mm-cover-title em { font-style: normal; color: var(--ember); }
.mm-cover-title:focus { outline: none; }
.mm-divider { width: 48px; height: 2px; background: var(--ember); margin: 2rem auto; }
.mm-cover-sub {
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--parchment);
  max-width: 540px;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}
.mm-btn-start {
  background: var(--ember);
  color: var(--white);
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.mm-btn-start:hover { background: #d4601f; transform: translateY(-1px); }
.mm-cover-note {
  font-size: 0.8rem;
  color: #a7a29b;
  margin-top: 1.5rem;
  font-family: 'Space Mono', monospace;
}
.mm-resume { color: var(--parchment); font-size: 0.95rem; margin-top: 1.25rem; }
.mm-link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--gold); font: inherit; text-decoration: underline;
}

/* ---------- shared type ---------- */
.mm-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ember);
  display: block;
  margin-bottom: 1rem;
}
.mm-label--flat { margin-bottom: 0.35rem; }
.mm-h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}
.mm-h2:focus { outline: none; }
.mm-h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; line-height: 1.25; margin: 0 0 0.75rem; }
.mm-body p, .mm-body-text { color: var(--ash); line-height: 1.8; margin: 0 0 1rem; }

.mm-scale-card {
  background: var(--parchment);
  border-left: 3px solid var(--ember);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.mm-scale-row { display: flex; gap: 1rem; margin-bottom: 0.5rem; color: var(--ash); }
.mm-scale-row:last-child { margin-bottom: 0; }
.mm-scale-num { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--ember); min-width: 20px; }

.mm-privacy {
  background: var(--white);
  border: 1px solid var(--parchment);
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  color: var(--ash);
  line-height: 1.7;
}

/* ---------- buttons ---------- */
.mm-nav { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 2.25rem; }
.mm-nav--wrap { flex-wrap: wrap; justify-content: flex-start; }
.mm-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95rem 1.4rem;
  cursor: pointer;
  border: 1px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}
.mm-btn-primary { background: var(--ink); color: var(--white); }
.mm-btn-primary:hover { background: var(--ember); border-color: var(--ember); }
.mm-btn-secondary { background: transparent; color: var(--ink); }
.mm-btn-secondary:hover { background: var(--parchment); }
.mm-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mm-btn:focus-visible, .mm-btn-start:focus-visible, .mm-link-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- quiz ---------- */
#mmQuiz { padding-top: 1.5rem; }
.mm-progress {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bone);
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--parchment);
}
.mm-progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.mm-count { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--steel); }
.mm-progress-track { height: 4px; background: var(--parchment); margin-top: 0.4rem; }
.mm-progress-fill { height: 100%; width: 0; background: var(--ember); transition: width 0.3s ease; }
.mm-verse { font-style: italic; color: var(--steel); margin: -0.25rem 0 1rem; }

.mm-q { border: 0; margin: 0; padding: 1.4rem 0; border-bottom: 1px solid var(--parchment); min-width: 0; }
.mm-q:last-child { border-bottom: 0; }
.mm-q legend { font-weight: 500; font-size: 1.02rem; line-height: 1.55; padding: 0; color: var(--ink); }
.mm-q-num { font-family: 'Space Mono', monospace; color: var(--ember); font-size: 0.85rem; margin-right: 0.15rem; }
.mm-q.is-missing legend { color: var(--ember); }
.mm-q.is-missing .mm-choice { border-color: var(--ember); }

.mm-choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; margin-top: 0.6rem; max-width: 340px; }
.mm-choice {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 48px;
  border: 1px solid #b9b0a3;
  background: var(--white);
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}
.mm-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mm-choice:hover { border-color: var(--ink); }
.mm-choice:has(input:checked) { background: var(--ink); color: var(--white); border-color: var(--ink); }
.mm-choice:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.mm-ends {
  display: flex; justify-content: space-between;
  max-width: 340px; margin-top: 0.35rem;
  font-size: 0.72rem; color: var(--steel);
}
.mm-error { color: var(--ember); font-weight: 500; min-height: 1.5em; margin: 1rem 0 0; }
.mm-error:focus { outline: none; }

/* ---------- results ---------- */
.mm-print-date { display: none; }
.mm-scores { margin: 1.75rem 0 2rem; }
.mm-score { margin-bottom: 1.1rem; }
.mm-score-head { margin-bottom: 0.35rem; }
.mm-score-head strong { display: block; }
.mm-score-head span { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--steel); }
.mm-bar { height: 10px; background: var(--parchment); }
.mm-fill { height: 100%; background: var(--steel); }
.mm-score.is-top .mm-fill { background: var(--ember); }

.mm-focus { background: var(--ash); color: var(--parchment); padding: 1.75rem 1.5rem; margin-bottom: 2rem; }
.mm-focus .mm-label { color: var(--gold); }
.mm-focus .mm-h3 { color: var(--white); }
.mm-focus p { line-height: 1.75; }
.mm-focus-item { border-left: 2px solid var(--ember); padding-left: 1rem; margin: 1.25rem 0; }
.mm-focus-item h4 { color: var(--white); font-size: 1.05rem; margin: 0 0 0.35rem; }
.mm-focus-item p { margin: 0 0 0.5rem; }
.mm-focus-verse strong, .mm-reflect strong { color: var(--white); }
.mm-reflect { margin: 1.25rem 0 0; }

.mm-commit p { color: var(--ash); }
.mm-commit-label { display: block; font-weight: 600; margin: 1rem 0 0.5rem; }
.mm-commit textarea {
  display: block; width: 100%;
  background: var(--white); color: var(--ink);
  border: 1px solid #b9b0a3;
  padding: 0.85rem 1rem;
  font: inherit; line-height: 1.6;
  resize: vertical;
}
.mm-commit textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--ink); }

.mm-note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--parchment); font-size: 0.88rem; color: var(--steel); }
.mm-note p { margin: 0 0 0.6rem; }
.mm-note a { color: var(--ember); }
.mm-scripture-note { text-align: center; font-size: 0.8rem; color: var(--steel); padding: 0 1.25rem 2.5rem; margin: 0; }
.mm-cover.is-active ~ .mm-scripture-note { display: none; }

@media (max-width: 520px) {
  .mm-narrow { padding: 2.5rem 1rem 3rem; }
  .mm-choices, .mm-ends { max-width: none; }
  .mm-nav .mm-btn { flex: 1; padding: 0.9rem 0.75rem; }
  .mm-nav--wrap .mm-btn { flex: 1 1 100%; }
}

/* ---------- strength + email plan ---------- */
.mm-strength { border: 1px solid var(--parchment); border-left: 3px solid var(--gold); background: var(--white); padding: 1.25rem 1.5rem; margin: -0.75rem 0 2rem; }
.mm-strength .mm-label { color: var(--gold); }
.mm-strength .mm-h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.mm-strength p { margin: 0; color: var(--ash); }

.mm-plan { background: var(--parchment); border-top: 3px solid var(--ember); padding: 1.6rem 1.5rem 1.5rem; margin: 2.25rem 0 0; }
.mm-plan > p { color: var(--ash); margin: 0 0 1rem; }
.mm-plan-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.75rem; }
.mm-field { margin-bottom: 0.85rem; }
.mm-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.mm-optional { font-weight: 400; color: var(--steel); }
.mm-field input, .mm-field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #b9b0a3; padding: 0.7rem 0.8rem; border-radius: 0;
}
.mm-field input:focus, .mm-field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--ink); }
.mm-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; color: var(--ash); margin: 0.25rem 0 1.1rem; cursor: pointer; }
.mm-check input { margin-top: 0.3rem; width: 18px; height: 18px; accent-color: var(--ember); flex: none; }
.mm-plan-fine { font-size: 0.8rem; color: var(--steel); margin: 0.85rem 0 0; line-height: 1.6; }
.mm-plan-msg { margin: 0.75rem 0 0; font-weight: 500; }
.mm-plan-msg:empty { display: none; }
.mm-plan-msg.is-error { color: var(--ember); }
.mm-plan-msg.is-ok { color: #2d6a4f; background: var(--white); padding: 0.9rem 1rem; border-left: 3px solid #2d6a4f; }
.mm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) {
  .mm-plan { padding: 1.4rem 1rem; }
  .mm-plan-row { grid-template-columns: 1fr; gap: 0; }
  #mmPlanBtn { width: 100%; }
}

/* ---------- print: results only ---------- */
@media print {
  #site-header, header, footer, .navbar, .mm-nav, .mm-print-hide, .mm-scripture-note { display: none !important; }
  body.moments-page { background: #fff; color: #000; }
  .mm-narrow { padding: 0; max-width: none; }
  .mm-print-date { display: block; color: #555; font-size: 0.85rem; }
  .mm-focus { background: #fff; color: #000; border: 1px solid #999; }
  .mm-focus .mm-h3, .mm-focus-item h4, .mm-focus-verse strong, .mm-reflect strong, .mm-focus .mm-label { color: #000; }
  .mm-bar { border: 1px solid #999; background: #fff; }
  .mm-fill, .mm-score.is-top .mm-fill { background: #777; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mm-commit textarea { border: 1px solid #999; }
  .mm-score, .mm-focus-item, .mm-strength { break-inside: avoid; }
  .mm-strength { margin-top: 0; }
}
