/* ============================================================
   Founder Burnout Assessment — styles.css
   Design System v1.0 | Tech Founder Coach
   Mobile-first, WCAG 2.1 AA, dark background
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */

:root {
  /* --- Base Colors --- */
  --color-bg:           #000000;
  --color-card:         #1c1c1e;
  --color-border:       #3a3a3c;

  /* --- Primary Palette --- */
  --color-cyan:         #0071e3;
  --color-purple:       #0071e3;

  /* --- Text --- */
  --color-text-primary: #f5f5f7;
  --color-text-light:   #d1d1d6;
  --color-text-muted:   #86868b;

  /* --- Burnout Zone Colors (Results) --- */
  --color-zone-green:   #10b981;
  --color-zone-yellow:  #f59e0b;
  --color-zone-orange:  #ff9f1c;
  --color-zone-red:     #e63946;

  /* --- Semantic --- */
  --color-success:      #059669;
  --color-error:        #dc2626;
  --color-warning:      #d97706;

  /* --- Pitstop Gradient Stops --- */
  /* Pitstop 1: Decision Overload — Orange → Pink → Purple */
  --ps1-from:  #ff6b35;
  --ps1-via:   #ff1493;
  --ps1-to:    #7b2cbf;

  /* Pitstop 2: Opportunity Misalignment — Cyan → Purple → Magenta */
  --ps2-from:  #00d9ff;
  --ps2-via:   #7b2cbf;
  --ps2-to:    #ff006e;

  /* Pitstop 3: Recovery Rituals — Red → Orange → Yellow */
  --ps3-from:  #e63946;
  --ps3-via:   #ff9f1c;
  --ps3-to:    #ffbe0b;

  /* Pitstop 4: Stress Buffer — Deep Indigo → Magenta → Cyan */
  --ps4-from:  #5a189a;
  --ps4-via:   #ff006e;
  --ps4-to:    #00d9ff;

  /* Pitstop 5: Integration Test — Forest Green → Teal → Lime */
  --ps5-from:  #064e3b;
  --ps5-via:   #0d9488;
  --ps5-to:    #84cc16;

  /* --- Card / Surface --- */
  --card-bg:            rgba(255, 255, 255, 0.98);
  --card-radius:        1.5rem;    /* 24px */
  --card-shadow:        0 25px 50px rgba(0, 0, 0, 0.4);

  /* --- Spacing Scale (4px base) --- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* --- Typography --- */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;
  --transition-xslow:  500ms ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--color-cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

fieldset {
  border: none;
}

/* ============================================================
   3. FOCUS STATES (Accessibility)
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove default focus ring but keep for keyboard users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   4. GRID BACKGROUND
   ============================================================ */

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4);
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-logo span {
  color: var(--color-cyan);
}

.nav-logo:hover {
  text-decoration: none;
  color: var(--color-text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--color-text-primary);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: #ffffff;
  color: #000000 !important;
  border-radius: 980px;
  font-size: 14px !important;
  font-weight: 600 !important;
  min-height: 36px;
  transition: opacity var(--transition-fast), transform var(--transition-fast) !important;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none !important;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   6. APP CONTAINER
   ============================================================ */

.app-container {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 61px);
}

/* ============================================================
   7. QUIZ SCREENS (Question Cards)
   ============================================================ */

.quiz-screen {
  min-height: calc(100vh - 61px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
}

/* Question container: centered, max 600px */
.question-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Progress header above card */
.quiz-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.quiz-progress-header strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

/* Progress bar track */
.progress-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-6);
}

/* Progress bar fill */
.progress-bar-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  transition: width 500ms ease-out;
}

/* Question card */
.question-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-8);
  animation: fadeInUp var(--transition-xslow) ease-out both;
}

.question-card.exiting {
  animation: fadeOutUp 300ms ease-in forwards;
}

/* Question text */
.question-text {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  margin-bottom: var(--space-8);
}

