/**
 * Brothers Automated Quiz Funnel - Quiz Styles
 * Design Mode: Sharp
 */

/* =============================================
   CSS Variables
   ============================================= */

:root {
  /* Primary Colors - Matched to Brothers Automate Orange */
  --color-primary: #ed8936;
  --color-primary-rgb: 237, 137, 54;
  --color-primary-dark: #dd6b20;
  --color-primary-light: #f6ad55;

  /* Secondary Colors - Matched to Brothers Automate Navy */
  --color-secondary: #1a365d;
  --color-secondary-rgb: 26, 54, 93;

  /* Accent Colors - Blue accent from website */
  --color-accent: #3182ce;
  --color-accent-rgb: 49, 130, 206;
  --color-accent-dark: #2c5282;
  --color-accent-light: #63b3ed;

  /* Backgrounds - Warm off-white to match website */
  --color-bg: #fdfcfa;
  --color-bg-card: #ffffff;
  --color-bg-subtle: #f8f7f4;
  --color-bg-muted: #e8e6e1;

  /* Text - Navy palette from website */
  --color-text: #1a365d;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Status Colors */
  --color-success: #10B981;
  --color-success-rgb: 16, 185, 129;
  --color-success-bg: rgba(16, 185, 129, 0.1);

  --color-warning: #F59E0B;
  --color-warning-rgb: 245, 158, 11;
  --color-warning-bg: rgba(245, 158, 11, 0.1);

  --color-info: #3B82F6;
  --color-info-rgb: 59, 130, 246;
  --color-info-bg: rgba(59, 130, 246, 0.1);

  /* Borders - Matched to website */
  --color-border: #e8e6e1;
  --color-border-rgb: 232, 230, 225;
  --color-border-subtle: #f0eeea;
  --color-border-prominent: #d4d2cd;

  /* Typography - Matched to website */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Layout */
  --max-width-quiz: 640px;

  /* Border Radius (Sharp Mode) */
  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-pill: 9999px;

  /* Shadows (5+ layers) */
  --shadow-sm:
    0 1px 1px rgba(30, 40, 60, 0.04),
    0 2px 2px rgba(30, 40, 60, 0.04),
    0 4px 4px rgba(30, 40, 60, 0.03);

  --shadow-md:
    0 1px 1px rgba(30, 40, 60, 0.05),
    0 2px 2px rgba(30, 40, 60, 0.05),
    0 4px 4px rgba(30, 40, 60, 0.04),
    0 8px 8px rgba(30, 40, 60, 0.03),
    0 16px 16px rgba(30, 40, 60, 0.02);

  --shadow-lg:
    0 1px 1px rgba(30, 40, 60, 0.06),
    0 2px 2px rgba(30, 40, 60, 0.06),
    0 4px 4px rgba(30, 40, 60, 0.05),
    0 8px 8px rgba(30, 40, 60, 0.04),
    0 16px 16px rgba(30, 40, 60, 0.03),
    0 32px 32px rgba(30, 40, 60, 0.02);

  --shadow-xl:
    0 2px 2px rgba(30, 40, 60, 0.06),
    0 4px 4px rgba(30, 40, 60, 0.06),
    0 8px 8px rgba(30, 40, 60, 0.06),
    0 16px 16px rgba(30, 40, 60, 0.05),
    0 24px 24px rgba(30, 40, 60, 0.04),
    0 32px 32px rgba(30, 40, 60, 0.03);

  /* Glow Shadows - Orange primary */
  --shadow-glow-selected: 0 0 0 4px rgba(237, 137, 54, 0.2);
  --shadow-glow-cta: 0 0 20px rgba(237, 137, 54, 0.3);
  --shadow-glow-focus:
    0 0 0 4px rgba(237, 137, 54, 0.15),
    0 0 20px rgba(237, 137, 54, 0.1);
  --shadow-glow-accent: 0 0 12px rgba(49, 130, 206, 0.4);

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.2, 0.64, 1);
  --ease-dramatic: cubic-bezier(0.4, 0, 0.2, 1);

  --transition-fast: 150ms var(--ease-standard);
  --transition-normal: 250ms var(--ease-standard);
  --transition-slow: 400ms var(--ease-smooth);
}

