/* =====================================================
   Resilience Assessment — styles.css
   Clean, warm, professional design
   ===================================================== */

/* -- Reset & Base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Primary Brand Colors */
  --blue: #4F46E5;        /* Indigo */
  --blue-dark: #4338CA;
  --blue-light: #E0E7FF;

  --teal: #059669;        /* Emerald */
  --teal-light: #D1FAE5;

  --orange: #F59E0B;      /* Warm Amber */
  --orange-light: #FEF3C7;

  /* Neutral System */
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;

  /* Utility */
  --white:   #ffffff;
  --error:   #DC2626;
  --success: #16A34A;

  /* Spacing / Shape */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:  0 10px 28px rgba(0,0,0,.12);

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: 200ms ease;

  /* -- Semantic theme tokens (light defaults) -- */
  --bg-primary:    #ffffff;
  --bg-secondary:  #f8fafc;
  --surface:       #ffffff;
  --text-primary:  #1e293b;
  --text-secondary:#475569;
  --border-color:  #e2e8f0;
  --accent-primary:#4f46e5;
  --accent-cyan:   #0891b2;
}

/* -- Dark mode via system preference --------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary:    #0f172a;
    --bg-secondary:  #1e293b;
    --surface:       #1e293b;
    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --border-color:  #334155;
    --accent-primary:#818cf8;
    --accent-cyan:   #22d3ee;
    --white:         #f1f5f9;
    --slate-900:     #f1f5f9;
    --slate-800:     #e2e8f0;
    --slate-700:     #cbd5e1;
    --slate-600:     #94a3b8;
    --slate-500:     #64748b;
    --slate-400:     #475569;
    --slate-200:     #334155;
    --slate-100:     #1e293b;
    --slate-50:      #0f172a;
    --blue:          #818cf8;
    --blue-dark:     #a5b4fc;
    --blue-light:    rgba(99,102,241,.15);
    --teal:          #34d399;
    --teal-light:    rgba(52,211,153,.15);
    --orange:        #fbbf24;
    --orange-light:  rgba(251,191,36,.15);
  }
}

/* -- Dark mode via explicit user toggle ------------ */
[data-theme="dark"] {
  --bg-primary:    #0f172a;
  --bg-secondary:  #1e293b;
  --surface:       #1e293b;
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --border-color:  #334155;
  --accent-primary:#818cf8;
  --accent-cyan:   #22d3ee;
  --white:         #f1f5f9;
  --slate-900:     #f1f5f9;
  --slate-800:     #e2e8f0;
  --slate-700:     #cbd5e1;
  --slate-600:     #94a3b8;
  --slate-500:     #64748b;
  --slate-400:     #475569;
  --slate-200:     #334155;
  --slate-100:     #1e293b;
  --slate-50:      #0f172a;
  --blue:          #818cf8;
  --blue-dark:     #a5b4fc;
  --blue-light:    rgba(99,102,241,.15);
  --teal:          #34d399;
  --teal-light:    rgba(52,211,153,.15);
  --orange:        #fbbf24;
  --orange-light:  rgba(251,191,36,.15);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.25);
  --shadow-md:     0 4px 12px rgba(0,0,0,.35);
  --shadow-lg:     0 10px 28px rgba(0,0,0,.40);
}

/* -- Light mode explicit (user-toggled or system default) -- */
[data-theme="light"] {
  --bg-primary:    #ffffff;
  --bg-secondary:  #f8fafc;
  --surface:       #ffffff;
  --text-primary:  #1e293b;
  --text-secondary:#475569;
  --border-color:  #e2e8f0;
  --accent-primary:#4f46e5;
  --accent-cyan:   #0891b2;
  --white:         #ffffff;
  --slate-900:     #0F172A;
  --slate-800:     #1E293B;
  --slate-700:     #334155;
  --slate-600:     #475569;
  --slate-500:     #64748B;
  --slate-400:     #94A3B8;
  --slate-200:     #E2E8F0;
  --slate-100:     #F1F5F9;
  --slate-50:      #F8FAFC;
  --blue:          #4F46E5;
  --blue-dark:     #4338CA;
  --blue-light:    #E0E7FF;
  --teal:          #059669;
  --teal-light:    #D1FAE5;
  --orange:        #F59E0B;
  --orange-light:  #FEF3C7;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:     0 10px 28px rgba(0,0,0,.12);
}

/* -- Smooth theme transitions ---------------------- */
html {
  color-scheme: light dark;
}

body,
.site-header,
.site-footer,
.card,
.report-text-card,
.likert-btn,
.btn-secondary,
.form-group input,
.email-input-row input,
.alert,
.strength-card,
.how-it-works,
.credentials-section,
.nav-link,
.modal-content,
.toast {
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}

/* -- Theme toggle button --------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--slate-600);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background-color 200ms ease, color 200ms ease;
}

.theme-toggle:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

[data-theme="dark"] .theme-toggle {
  color: var(--slate-300);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--slate-800);
  color: var(--slate-100);
}

html { scroll-behavior: smooth; }

body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--slate-900);
  background: var(--bg-primary);
  line-height: 1.5;
}

[data-theme="dark"] body {
  background: var(--bg-primary);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background: var(--bg-primary);
  }
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -- Typography ------------------------------------- */
h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15; color: var(--slate-900); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);    font-weight: 700; line-height: 1.25; color: var(--slate-900); }
h3 { font-size: 1.2rem;  font-weight: 600; color: var(--slate-900); }
h4 { font-size: 1rem;    font-weight: 600; color: var(--slate-900); }
h5 { font-size: .9rem;   font-weight: 600; color: var(--slate-900); }
h6 { font-size: .8rem;   font-weight: 600; color: var(--slate-900); }
p  { font-size: 1rem;    color: var(--slate-600); }

