/* ═══════════════════════════════════════════════════════════════════════════
   CSS VARIABLES & RESET
═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Dear Thrive brand colours ── */
  --brand-lavender:   #D198FF;
  --brand-violet:     #4505FC;
  --brand-navy:       #1E123A;
  --brand-purple-mid: #8B4DF7;
  --brand-purple-lt:  #B093F9;
  --brand-purple-pale:#E3C1FF;
  --brand-gold:       #F5C356;
  --brand-dark-purple:#422B66;
  --brand-muted:      #7A6896;
  --brand-ghost:      #F1EDFB;
  --brand-offwhite:   #F6F6F9;

  /* ── Gradient ── */
  --gradient:         linear-gradient(135deg, #D198FF 0%, #4505FC 100%);
  --gradient-dark:    linear-gradient(135deg, #8B4DF7 0%, #1E123A 100%);

  /* ── Semantic aliases ── */
  --navy:             var(--brand-navy);
  --navy-light:       #2d1a55;
  --indigo:           var(--brand-purple-mid);
  --indigo-light:     var(--brand-purple-lt);
  --indigo-bg:        var(--brand-ghost);
  --gold:             var(--brand-gold);
  --gold-light:       #fad97a;

  /* ── Status colours (kept for band scores) ── */
  --green:            #16a34a;
  --green-bg:         #dcfce7;
  --blue:             #2563eb;
  --blue-bg:          #dbeafe;
  --amber:            #d97706;
  --amber-bg:         #fef3c7;
  --red:              #dc2626;
  --red-bg:           #fee2e2;

  /* ── Dimension accent colours — updated to brand purples ── */
  --dim-1: #8B4DF7;
  --dim-2: #F5C356;
  --dim-3: #B093F9;
  --dim-4: #D198FF;
  --dim-5: #4505FC;
  --dim-6: #422B66;

  /* ── Text ── */
  --text-primary:     #1E123A;
  --text-secondary:   #422B66;
  --text-muted:       #7A6896;

  /* ── Surfaces ── */
  --bg:               #F6F6F9;
  --surface:          #ffffff;
  --border:           #E3C1FF;
  --border-strong:    #B093F9;

  /* ── Shadows ── */
  --shadow-sm:  0 1px 3px rgba(69,5,252,.08), 0 1px 2px rgba(69,5,252,.05);
  --shadow:     0 4px 6px -1px rgba(69,5,252,.1), 0 2px 4px -1px rgba(69,5,252,.06);
  --shadow-lg:  0 10px 25px -3px rgba(69,5,252,.15), 0 4px 6px -2px rgba(69,5,252,.07);
  --shadow-xl:  0 20px 50px -10px rgba(69,5,252,.25);

  /* ── Radii & transitions ── */
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --transition: all .2s cubic-bezier(.4,0,.2,1);

  /* ── Font: Poppins replaces Inter + Playfair Display ── */
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREENS
═══════════════════════════════════════════════════════════════════════════ */

.screen {
  display: none;
  min-height: 100vh;
  animation: fadeIn .35s ease;
}
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WELCOME SCREEN
═══════════════════════════════════════════════════════════════════════════ */

#screen-welcome {
  background: linear-gradient(145deg, #1E123A 0%, #2d1255 50%, #4505FC 100%);
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
#screen-welcome.active {
  display: flex;
}

.welcome-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(209,152,255,.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245,195,86,.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.03) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-content {
  max-width: 680px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin-bottom: 32px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-lavender);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.welcome-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}

.trademark {
  font-size: .6em;
  vertical-align: super;
  font-weight: 400;
  color: var(--brand-lavender);
}

.welcome-tagline {
  font-size: 1.1rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 28px;
  line-height: 1.7;
}

.welcome-intro {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
  text-align: left;
}

.welcome-intro p {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}
.welcome-intro p:last-child { margin-bottom: 0; }

.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50px;
  padding: 7px 16px;
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  font-weight: 500;
}

