/* diagnostic-quiz.css — styles for the interactive 17-point venue diagnostic quiz + results pages. */
:root {
  --gold: #c9a96e;
  --sage: #7a8c6e;
  --text: #2a2218;
  --text-muted: #5a4a30;
  --text-light: #8a7a5e;
  --bg-warm: #faf9f7;
  --ivory-light: #f5f0e8;
  --border-soft: #e8dcc8;
  --red-leak: #e05252;
  --amber-leak: #d4a017;
  --sage-green: #5a8a60;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Quiz: Progress bar ──────────────────────────────────────────────────────── */
.dq-progress-wrap {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--border-soft);
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.dq-brand { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.dq-progress-bar-track { flex: 1; height: 4px; background: var(--border-soft); border-radius: 2px; overflow: hidden; }
.dq-progress-bar-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.3s ease; }
.dq-progress-label { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; }

/* ── Screen system ───────────────────────────────────────────────────────────── */
.dq-screen { display: none; min-height: calc(100vh - 56px); }
.dq-screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; }

/* ── Intro ───────────────────────────────────────────────────────────────────── */
.dq-intro-inner { max-width: 620px; text-align: center; }
.dq-eyebrow { font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); margin-bottom: 1rem; display: block; }
.dq-headline { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; color: var(--text); line-height: 1.2; margin-bottom: 1.25rem; }
.dq-headline em { color: var(--gold); font-style: italic; }
.dq-sub { font-size: 1rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 0.75rem; }
.dq-meta { font-size: 0.8rem; color: var(--text-light); margin-bottom: 2.5rem; }
.dq-sections-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 2.5rem; text-align: center; }
.dq-sec-pill { background: var(--ivory-light); border: 1px solid var(--border-soft); border-radius: 4px; padding: 0.625rem; }
.dq-sec-pill-name { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 600; color: var(--text); display: block; }
.dq-sec-pill-num { font-size: 0.7rem; color: var(--text-light); }