/* -- Layout helpers --------------------------------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 4rem 0; }
main { flex: 1; }

/* -- Header / Nav ----------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--slate-900);
  text-decoration: none;
}

.logo-icon {
  display: flex;
  align-items: center;
}

.logo-icon img {
  width: 36px;
  height: 36px;
  display: block;
}

/* -- Footer ----------------------------------------- */
.site-footer {
  background: var(--slate-800);
  color: var(--slate-300);
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: .875rem;
  margin-top: auto;
}

.site-footer a { color: var(--slate-300); }
.site-footer strong { color: var(--white); }

/* -- Header Navigation ------------------------------ */
.header-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-link {
  font-size: .9rem;
  color: var(--slate-700);
  font-weight: 500;
  text-decoration: none;
  padding: .4rem .65rem;
  border-radius: var(--radius-md);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
  color: var(--slate-900);
  background: var(--slate-100);
}

.nav-link.active {
  color: var(--blue-700, #1d4ed8);
  font-weight: 600;
}

.header-nav .btn {
  margin-left: .5rem;
}

/* -- Footer Navigation Grid ------------------------- */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 130px;
}

.footer-nav-heading {
  color: var(--white);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem;
  margin-top: .5rem;
}

.footer-bottom p {
  margin: .25rem 0;
}

/* -- Buttons ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--white);
  color: var(--slate-800);
  border-color: var(--slate-200);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--slate-100); text-decoration: none; }

.btn-teal {
  background: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-teal:hover { background: #0F766E; text-decoration: none; }

.btn-orange {
  background: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-orange:hover { background: #EA6C00; text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover { background: var(--blue-light); text-decoration: none; }

.btn-lg { padding: .9rem 2rem; font-size: 1.1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: .4rem .9rem; font-size: .875rem; }

.btn:disabled, .btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
  transform: none !important;
}

/* -- Hero ------------------------------------------- */
.hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #ECFDF5 50%, #FFF7ED 100%);
  padding: 5rem 1.25rem 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 { margin-bottom: 1.25rem; }
.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--slate-600);
  max-width: 680px;
  margin: 0 auto 2rem;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* -- Cards ------------------------------------------ */
.card{
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 28px;
}
.question-text{
  font-size: 1.25rem;
  font-weight: 650;
  margin: 0 0 16px;
  color: var(--text-primary);
}
.card{
  /* ...your existing rules... */
  max-width: 720px;
  margin: 0 auto;
}
.question-step.card { margin-top: 16px; }

.report-card { position: relative; overflow: hidden; transition: box-shadow var(--transition); }
.report-card:hover { box-shadow: var(--shadow-md); }

.report-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
}

.accent-blue   { background: linear-gradient(90deg, var(--blue), var(--teal)); }
.accent-teal   { background: linear-gradient(90deg, var(--teal), #10B981); }
.accent-orange { background: linear-gradient(90deg, var(--orange), #EF4444); }

.report-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.icon-blue   { background: var(--blue-light); }
.icon-teal   { background: var(--teal-light); }
.icon-orange { background: var(--orange-light); }

.report-card h3 { margin-bottom: .5rem; }
.report-card p  { font-size: .95rem; }

/* -- About / Credentials ---------------------------- */
.credentials-section { background: var(--white); }

.credentials-inner {
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-wrap: wrap;
}

.credentials-avatar {
  flex-shrink: 0;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-light), var(--teal-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
}

.credentials-text h2 { margin-bottom: .5rem; }
.credentials-text .title { color: var(--teal); font-weight: 600; margin-bottom: 1rem; }
.credentials-text p { margin-bottom: .75rem; }

/* -- Quiz Page -------------------------------------- */
.quiz-page { padding: 2rem 1.25rem; }

.quiz-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

/* Progress bar */
.progress-container { margin-bottom: 2rem; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--slate-600);
}

.progress-bar-track{
  height: 10px;
  background: var(--slate-200);   /* <-- change this line */
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 999px;
  transition: width .4s ease;
}

/* Info step (name + email) */
.info-step { display: none; }
.info-step.active { display: block; }

.info-step h2 { margin-bottom: .5rem; }
.info-step .description { margin-bottom: 1.75rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .35rem;
  color: var(--slate-800);
}

.form-group input {
  width: 100%;
  padding: .65rem 1rem;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--slate-800);
  transition: border-color var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-group input.error { border-color: var(--error); }
.field-error { font-size: .8rem; color: var(--error); margin-top: .25rem; display: none; }
.field-error.visible { display: block; }

/* Question step */
.question-step { display: none; }
.question-step.active { display: block; animation: fadeIn .25s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.question-category {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .4rem;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
  line-height: 1.45;
}

/* Likert scale */
.likert-scale {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 2rem;
}

.likert-btn {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1.15rem;
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: .97rem;
  color: var(--text-primary);
  text-align: left;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  width: 100%;
}

.likert-btn:hover {
  border-color: var(--blue);
  background: var(--blue-light);
  transform: translateX(3px);
}

.likert-btn.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue-dark);
  font-weight: 600;
}

.likert-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.likert-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--slate-300);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}

.likert-btn.selected .likert-dot {
  border-color: var(--blue);
  background: var(--blue);
}

.likert-btn.selected .likert-dot::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
}
/* Hover (mouse) */
.likert-btn:hover{
  border-color: rgba(37, 99, 235, 0.35);            /* uses your blue vibe */
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10);
  transform: translateY(-1px);
}

/* Smooth animation */
.likert-btn{
  transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

/* Keyboard focus (accessibility) */
.likert-btn:focus-visible{
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

/* Selected state: your JS sets aria-pressed="true" */
.likert-btn[aria-pressed="true"]{
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
  color: var(--text-primary);
}

/* Optional: make disabled look disabled (if you ever disable buttons) */
.likert-btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* Selected state (works with aria-pressed used in quiz.js) */
.likert-btn[aria-pressed="true"]{
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
  color: var(--text-primary);
}

/* Quiz navigation */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: .5rem;
}

/* -- Submit step ------------------------------------ */
.submit-step { text-align: center; display: none; }
.submit-step.active { display: block; }
.submit-step h2 { margin-bottom: .75rem; }
.submit-step p { margin-bottom: 2rem; }

/* -- Loading Spinner -------------------------------- */
.spinner-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  gap: 1.25rem;
}