.meta-icon { font-size: 1rem; }

.rating-scale-preview {
  margin-bottom: 32px;
}

.rating-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.4);
  margin-bottom: 10px;
}

.scale-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scale-pill {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  font-weight: 600;
  min-width: 72px;
  text-align: center;
  line-height: 1.3;
}

.scale-pill small { font-weight: 400; font-size: .73rem; display: block; color: rgba(255,255,255,.5); }
.scale-pill-mid { border-color: rgba(99,102,241,.4); color: rgba(255,255,255,.85); }
.scale-pill-high { border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.12); color: rgba(255,255,255,.9); }

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(69,5,252,.4);
  letter-spacing: .01em;
  margin-bottom: 20px;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(69,5,252,.55);
}

.btn-start:active { transform: translateY(0); }

.consent-block {
  margin: 16px 0 24px;
  padding: 0 8px;
}

.consent-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  text-align: left;
}

.consent-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #D198FF;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.consent-label a {
  color: #D198FF;
  text-decoration: underline;
}

.welcome-footer {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  letter-spacing: .03em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SURVEY SCREEN
═══════════════════════════════════════════════════════════════════════════ */

#screen-survey {
  background: var(--bg);
  min-height: 100vh;
}

.survey-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.survey-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.01em;
}

.survey-step-info {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--indigo-bg);
  padding: 4px 14px;
  border-radius: 50px;
  color: var(--indigo);
}

.progress-track {
  height: 4px;
  background: var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #D198FF, #4505FC);
  transition: width .4s cubic-bezier(.4,0,.2,1);
  border-radius: 0 4px 4px 0;
}

.dim-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px 0;
}

.dim-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: var(--transition);
  cursor: default;
}

.dim-dot.active { transform: scale(1.3); }
.dim-dot.done { opacity: .7; }

.survey-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 100px;
}

.dimension-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dim-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
}

.dim-number {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-purple-lt);
  min-width: 52px;
  padding-top: 4px;
}

.dim-title-block { flex: 1; }

.dim-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.dim-subtitle {
  font-size: .9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.dim-description {
  padding: 16px 32px;
  font-size: .92rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  line-height: 1.65;
  background: #f8fafc;
}

/* Questions */
.questions-list {
  padding: 12px 0;
}

.question-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}

.question-row:last-child { border-bottom: none; }
.question-row:hover { background: #f8fafc; }

.question-row.answered { background: #f0f9ff; }

.question-text {
  flex: 1;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-primary);
  padding-top: 6px;
  line-height: 1.5;
}

.rating-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.rating-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-strong);
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating-btn:hover {
  border-color: var(--brand-purple-mid);
  background: var(--brand-ghost);
  color: var(--brand-purple-mid);
  transform: translateY(-1px);
}

.rating-btn.selected {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(69,5,252,.35);
  transform: translateY(-1px);
}