/* =============================================
   Reset & Base
   ============================================= */

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

/* Sharp Mode Grid Background - Warm theme */
.page-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(232, 230, 225, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 230, 225, 0.5) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  opacity: 0.5;
}

/* =============================================
   Layout
   ============================================= */

.quiz-container {
  max-width: var(--max-width-quiz);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.quiz-header {
  margin-bottom: var(--space-lg);
}

.logo-link {
  display: inline-block;
}

.logo {
  height: 36px;
  width: auto;
}

.quiz-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quiz-footer {
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* =============================================
   Screens
   ============================================= */

.screen {
  display: none;
}

.screen--active {
  display: block;
  animation: sharpPageEnter 0.3s var(--ease-standard) forwards;
}

.screen--exiting {
  animation: questionExitSharp 0.2s var(--ease-standard) forwards;
}

/* =============================================
   Intro Card
   ============================================= */

.intro-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
}

/* Corner accents */
.intro-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 24px;
  height: 24px;
  border-top: 2px solid var(--color-accent);
  border-left: 2px solid var(--color-accent);
}

.intro-card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 24px;
  height: 24px;
  border-bottom: 2px solid var(--color-accent);
  border-right: 2px solid var(--color-accent);
}

.intro-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.intro-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

/* =============================================
   Progress Bar
   ============================================= */

.progress-bar-container {
  margin-bottom: var(--space-lg);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.progress-label__text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.progress-label__count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.progress-bar {
  height: 4px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.3s var(--ease-standard);
  position: relative;
}

/* Shimmer effect */
.progress-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  background-size: 200% 100%;
  animation: progressShimmer 2s linear infinite;
}

/* Step flash effect */
.progress-bar__fill.step-complete {
  animation: stepFlash 0.2s ease;
}

/* =============================================
   Question Card
   ============================================= */

.question-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  position: relative;
}

/* Corner accents for Sharp mode */
.question-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--color-accent);
  border-left: 2px solid var(--color-accent);
}

.question-card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--color-accent);
  border-right: 2px solid var(--color-accent);
}

.question-card__header {
  margin-bottom: var(--space-lg);
}

.question-card__title {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  margin: 0;
}

.question-card__subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
}

/* =============================================
   Answer Options
   ============================================= */

.answer-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
  text-align: left;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
}

.answer-option:hover {
  border-color: var(--color-primary);
  background: rgba(237, 137, 54, 0.02);
}

.answer-option:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-focus);
}

.answer-option.selected {
  border-width: 2px;
  border-color: var(--color-primary);
  background: rgba(237, 137, 54, 0.05);
  box-shadow: var(--shadow-glow-selected);
  animation: selectionGlow 1s ease-in-out;
}

.answer-option__indicator {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-border-prominent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}

.answer-option.selected .answer-option__indicator {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.answer-option__check {
  width: 12px;
  height: 12px;
  color: var(--color-text-inverse);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.answer-option.selected .answer-option__check {
  opacity: 1;
}

/* SVG checkmark with line draw animation */
.answer-option__check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.answer-option.selected .answer-option__check path {
  animation: lineDrawCheck 0.3s ease forwards;
}

.answer-option__text {
  flex: 1;
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.5;
}

/* =============================================
   Progress Message
   ============================================= */

.progress-message {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-bg-subtle);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  animation: fadeIn 0.3s ease;
}

.progress-message p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* =============================================
   Email Capture
   ============================================= */

.email-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  position: relative;
}

.email-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--color-accent);
  border-left: 2px solid var(--color-accent);
}

.email-card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--color-accent);
  border-right: 2px solid var(--color-accent);
}

.email-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.email-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input:hover {
  border-color: var(--color-border-prominent);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-focus);
}

.privacy-text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-md);
}

/* =============================================
   Loading
   ============================================= */