.spinner-overlay.active { display: flex; }

.spinner {
  width: 52px; height: 52px;
  border: 5px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner-text { color: var(--white); font-size: 1.05rem; font-weight: 500; }

/* -- Inline loading button state -------------------- */
.btn.loading .btn-label { display: none; }
.btn.loading::after {
  content: '';
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,.5);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
}

.btn-secondary.loading::after,
.btn-outline.loading::after {
  border-color: rgba(0,0,0,.2);
  border-top-color: var(--slate-800);
}

/* -- Alert messages --------------------------------- */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: .92rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: .6rem;
  margin-top: 1rem;
}

.alert.visible { display: flex; }
.alert-success { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.alert-error   { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-info    { background: var(--blue-light); color: var(--blue-dark); border: 1px solid #BFDBFE; }

/* -- Results Page ----------------------------------- */
.results-page { padding: 2rem 1.25rem 4rem; }

.results-wrapper { max-width: 840px; margin: 0 auto; }

.results-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.results-greeting {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: .4rem;
}

.results-subtitle { font-size: 1.05rem; color: var(--slate-600); }

/* Profile bars */
.profile-section { margin-bottom: 2.5rem; }
.profile-section h2 { margin-bottom: 1.25rem; }

.profile-bar-list { display: flex; flex-direction: column; gap: .9rem; }

.profile-bar-item { display: flex; flex-direction: column; gap: .3rem; }

.profile-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-bar-label {
  font-weight: 600;
  font-size: .95rem;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.strength-badge {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .15rem .55rem;
  border-radius: 999px;
}

.badge-primary  { background: var(--blue);   color: var(--white); }
.badge-solid    { background: var(--teal);   color: var(--white); }
.badge-emerging { background: var(--orange); color: var(--white); }

.profile-bar-score { font-size: .875rem; font-weight: 700; color: var(--slate-600); }

.profile-bar-track {
  height: 12px;
  background: var(--slate-200);
  border-radius: 999px;
  overflow: hidden;
}

.profile-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease;
}

.fill-primary  { background: linear-gradient(90deg, var(--blue), #3B82F6); }
.fill-solid    { background: linear-gradient(90deg, var(--teal), #14B8A6); }
.fill-emerging { background: linear-gradient(90deg, var(--orange), #FB923C); }
.fill-default  { background: linear-gradient(90deg, var(--slate-400), var(--slate-300)); }

/* Strengths summary */
.strengths-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 2.5rem;
}

.strength-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  text-align: center;
}

.strength-card.primary  { background: var(--blue-light);   border: 1px solid #BFDBFE; }
.strength-card.solid    { background: var(--teal-light);   border: 1px solid #99F6E4; }
.strength-card.emerging { background: var(--orange-light); border: 1px solid #FED7AA; }

.strength-card h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; }
.strength-card p  { font-size: 1rem; font-weight: 700; color: var(--slate-900); }

.strength-card.primary  h4 { color: var(--blue); }
.strength-card.solid    h4 { color: var(--teal); }
.strength-card.emerging h4 { color: var(--orange); }

/* Report text */
.report-text-section { margin-bottom: 2.5rem; }
.report-text-section h2 { margin-bottom: 1rem; }

.report-text-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  line-height: 1.8;
  color: var(--slate-700);
  white-space: pre-wrap;
  font-size: .97rem;
}

/* Actions */
.results-actions {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.email-input-row {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}

.email-input-row input {
  padding: .65rem 1rem;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  min-width: 260px;
  transition: border-color var(--transition);
}

.email-input-row input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* -- Index page special sections -------------------- */
.how-it-works { background: var(--white); }

.steps-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 2.5rem;
}

.step-item { text-align: center; }

.step-number {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: var(--white);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

.step-item h3 { margin-bottom: .4rem; }
.step-item p  { font-size: .9rem; }

/* CTA section */
.cta-section {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: var(--white);
  text-align: center;
  padding: 4rem 1.25rem;
}

.cta-section h2 { color: var(--white); margin-bottom: .75rem; }
.cta-section p  { color: rgba(255,255,255,.85); margin-bottom: 2rem; font-size: 1.05rem; }

.cta-section .btn-primary {
  background: var(--white);
  color: var(--blue-dark);
}

.cta-section .btn-primary:hover {
  background: var(--blue-light);
}

/* -- Section titles --------------------------------- */
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title p { margin-top: .5rem; font-size: 1.05rem; }

/* -- Utility ---------------------------------------- */
.text-center  { text-align: center; }
.mt-1  { margin-top: .25rem; }
.mt-2  { margin-top: .5rem; }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }
.mb-2  { margin-bottom: .5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }
.gap-2 { gap: .5rem; }
.hidden { display: none !important; }

/* -- Responsive ------------------------------------- */
@media (max-width: 640px) {
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .credentials-inner { flex-direction: column; align-items: center; text-align: center; }
  .likert-scale { gap: .5rem; }
  .quiz-nav { flex-direction: column-reverse; }
  .quiz-nav .btn { width: 100%; justify-content: center; }
  .results-actions { flex-direction: column; align-items: center; }
  .results-actions .btn { width: 100%; justify-content: center; }
  .email-input-row { flex-direction: column; width: 100%; }
  .email-input-row input { width: 100%; min-width: unset; }
}
.strengths-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.strength-card {
  flex: 1 1 240px;
  min-width: 220px;
  background: #fff6f1;
  border-radius: 1.2rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  padding: 2rem 1.2rem 1.5rem 1.2rem;
  text-align: center;
  transition: transform 0.13s;
  cursor: pointer;
  border: 2.5px solid #f6e2d3;
  margin: 0.5rem 0;
}

.strength-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 10px 28px rgba(110,63,0,0.13);
}

.strength-card.primary {
  background: linear-gradient(135deg, #fde6ff 65%, #e3f6fd 100%);
  border-color: #fdc5ff;
}
.strength-card.solid {
  background: linear-gradient(135deg, #e1ffe6 65%, #d0f8fd 100%);
  border-color: #b8ffc5;
}
.strength-card.emerging {
  background: linear-gradient(135deg, #fffbe6 65%, #ffe7c8 100%);
  border-color: #ffe8b6;
}

.card-heading {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.6rem;
  color: #813e00;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
}

.card-type {
  font-size: 1.4rem;
  font-weight: 700;
  color: #313e5c;
  margin-bottom: 0.33em;
}

.card-score {
  font-size: 1rem;
  color: #5c5c73;
  margin-top: 0.1em;
}

.card-score span {
  color: #028448;
  font-weight: bold;
}

@media (max-width: 800px) {
  .strengths-cards {
    flex-direction: column;
    gap: 1rem;
  }
}


/* -- Psychometric Report Styling --------------------- */

/* Report Header */
.psychometric-report-header {
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-bottom: 0;
}

.psychometric-report-header h1 {
  color: var(--white);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: .75rem;
}

.report-date,
.respondent-name {
  color: rgba(255, 255, 255, .85);
  font-size: .95rem;
  margin-top: .25rem;
}

/* Overall Score Section */
.overall-score-section {
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
}

.score-display-block {
  text-align: center;
}

.score-display-block h2 {
  margin-bottom: 1.5rem;
}

.score-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--white);
  box-shadow: 0 10px 30px rgba(102, 126, 234, .35);
  margin: 0 auto 1.25rem;
}

.score-interpretation {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-600);
}

/* Radar Chart Section */
.radar-chart-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}

.radar-chart-section h2 {
  margin-bottom: 1.5rem;
}

.radar-chart-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: center;
}

.chart-description {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--slate-600);
  text-align: center;
}

/* Strength Rankings */
.strengths-section {
  padding: 2rem 0;
}

.strengths-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.strength-ranking {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: .5rem;
}

.rank-strength-card {
  padding: 2rem 1.5rem 1.5rem;
  border-radius: var(--radius-lg);
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.rank-strength-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.rank-strength-card.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--white);
  transform: scale(1.04);
}

.rank-strength-card.primary:hover {
  transform: scale(1.04) translateY(-4px);
}

.rank-strength-card.solid {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: var(--white);
}

.rank-strength-card.emerging {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #5c3a1e;
}

.rank-strength-card h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .6rem;
  opacity: .9;
}

.rank-strength-card.primary h3,
.rank-strength-card.solid h3 { color: rgba(255, 255, 255, .85); }
.rank-strength-card.emerging h3 { color: #7c4f2a; }

.strength-type-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .35rem;
  color: inherit;
}

.rank-strength-card.primary .strength-type-name,
.rank-strength-card.solid   .strength-type-name { color: var(--white); }

.strength-score-display {
  font-size: 1.7rem;
  font-weight: 800;
  color: inherit;
}

.rank-strength-card.primary .strength-score-display,
.rank-strength-card.solid   .strength-score-display { color: var(--white); }

.rank-badge {
  position: absolute;
  top: -14px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/* Narrative report */
.narrative-report-section {
  margin-top: 2rem;
  padding: 2rem;
}

.narrative-report-section h2 { margin-bottom: 1.25rem; }

.report-narrative {
  line-height: 1.85;
  font-size: 1rem;
  color: #444;
}

.report-narrative p {
  margin-bottom: 1rem;
  color: var(--slate-600);
}

.report-narrative p:last-child { margin-bottom: 0; }

/* Recommendations */
.recommendations-section {
  margin-top: 2rem;
  padding: 2rem;
}

.recommendations-section h2 { margin-bottom: 1.25rem; }

.recommendation-group {
  margin-bottom: 1.75rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid transparent;
}

.recommendation-group.growth-area {
  background: #fef9ec;
  border-left-color: var(--orange);
}

.recommendation-group.primary-area {
  background: #eff6ff;
  border-left-color: var(--blue);
}

.rec-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--slate-800);
}

.rec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.rec-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--slate-600);
  font-size: .97rem;
  line-height: 1.6;
}