/* Likert scale wrapper */
.likert-scale {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Scale labels row */
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

/* Radio option grid (5 columns for 5-point scale) */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}

/* Radio option label wrapper */
.radio-option {
  position: relative;
  cursor: pointer;
}

/* Hide native radio */
.radio-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Custom radio button visual */
.radio-option-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
  user-select: none;
}

.radio-option:hover .radio-option-visual {
  border-color: var(--color-cyan);
  transform: translateY(-1px);
}

/* Checked state */
.radio-option input[type="radio"]:checked + .radio-option-visual {
  border-color: var(--color-cyan);
  background: #e8f0fb;
  color: #003d82;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

/* Focus state for keyboard navigation */
.radio-option input[type="radio"]:focus-visible + .radio-option-visual {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}

/* Scale semantic labels below grid */
.scale-semantic-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
  margin-top: var(--space-2);
  padding: 0 var(--space-1);
}

/* ============================================================
   8. PITSTOP CELEBRATION SCREENS
   ============================================================ */

.pitstop-screen {
  min-height: calc(100vh - 61px);
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  overflow: hidden;
}

/* Full-screen gradient overlays per pitstop */
.pitstop-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.95;
}

/* Pitstop 1: Decision Overload */
.pitstop-screen[data-pitstop="1"]::before {
  background: linear-gradient(135deg, var(--ps1-from), var(--ps1-via), var(--ps1-to));
}

/* Pitstop 2: Opportunity Misalignment */
.pitstop-screen[data-pitstop="2"]::before {
  background: linear-gradient(135deg, var(--ps2-from), var(--ps2-via), var(--ps2-to));
}

/* Pitstop 3: Recovery Rituals */
.pitstop-screen[data-pitstop="3"]::before {
  background: linear-gradient(135deg, var(--ps3-from), var(--ps3-via), var(--ps3-to));
}

/* Pitstop 4: Stress Buffer */
.pitstop-screen[data-pitstop="4"]::before {
  background: linear-gradient(135deg, var(--ps4-from), var(--ps4-via), var(--ps4-to));
}

/* Pitstop 5: Integration Test */
.pitstop-screen[data-pitstop="5"]::before {
  background: linear-gradient(135deg, var(--ps5-from), var(--ps5-via), var(--ps5-to));
}

/* Content layer above gradient */
.pitstop-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

/* Pitstop number badge */
.pitstop-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

/* Pitstop icon/emoji */
.pitstop-icon {
  font-size: 96px;
  line-height: 1;
  margin-bottom: var(--space-4);
  display: block;
  animation: celebrationBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.2s;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Pitstop title */
.pitstop-title {
  font-size: 40px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: fadeInDown 0.6s ease-out both;
  animation-delay: 0.1s;
}

/* Pitstop insight card */
.pitstop-insight-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
  padding: var(--space-10) var(--space-8);
  margin: var(--space-8) 0;
  text-align: left;
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.2s;
  position: relative;
  overflow: hidden;
}

.pitstop-insight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0.8;
}