/* ── Gate ────────────────────────────────────────────────────────────────────── */
.dq-gate-inner { max-width: 520px; width: 100%; }
.dq-gate-title { font-family: var(--font-serif); font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 600; color: var(--text); line-height: 1.25; margin-bottom: 0.75rem; }
.dq-gate-sub { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 2rem; }
.dq-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.dq-label { font-size: 0.8rem; font-weight: 600; color: var(--text); letter-spacing: 0.04em; }
.dq-input { border: 1px solid var(--border-soft); border-radius: 4px; padding: 0.75rem 1rem; font-size: 0.95rem; font-family: var(--font-sans); color: var(--text); background: #fff; width: 100%; transition: border-color 0.2s; }
.dq-input:focus { outline: none; border-color: var(--gold); }
.dq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dq-btn-gold { width: 100%; background: var(--gold); color: #fff; border: none; border-radius: 4px; padding: 1rem 2rem; font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em; cursor: pointer; transition: opacity 0.2s; margin-top: 0.5rem; }
.dq-btn-gold:hover { opacity: 0.9; }
.dq-btn-gold:disabled { opacity: 0.6; cursor: not-allowed; }
.dq-gate-note { font-size: 0.75rem; color: var(--text-light); text-align: center; margin-top: 1rem; }

/* ── Question screens ────────────────────────────────────────────────────────── */
.dq-q-inner { max-width: 620px; width: 100%; }
.dq-q-section { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); margin-bottom: 0.5rem; }
.dq-q-num { font-family: var(--font-serif); font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.5rem; }
.dq-q-text { font-family: var(--font-serif); font-size: clamp(1.3rem, 3.5vw, 1.75rem); font-weight: 600; color: var(--text); line-height: 1.35; margin-bottom: 0.875rem; }
.dq-q-why { font-size: 0.85rem; color: var(--text-light); line-height: 1.65; border-left: 2px solid var(--border-soft); padding-left: 0.875rem; margin-bottom: 2rem; font-style: italic; }
.dq-options { display: flex; flex-direction: column; gap: 0.875rem; margin-bottom: 2rem; }
.dq-option { position: relative; }
.dq-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.dq-option-label { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1.5px solid var(--border-soft); border-radius: 6px; cursor: pointer; transition: border-color 0.15s, background 0.15s; background: #fff; }
.dq-option input:checked + .dq-option-label { border-color: var(--gold); background: #fdf8f0; }
.dq-option-label:hover { border-color: var(--gold); background: #fdf8f0; }
.dq-option-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-soft); flex-shrink: 0; transition: border-color 0.15s, background 0.15s; display: flex; align-items: center; justify-content: center; }
.dq-option input:checked + .dq-option-label .dq-option-dot { border-color: var(--gold); background: var(--gold); }
.dq-option-dot-inner { width: 8px; height: 8px; border-radius: 50%; background: #fff; display: none; }
.dq-option input:checked + .dq-option-label .dq-option-dot-inner { display: block; }
.dq-option-text { font-size: 0.95rem; color: var(--text); font-weight: 500; }
.dq-option-sub { font-size: 0.78rem; color: var(--text-light); }
.dq-q-nav { display: flex; justify-content: space-between; align-items: center; }
.dq-btn-back { background: none; border: 1px solid var(--border-soft); color: var(--text-muted); border-radius: 4px; padding: 0.75rem 1.5rem; font-size: 0.85rem; cursor: pointer; font-family: var(--font-sans); }
.dq-btn-back:hover { border-color: var(--text-muted); }
.dq-btn-next { background: var(--gold); color: #fff; border: none; border-radius: 4px; padding: 0.875rem 2rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: var(--font-sans); transition: opacity 0.15s; }
.dq-btn-next:hover { opacity: 0.9; }
.dq-btn-next:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Submitting ──────────────────────────────────────────────────────────────── */
.dq-submitting-inner { text-align: center; }
.dq-spinner { width: 40px; height: 40px; border: 3px solid var(--border-soft); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.dq-submitting-title { font-family: var(--font-serif); font-size: 1.5rem; color: var(--text); margin-bottom: 0.5rem; }
.dq-submitting-sub { font-size: 0.9rem; color: var(--text-light); }

/* ── Results page ────────────────────────────────────────────────────────────── */
.dr-header { background: #fff; border-bottom: 1px solid var(--border-soft); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.dr-brand { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--text); text-decoration: none; }
.dr-header-cta { background: var(--gold); color: #fff; text-decoration: none; padding: 0.6rem 1.25rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.dr-page { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.dr-error { text-align: center; padding: 4rem 2rem; }
.dr-error h1 { font-family: var(--font-serif); font-size: 2rem; color: var(--text); margin-bottom: 1rem; }
.dr-error p { color: var(--text-muted); margin-bottom: 2rem; }
.dr-name-line { font-family: var(--font-sans); font-size: 0.8rem; color: var(--text-light); margin-bottom: 1.5rem; }
.dr-score-hero { text-align: center; padding: 2.5rem 2rem; border-radius: 8px; margin-bottom: 2rem; }
.dr-score-hero.red-bg { background: #fdf0f0; border: 1px solid #f5c6c6; }
.dr-score-hero.amber-bg { background: #fdf7e8; border: 1px solid #f0dba0; }
.dr-score-hero.sage-bg { background: #f0f5f0; border: 1px solid #b8d4b8; }
.dr-score-eyebrow { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.75rem; display: block; }
.red-bg .dr-score-eyebrow { color: var(--red-leak); }
.amber-bg .dr-score-eyebrow { color: #a07810; }
.sage-bg .dr-score-eyebrow { color: var(--sage-green); }
.dr-score-num { font-family: var(--font-serif); font-size: 5rem; font-weight: 700; line-height: 1; margin-bottom: 0.25rem; }
.dr-score-denom { font-family: var(--font-serif); font-size: 2rem; opacity: 0.5; }
.red-bg .dr-score-num { color: var(--red-leak); }
.amber-bg .dr-score-num { color: var(--amber-leak); }
.sage-bg .dr-score-num { color: var(--sage-green); }
.dr-score-label { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.red-bg .dr-score-label { color: var(--red-leak); }
.amber-bg .dr-score-label { color: #a07810; }
.sage-bg .dr-score-label { color: var(--sage-green); }
.dr-score-sub { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; max-width: 480px; margin: 0 auto; }
.dr-section { margin-bottom: 2.5rem; }
.dr-section-title { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; color: var(--text); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-soft); }
.dr-bars { display: flex; flex-direction: column; gap: 0.875rem; }
.dr-bar-row { display: flex; align-items: center; gap: 1rem; }
.dr-bar-label { font-size: 0.85rem; color: var(--text-muted); min-width: 90px; }
.dr-bar-track { flex: 1; height: 8px; background: var(--border-soft); border-radius: 4px; overflow: hidden; }
.dr-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.dr-bar-fill.red { background: var(--red-leak); }
.dr-bar-fill.amber { background: var(--amber-leak); }
.dr-bar-fill.sage { background: var(--sage-green); }
.dr-bar-score { font-size: 0.8rem; font-weight: 600; min-width: 50px; text-align: right; }
.dr-bar-score.red { color: var(--red-leak); }
.dr-bar-score.amber { color: #a07810; }
.dr-bar-score.sage { color: var(--sage-green); }
.dr-color-key { display: flex; gap: 1.5rem; margin-top: 1rem; flex-wrap: wrap; }
.dr-key-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-light); }
.dr-key-dot { width: 10px; height: 10px; border-radius: 50%; }
.dr-leak-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 6px; padding: 1.5rem; margin-bottom: 1rem; }
.dr-leak-num { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 0.25rem; }
.dr-leak-label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light); margin-bottom: 0.5rem; }
.dr-leak-name { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 0.875rem; }
.dr-leak-what { font-size: 0.9rem; color: var(--text-muted); line-height: 1.75; }
.dr-cta-box { background: var(--text); color: #fff; border-radius: 8px; padding: 2.5rem 2rem; text-align: center; margin-top: 3rem; }
.dr-cta-eyebrow { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.75rem; display: block; }
.dr-cta-title { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 600; color: #fff; line-height: 1.25; margin-bottom: 1rem; }
.dr-cta-sub { font-size: 0.9rem; color: rgba(255,255,255,0.75); line-height: 1.7; max-width: 480px; margin: 0 auto 1.75rem; }
.dr-cta-btn { display: inline-block; background: var(--gold); color: #fff; text-decoration: none; padding: 1rem 2.5rem; border-radius: 4px; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 1rem; }
.dr-cta-btn:hover { opacity: 0.9; }
.dr-cta-secondary { display: block; color: rgba(255,255,255,0.6); font-size: 0.8rem; text-decoration: none; margin-top: 0.75rem; }
.dr-cta-secondary:hover { color: rgba(255,255,255,0.9); }
.dr-answers-toggle { background: none; border: 1px solid var(--border-soft); color: var(--text-muted); padding: 0.75rem 1.5rem; border-radius: 4px; font-size: 0.85rem; cursor: pointer; margin-top: 2.5rem; font-family: var(--font-sans); width: 100%; }
.dr-answers-list { display: none; margin-top: 1.5rem; }
.dr-answers-list.open { display: block; }
.dr-answer-row { border-bottom: 1px solid var(--border-soft); padding: 0.875rem 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dr-answer-q { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.dr-answer-v { font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 3px; white-space: nowrap; }
.dr-answer-v.yes { background: #e8f5e8; color: #3a6e3a; }
.dr-answer-v.sometimes { background: #fdf7e8; color: #a07810; }
.dr-answer-v.no { background: #fdf0f0; color: #a03030; }

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* 3 equal pillars — keep 3-col on mobile since there are exactly 3 */
  .dq-sections-preview { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .dq-sec-pill { padding: 0.5rem 0.25rem; }
  .dq-sec-pill-name { font-size: 0.85rem; }
  .dq-row { grid-template-columns: 1fr; }
  .dq-screen.active { padding: 2rem 1rem; justify-content: flex-start; padding-top: 2.5rem; }
  /* Full-width nav buttons for thumb reach */
  .dq-q-nav { flex-direction: column; gap: 0.75rem; }
  .dq-btn-back, .dq-btn-next { width: 100%; text-align: center; min-height: 48px; }
  .dq-btn-gold { min-height: 48px; font-size: 1rem; }
  .dq-input { font-size: 1rem; } /* ≥16px prevents iOS auto-zoom */
  .dr-header-cta { display: none; }
  .dr-bar-row { flex-wrap: wrap; }
  .dr-bar-label { min-width: 70px; font-size: 0.8rem; }
  .dr-cta-btn { display: block; width: 100%; text-align: center; }
}