.rec-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

/* Responsive adjustments for psychometric sections */
@media (max-width: 640px) {
  .strength-ranking {
    grid-template-columns: 1fr;
  }

  .rank-strength-card.primary {
    transform: none;
  }

  .rank-strength-card.primary:hover {
    transform: translateY(-4px);
  }

  .score-circle {
    width: 140px;
    height: 140px;
    font-size: 1.75rem;
  }

  .psychometric-report-header {
    padding: 2rem 1rem 1.75rem;
  }
}

/* Print styles */
@media print {
  .site-header,
  .results-actions,
  .email-input-row,
  #emailAlert,
  #pdfAlert,
  #btnEmail,
  #btnDownload,
  #btnRetake { display: none !important; }

  .psychometric-report-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .score-circle,
  .rank-strength-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  body { background: white; }
  .results-wrapper { max-width: 100%; }
}
/* -- Report header card ----------------------------- */
.report-header-card {
  background: linear-gradient(135deg, #1D4ED8 0%, #0D9488 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.report-header-card .results-greeting {
  color: #fff;
  margin-bottom: .3rem;
}

.report-header-card .results-subtitle {
  color: rgba(255,255,255,.85);
}

.report-meta {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: 1rem;
  font-size: .85rem;
  color: rgba(255,255,255,.75);
}

.report-meta-label { font-weight: 600; }
.report-meta-value { font-weight: 400; }

/* -- Overall score ring ----------------------------- */
.overall-score-section { margin-bottom: 2rem; }

.overall-score-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.overall-score-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #0D9488 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(37,99,235,.25);
}