.pitstop-insight-card .insight-headline {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: var(--space-5);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pitstop-insight-card .insight-body {
  font-size: 17px;
  color: #1f2937;
  line-height: 1.8;
  font-weight: 500;
  margin-bottom: var(--space-4);
}

/* Key callout (bordered left) */
.insight-callout {
  border-left: 4px solid;
  padding-left: var(--space-5);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.5;
}

/* Callout border color per pitstop */
.pitstop-screen[data-pitstop="1"] .insight-callout { border-color: #ff6b35; }
.pitstop-screen[data-pitstop="2"] .insight-callout { border-color: #00d9ff; }
.pitstop-screen[data-pitstop="3"] .insight-callout { border-color: #e63946; }
.pitstop-screen[data-pitstop="4"] .insight-callout { border-color: #5a189a; }
.pitstop-screen[data-pitstop="5"] .insight-callout { border-color: #0d9488; }

/* Pitstop progress indicator (dots) */
.pitstop-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.pitstop-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background var(--transition-base), transform var(--transition-base);
}

.pitstop-dot.active {
  background: #ffffff;
  transform: scale(1.3);
}

.pitstop-dot.completed {
  background: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   9. WELCOME / INTRO SCREEN
   ============================================================ */

.welcome-screen {
  min-height: calc(100vh - 61px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.welcome-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: var(--space-8);
  max-width: 560px;
  width: 100%;
  animation: fadeInUp var(--transition-xslow) ease-out both;
}

.welcome-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-cyan);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.welcome-meta-item {
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ============================================================
   10. RESULTS SCREEN
   ============================================================ */

.results-screen {
  min-height: calc(100vh - 61px);
  padding: var(--space-8) var(--space-4);
}

.results-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Results header */
.results-header {
  text-align: center;
  padding: var(--space-4) 0 var(--space-2);
  animation: fadeInUp 0.4s ease-out both;
}

.results-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: var(--space-1);
}

.results-header-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Score card */
.score-card {
  background: linear-gradient(135deg, rgba(28, 28, 30, 0.8), rgba(44, 44, 46, 0.6));
  border: 1px solid rgba(0, 113, 227, 0.15);
  border-radius: 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4),
              0 0 60px rgba(0, 113, 227, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: var(--space-10) var(--space-8);
  text-align: center;
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.1s;
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 50% 50%, rgba(0, 113, 227, 0.04), transparent);
  pointer-events: none;
}

/* Large numeric score */
.score-display {
  font-size: 140px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-4);
  animation: scoreCountUp 1s ease-out both;
  animation-delay: 0.3s;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* Score color per zone */
.score-display.zone-green {
  background-image: linear-gradient(135deg, #10b981, #059669);
}
.score-display.zone-yellow {
  background-image: linear-gradient(135deg, #f59e0b, #d97706);
}
.score-display.zone-orange {
  background-image: linear-gradient(135deg, #ff9f1c, #ea580c);
}
.score-display.zone-red {
  background-image: linear-gradient(135deg, #e63946, #9f1239);
}

.score-max {
  font-size: 40px;
  font-weight: 300;
  color: #9ca3af;
  margin-left: var(--space-2);
  font-weight: 400;
  -webkit-text-fill-color: #9ca3af;
}

/* Segment badge */
.segment-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: fadeInDown 0.6s ease-out both;
  animation-delay: 0.2s;
  padding: var(--space-2) var(--space-5);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  margin: var(--space-4) 0;
  letter-spacing: 0.02em;
}

.segment-badge.high-risk {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.segment-badge.moderate-risk {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.segment-badge.resilient {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

/* Results headline */
.results-headline {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  animation: fadeInDown 0.6s ease-out both;
  animation-delay: 0.1s;
}

/* Results personalized copy */
.results-copy {
  font-size: 17px;
  color: #e5e7eb;
  line-height: 1.8;
  max-width: 56ch;
  margin: 0 auto var(--space-8);
  animation: fadeInUp 0.6s ease-out both;
  animation-delay: 0.2s;
  font-weight: 500;
}

/* Pitstop breakdown section */
.breakdown-card {
  background: linear-gradient(135deg, rgba(28, 28, 30, 0.6), rgba(44, 44, 46, 0.4));
  border: 1px solid rgba(0, 113, 227, 0.1);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: var(--space-10);
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.2s;
}

.breakdown-card-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--space-8);
  letter-spacing: -0.01em;
}

/* Individual breakdown bar */
.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.breakdown-item:last-child {
  margin-bottom: 0;
}

.breakdown-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.breakdown-label {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.breakdown-percent {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-cyan);
  font-family: var(--font-mono);
}

/* Progress bar track for breakdown */
.breakdown-bar-track {
  height: 14px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(0, 113, 227, 0.08));
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  position: relative;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  box-shadow: 0 0 20px rgba(0, 113, 227, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Bar color by risk level */
.breakdown-bar-fill.low    {
  background: linear-gradient(90deg, #10b981, #059669);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.breakdown-bar-fill.medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.breakdown-bar-fill.high   {
  background: linear-gradient(90deg, #ff9f1c, #ea580c);
  box-shadow: 0 0 20px rgba(255, 159, 28, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.breakdown-bar-fill.critical {
  background: linear-gradient(90deg, #e63946, #9f1239);
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ============================================================
   11. EMAIL CAPTURE FORM
   ============================================================ */

.email-capture-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-8);
  animation: fadeInUp 0.4s ease-out both;
  animation-delay: 0.3s;
}

.email-capture-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin-bottom: var(--space-2);
}

.email-capture-subtitle {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

/* Form layout */
.capture-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Form field group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Label */
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.01em;
}

.form-label .optional-tag {
  font-weight: 400;
  color: #9ca3af;
  font-size: 11px;
  margin-left: var(--space-1);
}

/* Text input + email input */
.form-input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: #111827;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:hover {
  border-color: #d1d5db;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
  background: #f5f5f7;
}

/* Error state */
.form-input.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Error message */
.form-error-msg {
  font-size: 13px;
  color: var(--color-error);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Success state */
.form-input.success {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* Privacy note below form */
.form-privacy {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
  text-align: center;
  padding-top: var(--space-2);
}

/* ============================================================
   12. BUTTONS
   ============================================================ */

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-8);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
}

/* Primary button: solid accent */
.btn-primary {
  background: #0071e3;
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 113, 227, 0.35);
  opacity: 0.95;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

/* Secondary button: outline */
.btn-secondary {
  background: transparent;
  color: var(--color-text-light);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-cyan);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

/* CTA button: large, full-width, white on gradient (for pitstop screens) */
.btn-cta {
  width: 100%;
  min-height: 56px;
  background: #ffffff;
  color: #5b21b6;
  font-size: 18px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  border-color: transparent;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Submit button: full-width, solid accent, larger */
.btn-submit {
  width: 100%;
  min-height: 56px;
  background: #0071e3;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3);
  border-color: transparent;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 113, 227, 0.4);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Continue button (white on gradient background for quiz) */
.btn-continue {
  width: 100%;
  min-height: 52px;
  background: #ffffff;
  color: #3730a3;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-color: transparent;
}

.btn-continue:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.btn-continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Back / ghost button */
.btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  min-height: 44px;
  padding: 0 var(--space-6);
}

.btn-ghost:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
  transform: none;
}

/* Navigation row (Next + optional Back) */
.quiz-nav {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.quiz-nav .btn-ghost {
  flex: 0 0 auto;
}

.quiz-nav .btn-continue {
  flex: 1;
}

/* ============================================================
   13. THANK YOU / CONFIRMATION SCREEN
   ============================================================ */

.thankyou-screen {
  min-height: calc(100vh - 61px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.thankyou-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: var(--space-10) var(--space-8);
  max-width: 520px;
  width: 100%;
  animation: fadeInUp 0.5s ease-out both;
}

.thankyou-icon {
  font-size: 64px;
  margin-bottom: var(--space-4);
}

.thankyou-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.thankyou-body {
  font-size: 16px;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

/* ============================================================
   14. MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn var(--transition-base) ease-out both;
}

.modal-content {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: var(--space-8);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  animation: fadeInUp 0.3s ease-out both;
}

/* ============================================================
   15. GRADIENT UTILITY CLASSES
   ============================================================ */

.gradient-pitstop-1 {
  background: linear-gradient(135deg, var(--ps1-from), var(--ps1-via), var(--ps1-to));
}

.gradient-pitstop-2 {
  background: linear-gradient(135deg, var(--ps2-from), var(--ps2-via), var(--ps2-to));
}

.gradient-pitstop-3 {
  background: linear-gradient(135deg, var(--ps3-from), var(--ps3-via), var(--ps3-to));
}

.gradient-pitstop-4 {
  background: linear-gradient(135deg, var(--ps4-from), var(--ps4-via), var(--ps4-to));
}

.gradient-pitstop-5 {
  background: linear-gradient(135deg, var(--ps5-from), var(--ps5-via), var(--ps5-to));
}

/* Text gradient utility */
.gradient-text {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-primary {
  background-image: linear-gradient(135deg, var(--color-cyan), #0071e3);
}

/* ============================================================
   16. UTILITY CLASSES
   ============================================================ */

/* Display */
.hidden { display: none !important; }
.block  { display: block; }
.flex   { display: flex; }

/* Screen-reader only — hides text visually but keeps it accessible to assistive tech */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left; }

/* Text sizes */
.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 16px; }
.text-lg   { font-size: 18px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }
.text-3xl  { font-size: 32px; }
.text-4xl  { font-size: 56px; }

/* Text colors */
.text-primary { color: var(--color-text-primary); }
.text-light   { color: var(--color-text-light); }
.text-muted   { color: var(--color-text-muted); }
.text-white   { color: #ffffff; }

/* Spacing utilities (margin/padding) */
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.p-4   { padding: var(--space-4); }
.p-6   { padding: var(--space-6); }
.p-8   { padding: var(--space-8); }
.px-4  { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4  { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* Badge (score, segment, label) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

/* ============================================================
   17. KEYFRAME ANIMATIONS
   ============================================================ */

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

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes celebrationBounce {
  0%   { transform: scale(0.4) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(4deg); opacity: 1; }
  80%  { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes progressBarGrow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

@keyframes scoreCountUp {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* Subtle pulse for results background */
@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.92; }
}

/* ============================================================
   18. QUIZ SCREEN GRADIENT BACKGROUNDS
   The quiz question screens share the pitstop gradient
   ============================================================ */

.quiz-screen[data-pitstop="1"] {
  background: linear-gradient(135deg, var(--ps1-from), var(--ps1-via), var(--ps1-to));
}

.quiz-screen[data-pitstop="2"] {
  background: linear-gradient(135deg, var(--ps2-from), var(--ps2-via), var(--ps2-to));
}

.quiz-screen[data-pitstop="3"] {
  background: linear-gradient(135deg, var(--ps3-from), var(--ps3-via), var(--ps3-to));
}

.quiz-screen[data-pitstop="4"] {
  background: linear-gradient(135deg, var(--ps4-from), var(--ps4-via), var(--ps4-to));
}

.quiz-screen[data-pitstop="5"] {
  background: linear-gradient(135deg, var(--ps5-from), var(--ps5-via), var(--ps5-to));
}

/* Radio checked accent per pitstop */
.quiz-screen[data-pitstop="1"] .radio-option input[type="radio"]:checked + .radio-option-visual {
  border-color: #ff6b35;
  background: #fff3ee;
  color: #9a3412;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.quiz-screen[data-pitstop="2"] .radio-option input[type="radio"]:checked + .radio-option-visual {
  border-color: #00d9ff;
  background: #ecfeff;
  color: #0e7490;
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.2);
}

.quiz-screen[data-pitstop="3"] .radio-option input[type="radio"]:checked + .radio-option-visual {
  border-color: #e63946;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

.quiz-screen[data-pitstop="4"] .radio-option input[type="radio"]:checked + .radio-option-visual {
  border-color: #5a189a;
  background: #f5f3ff;
  color: #4c1d95;
  box-shadow: 0 0 0 3px rgba(90, 24, 154, 0.2);
}

.quiz-screen[data-pitstop="5"] .radio-option input[type="radio"]:checked + .radio-option-visual {
  border-color: #0d9488;
  background: #f0fdfa;
  color: #065f46;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

/* ============================================================
   19. TABLET BREAKPOINT (768px+)
   ============================================================ */

@media (min-width: 768px) {
  .main-nav {
    padding: var(--space-4) var(--space-8);
  }

  .welcome-card {
    padding: var(--space-12);
  }

  .welcome-title {
    font-size: 40px;
  }

  .question-card {
    padding: var(--space-10) var(--space-12);
  }

  .question-text {
    font-size: 24px;
  }

  .pitstop-title {
    font-size: 40px;
  }

  .pitstop-insight-card {
    padding: var(--space-10) var(--space-12);
  }

  .pitstop-insight-card .insight-headline {
    font-size: 28px;
  }

  .score-card {
    padding: var(--space-12) var(--space-16);
  }

  .score-display {
    font-size: 120px;
  }

  .results-headline {
    font-size: 34px;
  }

  .email-capture-card {
    padding: var(--space-12);
  }

  .email-capture-title {
    font-size: 26px;
  }

  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  /* 2-column form on tablet */
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
}

/* ============================================================
   20. DESKTOP BREAKPOINT (1024px+)
   ============================================================ */

@media (min-width: 1024px) {
  .main-nav {
    padding: var(--space-4) var(--space-16);
  }

  .pitstop-title {
    font-size: 56px;
  }

  .pitstop-icon {
    font-size: 80px;
  }

  .score-display {
    font-size: 140px;
  }

  .container {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }
}

/* ============================================================
   21. ACCESSIBILITY — REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .progress-bar-fill {
    transition: none !important;
  }

  .spinner {
    animation: none !important;
    opacity: 0.6;
  }

  /* Replace fade animations with instant display */
  .question-card,
  .pitstop-insight-card,
  .score-card,
  .breakdown-card,
  .email-capture-card,
  .welcome-card,
  .thankyou-card {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   22. HIGH CONTRAST MODE SUPPORT
   ============================================================ */

@media (forced-colors: active) {
  .btn-primary,
  .btn-submit,
  .btn-cta {
    border: 2px solid ButtonText;
  }

  .radio-option input[type="radio"]:checked + .radio-option-visual {
    border: 3px solid Highlight;
  }

  .form-input:focus {
    outline: 3px solid Highlight;
  }
}

/* ============================================================
   23. CHART VISUALIZATIONS
   ============================================================ */

/* Charts container — grid layout for pie and trajectory side-by-side */
.charts-container {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 32px;
  align-items: center;
}

/* Pie chart container */
.chart-pie {
  display: flex;
  justify-content: center;
  align-items: center;
}

#breakdown-pie-chart {
  max-width: 240px !important;
  width: 240px !important;
  height: 240px !important;
}

/* Trajectory diagram container */
.chart-trajectory {
  width: 100%;
  display: flex;
  justify-content: center;
}

#chart-container-trajectory svg {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Mobile adjustments for charts */
@media (max-width: 768px) {
  .main-nav { padding: var(--space-3) var(--space-4); }
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px 24px 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transform: translateY(-110%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }
  .nav-links.open { transform: translateY(0); pointer-events: all; }
  .nav-links a:not(.nav-cta) { display: block; font-size: 16px; }

  .charts-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  #breakdown-pie-chart {
    max-width: 200px !important;
    width: 200px !important;
    height: 200px !important;
  }
}

@media (max-width: 640px) {
  .charts-container {
    gap: 16px;
  }

  #breakdown-pie-chart {
    max-width: 180px !important;
    width: 180px !important;
    height: 180px !important;
  }

  #chart-container-trajectory svg {
    width: 100%;
    height: auto;
  }
}

/* ============================================================
   24. PRINT STYLES
   ============================================================ */

@media (max-width: 420px) {
  .radio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .radio-option-visual {
    min-height: 48px;
  }
}

@media print {
  .main-nav,
  .grid-bg,
  .modal-overlay,
  .quiz-nav,
  .btn-cta,
  .btn-submit {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .score-card,
  .breakdown-card,
  .email-capture-card {
    box-shadow: none;
    border: 1px solid #dddddd;
  }
}
