/* ============================================================
   SPARK Persona Quiz — quiz.css
   Palette and typography per Circle1_BrandBible_v1
   Coffee Brown #1A1410 · Warm Cream #F5EFE4 · Cream Deep #EEE5D5
   Rust Amber #A8512A · Gold #C4941A · Warm Grey #5A4A3B · Sand #7A6A5B
   Fraunces (display) · DM Sans (body)
   ============================================================ */

:root {
  --coffee: #1A1410;
  --cream: #F5EFE4;
  --cream-deep: #EEE5D5;
  --rust: #A8512A;
  --gold: #C4941A;
  --grey: #5A4A3B;
  --sand: #7A6A5B;
  --card: #FBF7EE;
  --line: rgba(90, 74, 59, 0.16);
  --f-display: 'Fraunces', serif;
  --f-body: 'DM Sans', sans-serif;
}

.quiz-body {
  margin: 0;
  background: var(--cream);
  color: var(--coffee);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
}

.quiz-root { max-width: 700px; margin: 0 auto; padding: 24px 20px 48px; }
.quiz-footer { text-align: center; padding: 16px 0 36px; font-size: 12px; color: var(--sand); font-family: var(--f-body); }
.quiz-noscript { text-align: center; padding: 48px 16px; font-size: 15px; color: var(--grey); }

/* ---------- shared ---------- */
.q-label {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--sand); font-weight: 700; margin-bottom: 10px;
}
.q-h1 {
  font-family: var(--f-display); font-weight: 500; font-style: italic;
  font-size: clamp(32px, 6vw, 48px); line-height: 1.15; margin: 0 0 14px;
}
.q-h2 {
  font-family: var(--f-display); font-weight: 500; font-style: italic;
  font-size: clamp(20px, 3.5vw, 26px); line-height: 1.45; margin: 0 0 22px;
}
.q-h3 { font-family: var(--f-display); font-weight: 500; font-style: italic; font-size: 22px; margin: 0 0 8px; }
.q-p { font-size: 15px; line-height: 1.7; color: var(--grey); }
.q-small { font-size: 12px; color: var(--sand); }
.q-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; margin-bottom: 22px;
}