.overall-score-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.overall-score-value.score-excellent { background: linear-gradient(135deg, #16A34A, #0D9488); }
.overall-score-value.score-good      { background: linear-gradient(135deg, #2563EB, #0D9488); }
.overall-score-value.score-moderate  { background: linear-gradient(135deg, #F59E0B, #F97316); }
.overall-score-value.score-developing{ background: linear-gradient(135deg, #F97316, #DC2626); }

.overall-score-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: .3rem;
}

.overall-score-sub {
  font-size: .9rem;
  color: var(--slate-600);
  margin: 0;
}

/* -- Radar chart section ---------------------------- */
.radar-section { margin-bottom: 2rem; }

.radar-section h2 { margin-bottom: .4rem; }

.section-description {
  font-size: .92rem;
  color: var(--slate-600);
  margin-bottom: 1.25rem;
}

.radar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.radar-container canvas {
  max-width: 100%;
  height: auto;
}

/* -- Resilience Journey Tracker ------------------------------ */

.journey-tracker {
  background: linear-gradient(135deg, #f0f6ff 0%, #e8f3fb 100%);
  border-left: 4px solid #4a9eca;
}

.journey-message {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 0.25rem;
}

.journey-retake-hint {
  font-size: 0.9rem;
  color: #4a9eca;
  margin-bottom: 1.25rem;
}

.journey-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.journey-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  min-width: 130px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.journey-node.current-node { border: 2px solid #4a9eca; }
.journey-node.previous-node { border: 2px solid #d0dce8; }

.journey-node-label {
  font-size: 0.75rem;
  color: #374151;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.journey-node-score {
  font-size: 1.8rem;
  font-weight: bold;
  color: #1a3a5c;
  line-height: 1;
}

.journey-node-date {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 0.25rem;
}

.journey-arrow {
  font-size: 1.8rem;
  color: #4a9eca;
}

/* Dimension change badges */
.dimension-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.dim-change-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  min-width: 80px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-size: 0.8rem;
}

.dim-change-name { color: #374151; font-size: 0.75rem; }
.dim-change-val  { font-weight: bold; font-size: 1rem; margin-top: 2px; }
.change-up     { color: #2e7d52; }
.change-down   { color: #b84040; }
.change-stable { color: #374151; }

.journey-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* -- Share section ------------------------------------------- */

.share-section { background: #fafcfe; }

.share-disclaimer {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 0.75rem;
  text-align: center;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid #d0dce8;
  border-radius: 6px;
  background: #fff;
  color: #1a3a5c;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.share-btn:hover { background: #4a9eca; border-color: #4a9eca; color: #fff; }
.share-btn-linkedin { border-color: #0077b5; color: #0077b5; }
.share-btn-linkedin:hover { background: #0077b5; color: #fff; }
.share-btn-twitter  { border-color: #000; color: #000; }
.share-btn-twitter:hover  { background: #000; color: #fff; }
.share-btn-native   { background: #4a9eca; color: #fff; border-color: #4a9eca; }
.share-btn-native:hover   { background: #3a8eba; }

/* ================================
   Resilience Atlas Radar Chart
================================ */

.atlas-chart-container {
  max-width: 720px;
  margin: 40px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

#resilienceRadar {
  width: 100%;
  height: 420px;
}
/* -- Atlas Chart Container ------------------------------------------------ */

.atlas-chart-container {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#resilienceRadar {
  max-width: 600px;
  height: auto;
  min-height: 400px;
  display: block;
  margin: 0 auto;
}

.chart-description {
  max-width: 600px;
  margin: 2rem auto 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* -- Responsive adjustments ----------------------------------------------- */

@media (max-width: 768px) {
  .atlas-chart-container {
    padding: 1rem 0;
  }

  #resilienceRadar {
    min-height: 350px;
  }

  .chart-description {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .atlas-chart-container {
    max-width: 100%;
    padding: 1rem;
  }

/* Radar chart sizing */
#radarChartContainer svg {
  max-width: 520px;
  margin: 0 auto;
  display: block;
}
#radarChartContainer {
  width: 100%;
  min-height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#radarChartContainer svg {
  max-width: 420px;
}
/* Radar chart container fix */
#radarChartContainer {
  min-height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* -- Premium Assessment Experience — Results Page --- */

/* Results header description */
.results-header-desc {
  font-size: 1.1rem;
  color: var(--slate-600);
  max-width: 600px;
  margin: 0 auto .5rem;
}

/* Primary Resilience Mode card */
.primary-type-card {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
  border: 2px solid #e6eeff;
  margin-bottom: 2rem;
}

.primary-type-card h2 {
  font-size: 1rem;
  font-weight: 500;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.primary-type-name {
  font-size: 2.4rem;
  font-weight: 700;
  color: #2b4cff;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.primary-type-description {
  font-size: 1rem;
  color: #666;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Atlas map section */
.atlas-section {
  margin-bottom: 2rem;
}

.atlas-description {
  color: #666;
  font-size: .95rem;
  margin-bottom: 1.25rem;
}

.atlas-highlight {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 4px solid #2b4cff;
  border-radius: 6px;
  font-size: .95rem;
  color: #333;
}

#primaryDimensionLabel {
  font-weight: 700;
  color: #2b4cff;
}

/* Insight progress indicator */
.insight-progress {
  text-align: center;
  margin: 1.5rem 0;
  padding: 1rem;
}

.insight-progress p {
  font-size: .875rem;
  color: #666;
  margin-bottom: .5rem;
}

.insight-progress .progress-bar {
  height: 8px;
  background: #eeeeee;
  border-radius: 6px;
  overflow: hidden;
  margin: .75rem auto;
  max-width: 300px;
}

.insight-progress .progress-fill {
  width: 40%;
  height: 100%;
  background: #2b4cff;
  border-radius: 6px;
  transition: width .6s ease;
}

/* Core strengths grid */
.strengths-section {
  margin-bottom: 2rem;
}

.strengths-section h2 {
  margin-bottom: 1.5rem;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.strength-card-premium {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.strength-card-premium:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.strength-card-premium h3 {
  font-size: .8rem;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .75rem;
}

.strength-card-premium div {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a3a5c;
  line-height: 1.4;
}

/* Premium blurred preview */
.premium-preview {
  margin-bottom: 2rem;
  position: relative;
}

.blur-preview {
  filter: blur(5px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.premium-lock-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: white;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: max-content;
  max-width: 90%;
}

.premium-lock-message h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: .6rem;
  color: #1a3a5c;
}

.premium-lock-message p {
  color: #666;
  font-size: .9rem;
  margin-bottom: 1rem;
}

/* Upgrade offer section */
.upgrade-offer {
  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
  border: 2px solid #e6eeff;
  padding: 2.5rem;
  text-align: center;
  margin: 2rem 0;
}

.upgrade-offer h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.upgrade-intro {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2b4cff;
  margin: 1.25rem 0;
}

.upgrade-benefits {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
  display: inline-block;
}

.upgrade-benefits li {
  padding: .6rem 0;
  color: #666;
  font-size: .95rem;
}

.upgrade-benefits li::before {
  content: "✓ ";
  color: #2b4cff;
  font-weight: bold;
  margin-right: .5rem;
}

.upgrade-button {
  background: #2b4cff;
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: all 0.3s ease;
}

.upgrade-button:hover {
  background: #1e35cc;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(43, 76, 255, 0.3);
}

@media (max-width: 768px) {
  .strength-grid {
    grid-template-columns: 1fr;
  }

  .primary-type-name {
    font-size: 1.75rem;
  }

  .premium-lock-message {
    padding: 1.5rem;
  }

  .upgrade-offer {
    padding: 1.5rem;
  }
}

/* =====================================================
   Premium Psychometric Dashboard — Visualization Styles
   ===================================================== */

/* -- Font stack upgrade (Inter preferred) ----------- */
:root {
  --font-premium: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-premium);
}

/* -- Radar chart animated entrance ----------------- */
@keyframes radarFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1);    }
}

#radarChartContainer.radar-animated {
  animation: radarFadeIn 0.6s ease-out forwards;
}

/* -- Radar chart container — premium sizing -------- */
#radarChartContainer {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 420px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#radarChartContainer canvas {
  width: 100% !important;
  max-width: 520px;
}

/* -- Premium card defaults -------------------------- */
.card {
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 28px 32px;
  background: #fff;
  margin-bottom: 40px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.11);
}

/* -- Results page layout ---------------------------- */
.results-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* -- Typography hierarchy --------------------------- */
.results-greeting {
  font-size: clamp(1.8rem, 4vw, 2.125rem);
  font-weight: 800;
  line-height: 1.15;
  font-family: var(--font-premium);
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #475569;
  max-width: 620px;
  margin: 0.5rem auto 0;
}

/* -- Primary resilience mode card ------------------- */
.primary-type-card {
  text-align: center;
  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
  border: 1.5px solid #e0e7ff;
}

.primary-type-card h2 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.primary-type-name {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 0.75rem;
  line-height: 1.1;
  font-family: var(--font-premium);
}

.primary-type-description {
  font-size: 1rem;
  color: #64748b;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* -- Atlas map / Radar section ---------------------- */
.atlas-section {
  margin-bottom: 40px;
}

.atlas-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-family: var(--font-premium);
}

.atlas-description {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.atlas-highlight {
  margin-top: 1.5rem;
  padding: 0.875rem 1.25rem;
  background: #f5f7ff;
  border-left: 4px solid #4f46e5;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
}

#primaryDimensionLabel {
  font-weight: 700;
  /* Color #4f46e5 on white background achieves ~5.1:1 contrast ratio (WCAG AA ✓).
     The text-shadow is a decorative accent and does not reduce text contrast. */
  color: #4f46e5;
  text-shadow: 0 0 8px rgba(80, 120, 255, 0.35);
}

/* -- Profile / report sections ---------------------- */
.profile-section,
.report-section,
.strengths-section {
  margin-bottom: 40px;
}

.profile-section h2,
.report-section h2,
.strengths-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-family: var(--font-premium);
}

/* -- Report text card ------------------------------- */
.report-text-card {
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

.report-text-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: #1e293b;
  font-family: var(--font-premium);
}

.report-text-card p {
  max-width: 68ch;
  margin-bottom: 0.75rem;
}

/* -- Balance ring legend (aria-describedby target) -- */
.balance-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #475569;
  margin-top: 0.5rem;
}

/* -- Responsive adjustments ------------------------- */
@media (max-width: 768px) {
  .card {
    padding: 20px 18px;
    margin-bottom: 28px;
  }

  .card:hover {
    transform: none;
  }

  #radarChartContainer {
    min-height: 320px;
  }

  .results-wrapper {
    padding: 0 1rem;
  }
}

/* -- Resilience Compass (canvas-based) -------------- */
#radarChartContainer canvas#radarChart {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 0 auto;
  border-radius: 50%;
}

/* -- Dominant Dimension section --------------------- */
.dominant-dimension-section {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 10px;
  text-align: center;
}

.dominant-dimension-heading {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #374151;
  margin: 0 0 0.35rem;
}

.dominant-dimension-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #4f46e5;
}

/* -- Research page circular compass layout ---------- */
.compass-layout {
  position: relative;
  width: 340px;
  height: 340px;
  margin: 2rem auto;
}

.compass-layout .compass-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: visible;
}

.research-compass-canvas {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
}

.compass-layout .compass-node {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  transform: translate(-50%, -50%);
  transition: box-shadow 0.2s ease;
}

.compass-layout .compass-node:hover {
  box-shadow: 0 0 18px rgba(79, 70, 229, 0.35);
}

.compass-layout .compass-node .node-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

/* Node positions (6 nodes at 60° intervals, radius ~130px) */
.compass-layout .node-relational    { top: calc(50% - 130px); left: 50%; background: #EDE9FE; border: 1.5px solid #7C3AED; color: #5B21B6; }
.compass-layout .node-cognitive     { top: calc(50% - 65px);  left: calc(50% + 113px); background: #DBEAFE; border: 1.5px solid #2563EB; color: #1D4ED8; }
.compass-layout .node-somatic       { top: calc(50% + 65px);  left: calc(50% + 113px); background: #D1FAE5; border: 1.5px solid #059669; color: #065F46; }
.compass-layout .node-emotional     { top: calc(50% + 130px); left: 50%; background: #FEE2E2; border: 1.5px solid #DC2626; color: #991B1B; }
.compass-layout .node-spiritual     { top: calc(50% + 65px);  left: calc(50% - 113px); background: #FEF3C7; border: 1.5px solid #D97706; color: #92400E; }
.compass-layout .node-agentic       { top: calc(50% - 65px);  left: calc(50% - 113px); background: #FCE7F3; border: 1.5px solid #DB2777; color: #9D174D; }

@media (max-width: 480px) {
  .compass-layout {
    width: 280px;
    height: 280px;
  }

  .compass-layout .compass-node {
    width: 72px;
    height: 72px;
    font-size: 0.58rem;
  }

  .compass-layout .compass-center,
  .research-compass-canvas {
    width: 180px;
    height: 180px;
  }

  .compass-layout .node-relational    { top: calc(50% - 107px); left: 50%; }
  .compass-layout .node-cognitive     { top: calc(50% - 53px);  left: calc(50% + 93px); }
  .compass-layout .node-somatic       { top: calc(50% + 53px);  left: calc(50% + 93px); }
  .compass-layout .node-emotional     { top: calc(50% + 107px); left: 50%; }
  .compass-layout .node-spiritual     { top: calc(50% + 53px);  left: calc(50% - 93px); }
  .compass-layout .node-agentic       { top: calc(50% - 53px);  left: calc(50% - 93px); }
}

/* Compass canvas scaling */
#heroRadar,
#exampleRadar{
width:100%;
max-width:420px;
aspect-ratio:1/1;
display:block;
margin:auto;
}
.example-results{
display:grid;
grid-template-columns:1fr 1fr;
gap:48px;
align-items:center;
}

.example-radar{
display:flex;
justify-content:center;
align-items:center;
width:100%;
max-width:420px;
aspect-ratio:1/1;
margin:auto;
}
/* Center canvas in cards */
.results-card{
display:flex;
align-items:center;
justify-content:center;
}

/* =======================================================
   Dark Mode Overrides
   Applied via [data-theme="dark"] on <html>
   ======================================================= */

/* -- Component overrides ------------------------------- */

/* Headings */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--slate-900);
}

/* Quiz question cards: dark surface in dark mode for AA contrast */
[data-theme="dark"] .question-step.card,
[data-theme="dark"] .info-step.active {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .question-text {
  color: #f1f5f9;
}

[data-theme="dark"] .question-category {
  color: #34d399;
}

[data-theme="dark"] .progress-header {
  color: #94a3b8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) h1,
  :root:not([data-theme="light"]) h2,
  :root:not([data-theme="light"]) h3,
  :root:not([data-theme="light"]) h4,
  :root:not([data-theme="light"]) h5,
  :root:not([data-theme="light"]) h6 {
    color: var(--slate-900);
  }

  /* Quiz question cards: dark surface for AA contrast */
  :root:not([data-theme="light"]) .question-step.card,
  :root:not([data-theme="light"]) .info-step.active {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }

  :root:not([data-theme="light"]) .question-text {
    color: #f1f5f9;
  }

  :root:not([data-theme="light"]) .question-category {
    color: #34d399;
  }

  :root:not([data-theme="light"]) .progress-header {
    color: #94a3b8;
  }

  :root:not([data-theme="light"]) .likert-btn {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
  }

  :root:not([data-theme="light"]) .likert-btn:hover,
  :root:not([data-theme="light"]) .likert-btn.selected,
  :root:not([data-theme="light"]) .likert-btn[aria-pressed="true"] {
    background: rgba(99, 102, 241, 0.2);
    border-color: #818cf8;
    color: #f1f5f9;
  }

  :root:not([data-theme="light"]) .likert-dot {
    border-color: #475569;
  }

  :root:not([data-theme="light"]) .likert-btn.selected .likert-dot,
  :root:not([data-theme="light"]) .likert-btn[aria-pressed="true"] .likert-dot {
    border-color: #818cf8;
    background: #818cf8;
  }

  :root:not([data-theme="light"]) .likert-btn.selected .likert-dot::after,
  :root:not([data-theme="light"]) .likert-btn[aria-pressed="true"] .likert-dot::after {
    background: #0f172a;
  }

  /* Footer: explicitly keep dark so variable remapping doesn't invert it */
  :root:not([data-theme="light"]) .site-footer {
    background: #0f172a;
    color: #cbd5e1;
  }
  :root:not([data-theme="light"]) .site-footer a { color: #cbd5e1; }
  :root:not([data-theme="light"]) .site-footer strong { color: #f1f5f9; }
  :root:not([data-theme="light"]) .footer-nav-heading { color: #f1f5f9; }
  :root:not([data-theme="light"]) .footer-bottom p { color: #cbd5e1; }

  /* btn-secondary: keep readable in system dark mode */
  :root:not([data-theme="light"]) .btn-secondary {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
  }
  :root:not([data-theme="light"]) .btn-secondary:hover {
    background: #334155;
  }

  /* Header, logo, and nav links for system dark mode */
  :root:not([data-theme="light"]) .site-header {
    background: #0f172a;
    border-bottom-color: #334155;
  }
  :root:not([data-theme="light"]) .logo {
    color: #f1f5f9;
  }
  :root:not([data-theme="light"]) .nav-link {
    color: #cbd5e1;
  }
  :root:not([data-theme="light"]) .nav-link:hover {
    color: #f1f5f9;
    background: #1e293b;
  }
  :root:not([data-theme="light"]) .nav-link.active {
    color: #a5b4fc;
  }

  /* Dark mode quiz hint */
  :root:not([data-theme="light"]) .dm-quiz-hint {
    display: flex;
  }
}

/* Header */
[data-theme="dark"] .site-header {
  background: #0f172a;
  border-bottom-color: #334155;
}

[data-theme="dark"] .logo {
  color: #f1f5f9;
}

[data-theme="dark"] .nav-link {
  color: #cbd5e1;
}

[data-theme="dark"] .nav-link:hover {
  color: #f1f5f9;
  background: #1e293b;
}

[data-theme="dark"] .nav-link.active {
  color: #a5b4fc;
}

/* Footer: explicitly keep dark in dark mode (variable remapping would invert its colors) */
[data-theme="dark"] .site-footer {
  background: #0f172a;
  color: #cbd5e1;
}
[data-theme="dark"] .site-footer a { color: #cbd5e1; }
[data-theme="dark"] .site-footer strong { color: #f1f5f9; }
[data-theme="dark"] .footer-nav-heading { color: #f1f5f9; }
[data-theme="dark"] .footer-bottom p { color: #cbd5e1; }

/* General section backgrounds */
[data-theme="dark"] .how-it-works,
[data-theme="dark"] .credentials-section,
[data-theme="dark"] .section {
  background: transparent;
}

/* Cards — always white for clean, consistent appearance */
[data-theme="dark"] .card {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

[data-theme="dark"] .report-text-card {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

/* Hero */
[data-theme="dark"] .hero-badge {
  background: rgba(129,140,248,.15);
  color: var(--blue);
}

/* Buttons */
[data-theme="dark"] .btn-secondary {
  background: #1e293b;
  color: var(--slate-800);
  border-color: #334155;
}

[data-theme="dark"] .btn-secondary:hover {
  background: #334155;
}

[data-theme="dark"] .btn-outline {
  color: var(--blue);
  border-color: var(--blue);
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(129,140,248,.15);
}

/* Likert buttons — darker than the dark quiz card (#1e293b) for separation */
[data-theme="dark"] .likert-btn {
  background: #0f172a;
  border-color: #475569;
  color: #f1f5f9;
}

[data-theme="dark"] .likert-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: #818cf8;
  color: #f1f5f9;
}

[data-theme="dark"] .likert-btn.selected,
[data-theme="dark"] .likert-btn[aria-pressed="true"] {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #f1f5f9;
}

[data-theme="dark"] .likert-dot {
  border-color: #475569;
}

[data-theme="dark"] .likert-btn.selected .likert-dot,
[data-theme="dark"] .likert-btn[aria-pressed="true"] .likert-dot {
  border-color: #818cf8;
  background: #818cf8;
}

[data-theme="dark"] .likert-btn.selected .likert-dot::after,
[data-theme="dark"] .likert-btn[aria-pressed="true"] .likert-dot::after {
  background: #0f172a;
}

/* Form inputs */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .email-input-row input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1e293b;
  border-color: #334155;
  color: var(--slate-900);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .email-input-row input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(129,140,248,.2);
}

[data-theme="dark"] .form-group label {
  color: var(--slate-800);
}

/* Alerts */
[data-theme="dark"] .alert-success {
  background: rgba(52,211,153,.12);
  color: #6ee7b7;
  border-color: rgba(52,211,153,.3);
}

[data-theme="dark"] .alert-error {
  background: rgba(239,68,68,.12);
  color: #fca5a5;
  border-color: rgba(239,68,68,.3);
}

[data-theme="dark"] .alert-info {
  background: rgba(129,140,248,.12);
  color: #a5b4fc;
  border-color: rgba(129,140,248,.3);
}

/* Strength cards */
[data-theme="dark"] .strength-card.primary {
  background: rgba(129,140,248,.12);
  border-color: rgba(129,140,248,.3);
}

[data-theme="dark"] .strength-card.solid {
  background: rgba(52,211,153,.12);
  border-color: rgba(52,211,153,.3);
}

[data-theme="dark"] .strength-card.emerging {
  background: rgba(251,191,36,.12);
  border-color: rgba(251,191,36,.3);
}

[data-theme="dark"] .strength-card p {
  color: var(--slate-900);
}

/* Progress bar track */
[data-theme="dark"] .progress-bar-track,
[data-theme="dark"] .profile-bar-track {
  background: #334155;
}

/* Profile bar labels */
[data-theme="dark"] .profile-bar-label {
  color: var(--slate-800);
}

/* Spinner overlay stays dark */

/* -- Modal / overlay -------------------------------- */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-overlay > div {
  background: #1e293b;
  border-color: #334155;
  color: var(--slate-900);
}

/* -- Scrollbar (cosmetic) --------------------------- */
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0f172a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

/* -- Dark mode quiz readability hint ---------------- */
.dm-quiz-hint {
  display: none;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  padding: .55rem 1.25rem;
  background: rgba(129, 140, 248, .1);
  color: #a5b4fc;
  border-bottom: 1px solid rgba(129, 140, 248, .2);
}

[data-theme="dark"] .dm-quiz-hint {
  display: flex;
}

.dm-quiz-hint strong {
  font-weight: 700;
}

.dm-quiz-hint-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: .95rem;
  line-height: 1;
  padding: .15rem .4rem;
  border-radius: 4px;
  transition: color 150ms, background 150ms;
}

.dm-quiz-hint-close:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, .1);
}

/* -- Print mode: always light ---------------------- */
@media print {
  :root, [data-theme="dark"] {
    --bg-primary:    #ffffff;
    --bg-secondary:  #f8fafc;
    --surface:       #ffffff;
    --text-primary:  #1e293b;
    --text-secondary:#475569;
    --border-color:  #e2e8f0;
    --white:         #ffffff;
    --slate-900:     #0F172A;
    --slate-800:     #1E293B;
    --slate-600:     #475569;
    --slate-200:     #E2E8F0;
    --slate-100:     #F1F5F9;
  }
}