.rating-btn[data-val="1"].selected { background: #e11d48; border-color: #e11d48; box-shadow: 0 4px 12px rgba(225,29,72,.3); }
.rating-btn[data-val="2"].selected { background: #ea580c; border-color: #ea580c; box-shadow: 0 4px 12px rgba(234,88,12,.3); }
.rating-btn[data-val="3"].selected { background: #ca8a04; border-color: #ca8a04; box-shadow: 0 4px 12px rgba(202,138,4,.3); }
.rating-btn[data-val="4"].selected { background: #2563eb; border-color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.rating-btn[data-val="5"].selected { background: #16a34a; border-color: #16a34a; box-shadow: 0 4px 12px rgba(22,163,74,.3); }

/* Survey navigation */
.survey-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.btn-back, .btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-back {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.btn-back:hover { border-color: var(--navy); color: var(--navy); background: #f1f5f9; }
.btn-back:disabled { opacity: .3; cursor: not-allowed; }

.btn-next {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(69,5,252,.3);
}
.btn-next:hover { opacity: .92; transform: translateX(2px); box-shadow: 0 6px 20px rgba(69,5,252,.4); }
.btn-next.btn-finish { background: var(--gradient); box-shadow: 0 4px 16px rgba(69,5,252,.4); }

.completion-hint {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
  padding: 0 16px;
}

/* Rating scale labels on mobile */
.rating-labels {
  display: flex;
  justify-content: space-between;
  width: 224px;
  margin-left: auto;
  margin-right: 32px;
  padding: 4px 0 2px;
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMENT SECTION
═══════════════════════════════════════════════════════════════════════════ */

.comment-section {
  border-top: 2px solid var(--border);
  margin-top: 4px;
}

.comment-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 32px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  color: var(--indigo);
  transition: var(--transition);
}

.comment-toggle:hover { background: var(--indigo-bg); }

.comment-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-mic-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--indigo-bg);
  border-radius: 50%;
  color: var(--indigo);
  flex-shrink: 0;
}

.comment-chevron {
  transition: transform .2s ease;
  color: var(--indigo);
  flex-shrink: 0;
}
.comment-chevron.open { transform: rotate(180deg); }

.comment-body {
  padding: 0 32px 20px;
}

.comment-prompt {
  font-size: .83rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}
.comment-prompt em { font-style: italic; color: var(--indigo); }

.comment-tabs {
  display: flex;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}

.comment-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  background: var(--bg);
  font-family: var(--font);
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border-right: 1.5px solid var(--border-strong);
}
.comment-tab:last-child { border-right: none; }
.comment-tab.active {
  background: var(--surface);
  color: var(--navy);
}
.comment-tab:hover:not(.active) { background: #f1f5f9; }

.comment-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text-primary);
  resize: vertical;
  line-height: 1.6;
  transition: border-color .2s;
  background: #f8fafc;
}
.comment-textarea:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--surface);
}

/* Voice tab */
.voice-instructions {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: .81rem;
  color: var(--text-secondary);
}
.voice-instructions p {
  font-weight: 600;
  color: #92400e;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-instructions ol {
  margin-left: 18px;
  line-height: 1.85;
}

.voice-controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.voice-mic-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(92,95,239,.3);
}
.voice-mic-btn:hover { transform: scale(1.06); }
.voice-mic-btn.recording {
  background: #e11d48;
  animation: micPulse 1.5s infinite;
  box-shadow: 0 4px 20px rgba(225,29,72,.45);
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(225,29,72,.4); }
  50% { box-shadow: 0 4px 30px rgba(225,29,72,.7), 0 0 0 8px rgba(225,29,72,.1); }
}

.voice-status-label {
  font-size: .81rem;
  color: var(--text-muted);
  font-weight: 500;
}

.voice-transcript-box {
  min-height: 72px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .88rem;
  color: var(--text-primary);
  line-height: 1.65;
  margin-bottom: 10px;
  background: #f8fafc;
}
.voice-placeholder { color: var(--text-muted); font-style: italic; }
.voice-interim { color: var(--text-muted); }

.voice-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-use-text {
  padding: 8px 18px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-use-text:hover { background: #4f52e0; }

.btn-discard-text {
  padding: 8px 18px;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-strong);
  border-radius: 50px;
  font-family: var(--font);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-discard-text:hover { border-color: var(--navy); color: var(--navy); }

.voice-tip {
  font-size: .78rem;
  color: var(--indigo);
  font-style: italic;
  line-height: 1.5;
}

.voice-unavailable {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS SCREEN
═══════════════════════════════════════════════════════════════════════════ */

#screen-results {
  background: var(--bg);
  min-height: 100vh;
}

.results-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.results-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.results-actions-top {
  display: flex;
  gap: 10px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  border-radius: 50px;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-action:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--indigo-bg);
}

.results-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 120px;
}