.loading-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2xl);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.loading-line {
  position: relative;
  height: 2px;
  background: var(--color-border);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.loading-line::after {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--color-primary);
  animation: loadingLine 1.5s ease-in-out infinite;
}

.loading-text {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* =============================================
   Buttons
   ============================================= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-glow-cta);
  transform: translateY(-1px);
}

.btn-primary:focus {
  outline: none;
  box-shadow: var(--shadow-glow-focus);
}

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

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Shine sweep on hover */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

.btn-primary:hover::before {
  animation: shineSweep 0.5s ease forwards;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.btn-start {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  font-size: 1.125rem;
}

.btn-submit {
  width: 100%;
  margin-top: var(--space-sm);
}

.btn-submit.loading .btn-text {
  opacity: 0;
}

.btn-submit.loading .btn-loading {
  display: flex !important;
  position: absolute;
}

/* =============================================
   Keyframe Animations
   ============================================= */

@keyframes sharpPageEnter {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes questionExitSharp {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-30px);
  }
}

@keyframes questionEnterSharp {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes selectionGlow {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(237, 137, 54, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(237, 137, 54, 0.3);
  }
}

@keyframes progressShimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes stepFlash {
  0% { filter: brightness(1.5); }
  100% { filter: brightness(1); }
}

@keyframes lineDrawCheck {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

@keyframes loadingLine {
  0% { width: 0; left: 0; }
  50% { width: 100%; left: 0; }
  100% { width: 0; left: 100%; }
}

@keyframes shineSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes cardBounce {
  0% { transform: scale(1); }
  50% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

@keyframes sliderPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237, 137, 54, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(237, 137, 54, 0.1); }
}

@keyframes staggeredFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   Scale Slider Question Type
   ============================================= */

.slider-question {
  padding: var(--space-md) 0;
}

.slider-container {
  position: relative;
  padding: var(--space-xl) 0 var(--space-md);
}

.slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  border: 3px solid var(--color-bg-card);
  border-radius: var(--radius-sm);
  cursor: grab;
  box-shadow: var(--shadow-md);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow:
    var(--shadow-lg),
    var(--shadow-glow-selected);
}

.slider-input::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
  box-shadow:
    var(--shadow-xl),
    var(--shadow-glow-cta);
}

.slider-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  border: 3px solid var(--color-bg-card);
  border-radius: var(--radius-sm);
  cursor: grab;
  box-shadow: var(--shadow-md);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.slider-input::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow:
    var(--shadow-lg),
    var(--shadow-glow-selected);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-sm);
}

.slider-labels span {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.slider-value-bubble {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 1.25rem;
  font-weight: 700;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition:
    left var(--transition-fast),
    transform var(--transition-fast);
}

.slider-value-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--color-primary);
}

.slider-next-btn {
  margin-top: var(--space-lg);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--transition-normal),
    transform var(--transition-normal);
}

.slider-next-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Card Selection Question Type
   ============================================= */

.card-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.card-options--single-column {
  grid-template-columns: 1fr;
}

.card-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  position: relative;
}

.card-option::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 16px;
  height: 16px;
  border-top: 2px solid transparent;
  border-left: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

.card-option::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-bottom: 2px solid transparent;
  border-right: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

.card-option:hover {
  border-color: var(--color-primary);
  background: rgba(237, 137, 54, 0.02);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-option:hover::before {
  border-top-color: var(--color-accent);
  border-left-color: var(--color-accent);
}

.card-option:hover::after {
  border-bottom-color: var(--color-accent);
  border-right-color: var(--color-accent);
}

.card-option:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-focus);
}

.card-option.selected {
  border-color: var(--color-primary);
  background: rgba(237, 137, 54, 0.05);
  box-shadow: var(--shadow-glow-selected), var(--shadow-lg);
  animation: cardBounce 0.3s var(--ease-bounce);
}

.card-option.selected::before {
  border-top-color: var(--color-accent);
  border-left-color: var(--color-accent);
}

.card-option.selected::after {
  border-bottom-color: var(--color-accent);
  border-right-color: var(--color-accent);
}

