/* ── Questionnaire ──────────────────────────────────────── */

.quest {
  padding: 2rem 0 4rem;
}

.quest__header {
  text-align: center;
  margin-bottom: 2rem;
}

.quest__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.5rem;
}

.quest__intro {
  font-size: 1rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Progress */
.quest__progress {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.quest__progress-bar {
  height: 100%;
  background: #E8862A;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quest__progress-label {
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Steps */
.quest__step {
  max-width: 720px;
  margin: 0 auto;
}

.quest__step-header {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.quest__step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 0.25rem;
}

.quest__step-desc {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

/* Fields (intro step) */
.quest__field {
  margin-bottom: 1rem;
}

.quest__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.quest__input {
  width: 100%;
  max-width: 400px;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1a1a2e;
  box-sizing: border-box;
}

.quest__input:focus {
  outline: none;
  border-color: #E8862A;
  box-shadow: 0 0 0 3px rgba(232, 134, 42, 0.15);
}

/* Questions */
.quest__question {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
}

.quest__question:last-child {
  border-bottom: none;
}

.quest__question-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a2e;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

/* Likert scale */
.quest__likert {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.quest__likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
  cursor: pointer;
  padding: 0.5rem 0.25rem;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.quest__likert-option:hover {
  background: #f9fafb;
}

.quest__likert-option input[type="radio"] {
  display: none;
}

.quest__likert-option input[type="radio"]:checked ~ .quest__likert-circle {
  background: #E8862A;
  color: #fff;
  border-color: #E8862A;
}

.quest__likert-option input[type="radio"]:checked ~ .quest__likert-anchor {
  color: #E8862A;
  font-weight: 600;
}

.quest__likert-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
  transition: all 0.2s;
}

.quest__likert-anchor {
  font-size: 0.7rem;
  color: #9ca3af;
  line-height: 1.2;
  transition: color 0.2s;
}

/* Navigation */
.quest__nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.quest__submit {
  min-width: 160px;
}

/* ── Results ───────────────────────────────────────────── */

.quest__results {
  max-width: 800px;
  margin: 0 auto;
}

.quest__results-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  text-align: center;
  margin: 0 0 1.5rem;
}

.quest__results-overall {
  text-align: center;
  margin-bottom: 2rem;
}

.quest__results-score {
  font-size: 3rem;
  font-weight: 800;
  color: #E8862A;
  line-height: 1;
}

.quest__results-maturity {
  font-size: 1rem;
  color: #6b7280;
  margin: 0.25rem 0 0;
  text-transform: capitalize;
}

/* Category bars */
.quest__results-grid {
  margin-bottom: 2rem;
}

.quest__results-category {
  margin-bottom: 0.75rem;
}

.quest__results-cat-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.quest__results-cat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.quest__results-cat-score {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a2e;
}

.quest__results-cat-bar {
  height: 8px;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Chart */
.quest__results-chart-wrap {
  max-width: 400px;
  margin: 0 auto 2rem;
}

/* Narrative */
.quest__results-narrative {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 0.9rem;
  color: #374151;
}

.quest__results-narrative p {
  margin: 0 0 0.75rem;
}

.quest__results-narrative p:last-child {
  margin-bottom: 0;
}

/* Actions */
.quest__results-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Utility ───────────────────────────────────────────── */

.hidden {
  display: none !important;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 640px) {
  .quest__likert {
    flex-direction: column;
  }

  .quest__likert-option {
    flex-direction: row;
    gap: 0.75rem;
    min-width: 100%;
    padding: 0.5rem;
    text-align: left;
  }

  .quest__likert-anchor {
    font-size: 0.8rem;
  }

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

  .quest-report__actions {
    flex-direction: column;
  }
}

/* ── Report Page ──────────────────────────────────────── */

.quest-report {
  padding: 2rem 0 4rem;
}

.quest-report__screen-header {
  text-align: center;
  margin-bottom: 2rem;
}

.quest-report__screen-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.25rem;
}

.quest-report__screen-company {
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0 0 0.25rem;
}

.quest-report__screen-date {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0;
}

/* Report header (print only) */
.quest-report__header {
  display: none;
}

/* Investments table */
.quest-report__investments {
  margin-bottom: 2rem;
}

.quest-report__investments-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 1rem;
}

.quest-report__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.quest-report__table th,
.quest-report__table td {
  padding: 0.625rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.quest-report__table th {
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
}

.quest-report__table td:last-child,
.quest-report__table th:last-child {
  text-align: right;
}

.quest-report__table td:nth-child(2),
.quest-report__table th:nth-child(2) {
  text-align: center;
}

.quest-report__table-total td {
  border-top: 2px solid #e5e7eb;
  border-bottom: none;
  padding-top: 0.75rem;
}

/* Actions row */
.quest-report__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── Print Styles ─────────────────────────────────────── */

@media print {
  /* Hide site chrome and interactive elements */
  .header, .footer, .cta-banner,
  .quest-report__actions,
  .quest-report__screen-header {
    display: none !important;
  }

  /* Show report header */
  .quest-report__header {
    display: block !important;
    text-align: center;
    padding: 2rem 0;
    border-bottom: 3px solid #E8862A;
    margin-bottom: 2rem;
  }

  .quest-report__logo {
    text-align: center;
  }

  .quest-report__print-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.25rem;
  }

  .quest-report__print-company {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0 0 0.25rem;
  }

  .quest-report__print-date {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
  }

  /* Page break control */
  .quest__results-narrative { page-break-inside: avoid; }
  .quest-report__investments { page-break-inside: avoid; }
  .quest__results-chart-wrap { page-break-inside: avoid; }

  body { font-size: 12pt; }
  .quest-report { padding: 0; }
}