/* Hero score */
.results-hero {
  background: linear-gradient(135deg, #1E123A 0%, #4505FC 100%);
  border-radius: var(--radius-xl);
  padding: 40px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.results-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(209,152,255,.25) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(245,195,86,.1) 0%, transparent 60%);
}

.results-hero-inner { position: relative; z-index: 1; }

.results-hero-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.5);
  margin-bottom: 12px;
}

.overall-score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}

.overall-score-number {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.overall-score-max {
  font-size: 1.5rem;
  font-weight: 400;
  color: rgba(255,255,255,.4);
}

.overall-band-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 12px;
}

.overall-band-desc {
  font-size: .875rem;
  color: rgba(255,255,255,.75);
  max-width: 480px;
  margin: 0 auto 16px;
  line-height: 1.6;
}

.results-hero-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.4);
}

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .results-grid { grid-template-columns: 1fr; }
}

.chart-panel, .score-cards-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  letter-spacing: -.01em;
}

/* ── Locked score cards & radar ──────────────────────────────────────────── */

.score-card-locked {
  cursor: default;
}

.chart-locked {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.score-cards-teaser {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  margin-top: 8px;
}

.score-cards-teaser p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ── Chart wrapper ───────────────────────────────────────────────────────── */

.chart-wrapper {
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.chart-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Score cards */
.score-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-card {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}

.score-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.score-card.expanded { border-color: var(--border-strong); }

.score-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

.score-card-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: transform .3s ease;
}

.score-card.expanded .score-card-chevron { transform: rotate(90deg); }

.score-card-expand {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  border-top: 0px solid var(--border);
}

.score-card.expanded .score-card-expand {
  max-height: 600px;
  padding: 14px 16px 16px;
  border-top-width: 1px;
}

.score-card-expand p { font-size: .85rem; color: var(--text-muted); font-style: italic; margin: 0 0 12px; line-height: 1.6; }
.score-card-expand strong { color: var(--navy); font-size: .85rem; }
.score-card-expand ul { margin: 8px 0 0; padding-left: 18px; }
.score-card-expand ul li { font-size: .82rem; color: var(--text); line-height: 1.6; margin-bottom: 6px; }
.score-card-expand em { color: var(--text-muted); }
.expand-loading { color: var(--text-muted); font-size: .82rem; }

.score-card-swatch {
  width: 14px;
  height: 42px;
  border-radius: 4px;
  flex-shrink: 0;
}

.score-card-info { flex: 1; min-width: 0; }

.score-card-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-card-band {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.score-card-right {
  text-align: right;
  flex-shrink: 0;
}

.score-card-number {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.score-card-bar {
  height: 5px;
  background: var(--border);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
  width: 60px;
}

.score-card-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* Band colours */
.band-score-high { color: var(--green); }
.band-score-medium-high { color: var(--blue); }
.band-score-medium-low { color: var(--amber); }
.band-score-low { color: var(--red); }

.band-bar-high { background: var(--green); }
.band-bar-medium-high { background: var(--blue); }
.band-bar-medium-low { background: var(--amber); }
.band-bar-low { background: var(--red); }

/* Band key */
.band-key {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.band-key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.band-key-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius);
  border: 2px solid transparent;
}

.band-key-item.band-high     { background: var(--green-bg); border-color: #bbf7d0; }
.band-key-item.band-medium-high { background: var(--blue-bg);  border-color: #bfdbfe; }
.band-key-item.band-medium-low  { background: var(--amber-bg); border-color: #fde68a; }
.band-key-item.band-low      { background: var(--red-bg);   border-color: #fecaca; }

.band-range {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.band-key-item.band-high     .band-range { color: var(--green); }
.band-key-item.band-medium-high .band-range { color: var(--blue); }
.band-key-item.band-medium-low  .band-range { color: var(--amber); }
.band-key-item.band-low      .band-range { color: var(--red); }

.band-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Overall badge colours */
.badge-high     { background: var(--green-bg);  color: var(--green);  border: 2px solid #bbf7d0; }
.badge-medium-high { background: var(--blue-bg);   color: var(--blue);   border: 2px solid #bfdbfe; }
.badge-medium-low  { background: var(--amber-bg);  color: var(--amber);  border: 2px solid #fde68a; }
.badge-low      { background: var(--red-bg);    color: var(--red);    border: 2px solid #fecaca; }

/* What next section */
.what-next-section {
  background: linear-gradient(135deg, var(--navy) 0%, #0f1e3d 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.what-next-inner {
  padding: 48px 40px;
  color: rgba(255,255,255,.85);
}

.what-next-inner h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.what-next-inner p {
  font-size: .97rem;
  line-height: 1.75;
  margin-bottom: 14px;
}

.what-next-inner em { color: rgba(255,255,255,.7); font-style: italic; }

.what-next-inner blockquote {
  border-left: 4px solid var(--gold-light);
  padding: 16px 20px;
  margin: 20px 0;
  background: rgba(255,255,255,.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.05rem;
  font-style: italic;
  color: #fff;
  font-weight: 500;
}

.what-next-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.what-next-cta {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.what-next-cta h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.what-next-cta p {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 14px;
  line-height: 1.6;
}

.btn-cta-link {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gold-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.btn-cta-link:hover { color: #fff; letter-spacing: .01em; }

/* Floating chat button */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--indigo) 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(92,95,239,.45);
  z-index: 100;
  transition: var(--transition);
}

.chat-fab:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(92,95,239,.55); }

.fab-label { white-space: nowrap; }

.fab-dot {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 10px;
  height: 10px;
  background: var(--gold-light);
  border-radius: 50%;
  border: 2px solid #fff;
  animation: pulse 2s infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT PANEL
═══════════════════════════════════════════════════════════════════════════ */

.chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  animation: fadeOverlay .25s ease;
}

.chat-overlay.active { display: block; }

@keyframes fadeOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.chat-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(480px, 100vw);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-xl);
}

.chat-panel.open { transform: translateX(0); }

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.chat-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coach-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--indigo), #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .03em;
  flex-shrink: 0;
}

.chat-panel-title strong { font-size: .97rem; color: var(--navy); display: block; }

.coach-sub {
  font-size: .75rem;
  color: var(--text-muted);
  display: block;
}

.chat-close-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-close-btn:hover { background: var(--border); color: var(--navy); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.chat-message {
  display: flex;
  gap: 10px;
  animation: messageIn .25s ease;
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-message.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
}

.chat-message.assistant .msg-avatar {
  background: linear-gradient(135deg, var(--indigo), #7c3aed);
  color: #fff;
}

.chat-message.user .msg-avatar {
  background: var(--navy);
  color: #fff;
}

.msg-bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: .89rem;
  line-height: 1.65;
}

.chat-message.assistant .msg-bubble {
  background: #f1f5f9;
  border-radius: 4px 16px 16px 16px;
  color: var(--text-primary);
}

.chat-message.user .msg-bubble {
  background: var(--navy);
  border-radius: 16px 4px 16px 16px;
  color: #fff;
}

/* Markdown styles inside chat bubble */
.msg-bubble p { margin-bottom: 8px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble ul, .msg-bubble ol { margin: 8px 0 8px 18px; }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble strong { font-weight: 700; }
.msg-bubble em { font-style: italic; }
.msg-bubble h3, .msg-bubble h4 { font-weight: 700; margin: 10px 0 4px; }

.chat-message.user .msg-bubble strong { color: #fff; }

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 14px 16px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.chat-textarea {
  flex: 1;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text-primary);
  resize: none;
  line-height: 1.5;
  transition: var(--transition);
  background: var(--bg);
}

.chat-textarea:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--surface);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  background: var(--indigo);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover { background: #4f52e0; transform: scale(1.05); }
.chat-send-btn:disabled { background: var(--border-strong); cursor: not-allowed; transform: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT / PDF
═══════════════════════════════════════════════════════════════════════════ */

@media print {
  .results-topbar, .chat-fab, .results-actions-top, .what-next-section { display: none !important; }
  .results-body { padding: 20px; }
  .screen { display: block !important; }
  #screen-welcome, #screen-survey { display: none !important; }
  .score-card { break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .dim-header { flex-direction: column; gap: 8px; padding: 20px; }
  .dim-number { font-size: 1.6rem; min-width: auto; }
  .question-row { flex-direction: column; gap: 12px; padding: 16px 20px; }
  .rating-buttons { width: 100%; justify-content: space-between; }
  .rating-btn { flex: 1; }
  .survey-nav { padding: 16px 20px; }
  .dim-description { padding: 14px 20px; }
  .dim-dots { gap: 6px; }
  .what-next-inner { padding: 32px 24px; }
  .comment-toggle { padding: 14px 20px; }
  .comment-body { padding: 0 20px 16px; }
  .results-body { padding: 20px 16px 100px; }
  .results-hero { padding: 32px 16px; }
  .btn-action span { display: none; }
  .fab-label { display: none; }
  .chat-fab { padding: 14px; border-radius: 50%; }
  .results-topbar { padding: 12px 16px; }
  .survey-topbar { padding: 12px 16px; }
  .demographics-form { padding: 0 20px; }
  .rating-labels { width: auto; margin-left: 0; margin-right: 0; padding: 4px 20px 2px; }
}

/* ── Lead capture modal ────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 200;
}
.modal {
  display: none; position: fixed;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: white; border-radius: 16px; padding: 2rem;
  width: min(480px, 90vw); z-index: 201;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.modal > p { color: #666; margin: 0 0 1.5rem; font-size: 0.9rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer; color: #999; font-size: 1.2rem;
}
.lead-form { display: flex; flex-direction: column; gap: 0.75rem; }
.lead-form input {
  padding: 0.75rem 1rem; border: 1.5px solid #e2e8f0;
  border-radius: 8px; font-size: 0.95rem; outline: none;
}
.lead-form input:focus { border-color: #6366f1; }
.lead-privacy { font-size: 0.8rem !important; color: #999 !important; margin-top: 0.75rem !important; }
.chat-disclaimer { font-size: 0.72rem; color: #aaa; text-align: center; padding: 6px 16px 10px; flex-shrink: 0; }

/* ── Capabilities chips ─────────────────────────────────── */
.capabilities-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.capability-chip {
  padding: 0.6rem 1.1rem; border: 2px solid #e2e8f0;
  border-radius: 100px; background: white;
  font-size: 0.9rem; cursor: pointer; transition: all 0.15s; color: #334155;
}
.capability-chip:hover { border-color: #6366f1; color: #6366f1; }
.capability-chip.selected { background: #6366f1; border-color: #6366f1; color: white; }

/* ── Demographics form ──────────────────────────────────── */
.demographics-form { display: flex; flex-direction: column; gap: 1.25rem; margin: 1.5rem 0; padding: 0 32px; }
.demo-question { display: flex; flex-direction: column; gap: 0.4rem; }
.demo-question label { font-size: 0.875rem; font-weight: 600; color: #1E123A; }
.demo-question select, .demo-question input[type=text] {
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  background: white;
  transition: border-color 0.15s;
}
.demo-question select:focus, .demo-question input[type=text]:focus { border-color: #8B4DF7; }
.demo-multiselect { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.demo-chip {
  padding: 0.4rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 100px;
  background: white;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #374151;
}
.demo-chip:hover { border-color: #8B4DF7; color: #8B4DF7; }
.demo-chip.selected { background: linear-gradient(135deg, #D198FF, #4505FC); border-color: transparent; color: white; }
.demo-optional { font-size: 0.75rem; color: #94a3b8; margin-left: 0.25rem; }
