/* ============================================================
   KLESSI SCORECARD STYLESHEET
   Light & Cream System
   Colours: Purple #472489 | Teal #20B2AA | Beige #FAF8F5 | Dark #2C2C2C
   Headings: Montserrat | Body: Lora
============================================================ */

.scorecard-section {
  padding: 80px 0;
  background: radial-gradient(circle at top right, rgba(32, 178, 170, 0.05), transparent), radial-gradient(circle at bottom left, rgba(71, 36, 137, 0.05), transparent);
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.scorecard-container {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.scorecard-card {
  background: var(--white);
  border: 1px solid rgba(71, 36, 137, 0.08);
  border-radius: 12px;
  padding: 44px;
  box-shadow: 0 6px 24px rgba(71, 36, 137, 0.08);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.scorecard-header {
  margin-bottom: 28px;
}

.scorecard-progress-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.scorecard-progress-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.scorecard-progress-bar {
  height: 6px;
  background: rgba(71, 36, 137, 0.08);
  border-radius: 3px;
  width: 100%;
  overflow: hidden;
}

.scorecard-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  transition: width 0.3s ease;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Badge */
.scorecard-badge {
  display: inline-block;
  background: rgba(32, 178, 170, 0.12);
  color: var(--teal-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.scorecard-badge.purple {
  background: rgba(71, 36, 137, 0.08);
  color: var(--purple);
}

/* Question styling */
.question-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 23px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 14px;
  line-height: 1.3;
  text-align: left;
}

.question-prompt {
  font-family: 'Lora', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--dark-light);
  margin-bottom: 22px;
  text-align: left;
}

.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.answer-card {
  display: flex;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid rgba(71, 36, 137, 0.12);
  border-radius: 8px;
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  box-sizing: border-box;
  text-align: left;
  outline: none;
  width: 100%;
}

.answer-card:hover {
  border-color: var(--teal);
  background: rgba(32, 178, 170, 0.03);
  transform: translateY(-1px);
}

.answer-card:focus-visible {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(71, 36, 137, 0.2);
}

.answer-card.selected {
  border-color: var(--purple);
  background: rgba(71, 36, 137, 0.03);
  box-shadow: 0 0 0 1px var(--purple);
}

.answer-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(71, 36, 137, 0.25);
  margin-right: 14px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.answer-card.selected .answer-radio {
  border-color: var(--purple);
  background: var(--purple);
}

.answer-card.selected .answer-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
}

.answer-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 2px solid rgba(71, 36, 137, 0.25);
  margin-right: 14px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.answer-card.selected .answer-checkbox {
  border-color: var(--purple);
  background: var(--purple);
}

.answer-card.selected .answer-checkbox::after {
  content: '✓';
  color: var(--white);
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}

.answer-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.45;
  text-align: left;
  flex: 1;
}

/* Free text input */
.free-text-group {
  margin-bottom: 24px;
}

.free-text-input {
  width: 100%;
  min-height: 110px;
  padding: 14px 16px;
  border: 1px solid rgba(71, 36, 137, 0.2);
  border-radius: 6px;
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  resize: vertical;
}

.free-text-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.15);
}

.free-text-input.error {
  border-color: #c93b2b;
}

.free-text-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.field-error {
  color: #c93b2b;
  font-size: 13px;
  margin-top: 6px;
}

/* Controls */
.quiz-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 16px;
}

.btn-secondary {
  background: transparent;
  color: var(--dark-light);
  border: 1px solid var(--mid-gray);
  padding: 10px 20px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--beige);
}

.btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary-scorecard {
  background: var(--teal);
  color: #2c2c2c;
  border: 2px solid var(--teal);
  padding: 12px 28px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-scorecard:hover:not(:disabled) {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(32, 178, 170, 0.3);
}

.btn-primary-scorecard:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Lead Gate Form */
.gate-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 10px;
  line-height: 1.25;
  text-align: left;
}

.gate-subtitle {
  font-family: 'Lora', Georgia, serif;
  font-size: 15.5px;
  color: var(--dark-light);
  margin-bottom: 24px;
  line-height: 1.6;
  text-align: left;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(71, 36, 137, 0.2);
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14.5px;
  color: var(--dark);
  background: var(--white);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.15);
}

.transactional-notice {
  font-family: 'Lora', Georgia, serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 14px;
  text-align: left;
}

.consent-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  text-align: left;
}

.consent-checkbox-group input {
  margin-top: 3px;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
}

.consent-text {
  font-family: 'Lora', Georgia, serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dark-light);
}

/* Result Presentation */
.result-header {
  border-bottom: 1px solid rgba(71, 36, 137, 0.1);
  padding-bottom: 22px;
  margin-bottom: 26px;
  text-align: left;
}

.result-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--purple);
  line-height: 1.25;
  margin: 0 0 12px 0;
  text-align: left;
}

.result-summary {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--dark);
  margin: 0;
  text-align: left;
}

.result-block {
  margin-bottom: 28px;
  text-align: left;
}

.result-block-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  text-align: left;
}

.result-block-text {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--dark-light);
  text-align: left;
}

.result-evidence-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-evidence-item {
  position: relative;
  padding-left: 22px;
  font-family: 'Lora', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--dark);
}

.result-evidence-item::before {
  content: '•';
  position: absolute;
  left: 6px;
  top: 0;
  color: var(--teal-dark);
  font-size: 18px;
}

.action-card {
  background: var(--beige);
  border-left: 4px solid var(--teal);
  border-radius: 4px 8px 8px 4px;
  padding: 18px 20px;
  margin-bottom: 24px;
  text-align: left;
}

.action-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.action-card-text {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark);
  margin: 0;
}

/* Guardrail / Human Review Overlay */
.guardrail-box {
  background: #FFFBF5;
  border-left: 4px solid var(--purple);
  border-radius: 4px 8px 8px 4px;
  padding: 20px 22px;
  margin-bottom: 28px;
  text-align: left;
}

.guardrail-box h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guardrail-box p {
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-light);
  margin: 0 0 8px 0;
}

.guardrail-box p:last-child {
  margin-bottom: 0;
}

/* Onward Support Options */
.support-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

.support-card {
  background: var(--white);
  border: 1px solid rgba(71, 36, 137, 0.12);
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.support-card:hover {
  border-color: var(--purple);
  box-shadow: 0 4px 14px rgba(71, 36, 137, 0.06);
}

.support-card-badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
}

.support-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--purple);
  margin: 0;
}

.support-card-desc {
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--dark-light);
  margin: 0;
}

.support-card-action {
  margin-top: 4px;
}

.support-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--purple);
  transition: color 0.2s ease, gap 0.2s ease;
}

.support-card-link:hover {
  color: var(--teal-dark);
  gap: 10px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.35s ease forwards;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .scorecard-card {
    padding: 28px 20px;
  }
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .question-title {
    font-size: 19px;
  }
  .result-title {
    font-size: 23px;
  }
}