/* Primary CTA — Rust Amber, one per view */
.q-btn-primary {
  font-family: var(--f-body); font-size: 15px; font-weight: 700;
  background: var(--rust); color: var(--cream);
  border: none; border-radius: 5px; padding: 15px 40px;
  letter-spacing: 0.4px; cursor: pointer; transition: background 0.15s;
}
.q-btn-primary:hover { background: #8E4322; }
.q-btn-secondary {
  font-family: var(--f-body); font-size: 13px; font-weight: 500;
  background: transparent; color: var(--grey);
  border: 1px solid var(--line); border-radius: 5px; padding: 11px 22px; cursor: pointer;
}
.q-btn-link { background: none; border: none; color: var(--rust); font-family: var(--f-body); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---------- intro & track toggle ---------- */
.q-intro { text-align: center; padding: 40px 0 8px; }
.q-persona-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 26px 0 34px; }
.q-chip { color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; letter-spacing: 0.3px; }
.q-track { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 460px; margin: 22px auto 6px; }
.q-track-btn {
  font-family: var(--f-body); font-size: 14px; font-weight: 500; line-height: 1.4;
  background: var(--card); color: var(--coffee);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 16px 12px; cursor: pointer; transition: border-color 0.15s;
}
.q-track-btn:hover { border-color: var(--gold); }
.q-track-btn small { display: block; font-size: 11px; color: var(--sand); font-weight: 400; margin-top: 4px; }

/* ---------- questions ---------- */
.q-progress { width: 100%; height: 4px; background: var(--cream-deep); border-radius: 2px; overflow: hidden; margin-bottom: 26px; }
.q-progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
.q-count { font-size: 11px; letter-spacing: 2px; color: var(--sand); font-weight: 500; margin-bottom: 12px; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-option {
  font-family: var(--f-body); font-size: 14px; line-height: 1.6; text-align: left;
  color: var(--coffee); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 8px;
  padding: 14px 18px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.q-option:hover { border-color: var(--gold); }
.q-option.selected { border-color: var(--gold); background: #F4EAD3; }

/* ---------- results ---------- */
.q-reveal-head { text-align: center; margin: 28px 0 32px; }
.q-badge {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-style: italic; font-weight: 600;
  font-size: 30px; color: #fff;
}
.q-frequency { font-size: 15px; font-weight: 700; margin: 4px 0 0; }
.q-secondary-line { font-size: 13px; color: var(--sand); margin-top: 6px; }
.q-bar-row { margin-bottom: 12px; }
.q-bar-head { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; }
.q-bar-track { width: 100%; height: 6px; background: var(--cream-deep); border-radius: 3px; overflow: hidden; }
.q-bar-fill { height: 100%; border-radius: 3px; transition: width 0.9s ease; }

/* email gate */
.q-gate { text-align: center; background: var(--cream-deep); border: 1px solid var(--line); }
.q-gate-form { display: flex; gap: 8px; max-width: 440px; margin: 16px auto 0; }
.q-gate-form input {
  flex: 1; font-family: var(--f-body); font-size: 14px; padding: 13px 14px;
  border-radius: 5px; border: 1px solid var(--line); background: #fff; color: var(--coffee); outline: none;
}
.q-gate-form input:focus { border-color: var(--gold); }
.q-error { font-size: 12px; color: var(--rust); margin-top: 8px; }

/* full report */
.q-callout { background: rgba(196, 148, 26, 0.06); border-left: 3px solid var(--gold); border-radius: 6px; padding: 16px 18px; margin: 14px 0; }
.q-callout-label { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--sand); margin: 0 0 6px; }
.q-strike { font-family: var(--f-display); font-style: italic; font-size: 16px; line-height: 1.6; margin: 0 0 6px; }
.q-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.q-list-item { font-size: 13px; line-height: 1.55; margin-bottom: 6px; color: var(--coffee); }
.q-tool { border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 10px; overflow: hidden; }
.q-tool-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; cursor: pointer; font-weight: 700; font-size: 14px; }
.q-tool-body { padding: 0 16px 14px; font-size: 13px; line-height: 1.6; color: var(--grey); }
.q-tool-lock { font-size: 12px; color: var(--gold); font-weight: 500; border: 1px dashed rgba(196, 148, 26, 0.4); border-radius: 6px; padding: 8px 12px; margin-top: 10px; background: rgba(196, 148, 26, 0.05); }
.q-excerpt { font-family: var(--f-display); font-style: italic; font-size: 16px; line-height: 1.7; color: var(--coffee); }
.q-step-num {
  background: var(--coffee); color: var(--cream); width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-right: 8px; flex-shrink: 0;
}
.q-step { margin-bottom: 14px; }
.q-step-head { display: flex; align-items: center; gap: 4px; margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.q-step-text { font-size: 13px; line-height: 1.6; color: var(--grey); margin-left: 32px; }
.q-type-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; }
.q-type-badge { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 12px; flex-shrink: 0; }
.q-actions-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 8px; }

/* first-access capture (dark card) */
.q-dark { background: var(--coffee); color: var(--cream); border: none; }
.q-dark .q-label { color: var(--gold); }
.q-dark .q-p { color: #CBBFAA; }
.q-dark input { border: 1px solid rgba(245, 239, 228, 0.2); background: rgba(245, 239, 228, 0.07); color: var(--cream); }
.q-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.q-choice {
  font-family: var(--f-body); font-size: 13px; font-weight: 500; line-height: 1.45;
  background: rgba(245, 239, 228, 0.05); color: #CBBFAA;
  border: 1.5px solid rgba(245, 239, 228, 0.12); border-radius: 8px; padding: 14px 12px; cursor: pointer;
}
.q-choice.selected { border-color: var(--gold); color: var(--gold); background: rgba(196, 148, 26, 0.12); }

/* ---------- mobile ---------- */
@media (max-width: 560px) {
  .q-two-col, .q-track, .q-choice-grid { grid-template-columns: 1fr; }
  .q-gate-form { flex-direction: column; }
  .q-card { padding: 20px 16px; }
}

/* ---------- print / save as PDF ---------- */
@media print {
  .quiz-body { background: #fff; }
  .q-gate, .q-dark, .q-actions-row, .quiz-footer, .q-btn-primary, .q-btn-secondary, .q-btn-link, .q-tool-chevron { display: none !important; }
  .q-card { border: 1px solid #ccc; break-inside: avoid; }
  .q-tool-body { display: block !important; }
  .quiz-root { max-width: 100%; padding: 0; }
  .q-print-only { display: block !important; font-size: 11px; color: #7A6A5B; text-align: center; margin-top: 20px; }
}
.q-print-only { display: none; }