.card-option__icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.card-option__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.card-option__desc {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.card-option__check {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.card-option.selected .card-option__check {
  opacity: 1;
  transform: scale(1);
}

.card-option__check svg {
  width: 12px;
  height: 12px;
  color: var(--color-text-inverse);
}

/* Staggered entrance animation for card options */
.card-options .card-option:nth-child(1) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.05s both; }
.card-options .card-option:nth-child(2) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.1s both; }
.card-options .card-option:nth-child(3) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.15s both; }
.card-options .card-option:nth-child(4) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.2s both; }

/* =============================================
   Yes/No Toggle Question Type
   ============================================= */

.toggle-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.toggle-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  position: relative;
  min-height: 120px;
}

.toggle-option:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.toggle-option:focus {
  outline: none;
  box-shadow: var(--shadow-glow-focus);
}

.toggle-option--yes:hover {
  border-color: var(--color-success);
  background: rgba(16, 185, 129, 0.05);
}

.toggle-option--no:hover {
  border-color: var(--color-warning);
  background: rgba(245, 158, 11, 0.05);
}

.toggle-option.selected.toggle-option--yes {
  border-color: var(--color-success);
  background: rgba(16, 185, 129, 0.1);
  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.2),
    var(--shadow-lg);
}

.toggle-option.selected.toggle-option--no {
  border-color: var(--color-warning);
  background: rgba(245, 158, 11, 0.1);
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.2),
    var(--shadow-lg);
}

.toggle-option__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.toggle-option--yes .toggle-option__icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.toggle-option--no .toggle-option__icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.toggle-option.selected.toggle-option--yes .toggle-option__icon {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.toggle-option.selected.toggle-option--no .toggle-option__icon {
  background: var(--color-warning);
  color: var(--color-text-inverse);
}

.toggle-option__text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

/* Staggered entrance for toggles */
.toggle-options .toggle-option:nth-child(1) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.05s both; }
.toggle-options .toggle-option:nth-child(2) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.1s both; }

/* =============================================
   Staggered Answer Options Animation
   ============================================= */

.answer-options .answer-option:nth-child(1) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.05s both; }
.answer-options .answer-option:nth-child(2) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.1s both; }
.answer-options .answer-option:nth-child(3) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.15s both; }
.answer-options .answer-option:nth-child(4) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.2s both; }
.answer-options .answer-option:nth-child(5) { animation: staggeredFadeIn 0.3s var(--ease-smooth) 0.25s both; }

/* =============================================
   Reduced Motion
   ============================================= */

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

  .progress-bar__fill::after {
    animation: none;
  }

  .btn-primary::before {
    animation: none;
  }
}

/* =============================================
   Mobile Responsive
   ============================================= */

@media (max-width: 640px) {
  :root {
    --space-lg: 20px;
    --space-xl: 28px;
    --space-2xl: 40px;
  }

  .quiz-container {
    padding: var(--space-md) var(--space-sm);
  }

  .intro-card,
  .question-card,
  .email-card,
  .loading-card {
    padding: var(--space-lg);
  }

  .intro-title {
    font-size: 1.5rem;
  }

  .intro-subtitle {
    font-size: 1rem;
  }

  .question-card__title {
    font-size: 1.25rem;
  }

  .answer-option {
    padding: var(--space-md);
  }

  .email-title {
    font-size: 1.25rem;
  }

  .btn-primary {
    width: 100%;
  }

  /* Card options - single column on mobile */
  .card-options {
    grid-template-columns: 1fr;
  }

  .card-option {
    padding: var(--space-md);
  }

  .card-option__icon {
    font-size: 1.5rem;
  }

  /* Toggle options - stack on very small screens */
  .toggle-options {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .toggle-option {
    min-height: auto;
    padding: var(--space-md);
    flex-direction: row;
    gap: var(--space-md);
    text-align: left;
  }

  .toggle-option__icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    margin-bottom: 0;
  }

  /* Slider adjustments */
  .slider-value-bubble {
    font-size: 1rem;
    padding: var(--space-xs) var(--space-sm);
  }
}
