/* =========================================
   Humblytics Quiz Funnel - Global CSS
   Design Mode: Sharp
   ========================================= */

:root {
  /* Brand Colors */
  --color-primary: #ff7a03;
  --color-primary-rgb: 255, 122, 3;
  --color-primary-hover: #e86e00;
  --color-primary-active: #d66900;
  --color-primary-light: rgba(255, 122, 0, 0.07);
  --color-secondary: #0d0d0d;
  --color-secondary-rgb: 13, 13, 13;

  /* Backgrounds */
  --color-bg: #ffffff;
  --color-bg-alt: #fafafa;
  --color-bg-subtle: #f6f6f6;
  --color-surface: #ffffff;

  /* Text */
  --color-text-primary: #0d0d0d;
  --color-text-secondary: #383838;
  --color-text-muted: #5f5f5f;
  --color-text-faint: #808080;
  --color-text-on-primary: #ffffff;

  /* Borders */
  --color-border: #eeeeee;
  --color-border-rgb: 238, 238, 238;
  --color-border-strong: #e8e8e8;

  /* Feedback */
  --color-success: #22c55e;
  --color-success-rgb: 34, 197, 94;
  --color-warning: #f59e0b;
  --color-warning-rgb: 245, 158, 11;
  --color-error: #ef4444;
  --color-error-rgb: 239, 68, 68;

  /* Temperature (internal only) */
  --color-hot: #22c55e;
  --color-hot-bg: rgba(34, 197, 94, 0.08);
  --color-warm: #f59e0b;
  --color-warm-bg: rgba(245, 158, 11, 0.08);
  --color-cold: #3b82f6;
  --color-cold-bg: rgba(59, 130, 246, 0.08);

  /* Typography */
  --font-heading: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-tight: "Inter", system-ui, sans-serif;
  --font-code: "SF Mono", "Fira Code", monospace;

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

  /* Border Radius (Sharp Mode) */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

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

  --shadow-md:
    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.06),
    0 8px 8px rgba(30, 40, 60, 0.04),
    0 16px 16px rgba(30, 40, 60, 0.03);

  --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.06),
    0 8px 8px rgba(30, 40, 60, 0.05),
    0 16px 16px rgba(30, 40, 60, 0.04),
    0 24px 24px rgba(30, 40, 60, 0.03);

  --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);

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

  --shadow-card-hover:
    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.06),
    0 8px 8px rgba(30, 40, 60, 0.05),
    0 16px 16px rgba(30, 40, 60, 0.04),
    0 24px 24px rgba(30, 40, 60, 0.03),
    0 32px 32px rgba(30, 40, 60, 0.02);

  --shadow-cta-inset: rgba(250, 250, 250, 0.54) 0px 1px 2px 0px inset;

  --shadow-glow-selected:
    0 0 0 4px rgba(255, 122, 3, 0.2),
    0 4px 15px rgba(255, 122, 3, 0.15);

  --shadow-glow-cta:
    0 4px 15px rgba(255, 122, 3, 0.3),
    0 8px 25px rgba(255, 122, 3, 0.15);

  --shadow-glow-focus:
    0 0 0 4px rgba(255, 122, 3, 0.15),
    0 0 20px rgba(255, 122, 3, 0.1);

  /* Easing (Sharp mode: no bounce) */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
}

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

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 { font-size: 48px; line-height: 1.0; letter-spacing: -0.02em; }
h2 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 32px; line-height: 1.2; letter-spacing: -0.01em; }
h4 { font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; }
h5 { font-size: 20px; line-height: 1.4; }

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration: underline;
}

/* =========================================
   Quiz Container
   ========================================= */

.quiz-container {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  position: relative;
}

@media (max-width: 640px) {
  .quiz-container {
    margin: 0 var(--space-md);
    padding: var(--space-md);
  }
}

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

.question-card {
  padding: var(--space-xl) 0;
  animation: sharpPageEnter 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.question-card h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-sm);
}

.question-card .question-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0 0 var(--space-lg);
}

/* =========================================
   Answer Option (Multiple Choice)
   ========================================= */

.answer-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-secondary);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-option:hover {
  border-color: var(--color-primary);
  background: rgba(255, 122, 3, 0.02);
}

.answer-option:focus-visible {
  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(255, 122, 3, 0.05);
  box-shadow: var(--shadow-glow-selected);
  color: var(--color-text-primary);
}

.answer-option .answer-letter {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 24px;
  font-family: var(--font-tight);
}

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

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100px;
  width: 100px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 2.5s infinite;
}

.progress-text {
  font-family: var(--font-tight);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  display: block;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-cta-inset);
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

/* Shimmer pseudo-element */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-glow-cta), var(--shadow-cta-inset);
  text-decoration: none;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  background: var(--color-primary-active);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-border-strong);
  text-decoration: none;
}

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

/* =========================================
   Card Selection (card_selection)
   ========================================= */

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

@media (max-width: 640px) {
  .card-selection-grid {
    grid-template-columns: 1fr;
  }
}

.card-selection-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-selection-option .card-icon {
  font-size: 32px;
  margin-bottom: var(--space-xs);
}

.card-selection-option .card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.card-selection-option .card-description {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.card-selection-option:hover {
  border-color: var(--color-primary);
  background: rgba(255, 122, 3, 0.02);
}

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

.card-selection-option.selected {
  border-width: 2px;
  border-color: var(--color-primary);
  background: rgba(255, 122, 3, 0.05);
  box-shadow: var(--shadow-glow-selected);
}

/* =========================================
   Slider Container (scale_slider)
   ========================================= */

.slider-container {
  padding: var(--space-lg) 0;
}

.slider-value {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.slider-unit {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: var(--space-xs);
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 0;
  outline: none;
  cursor: pointer;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  border: 2px solid var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: var(--shadow-glow-selected);
}

.slider-container input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  border: 2px solid var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-sm);
  font-family: var(--font-tight);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.slider-confirm-btn {
  display: block;
  width: 100%;
  margin-top: var(--space-lg);
}

/* =========================================
   Toggle Container (yes_no_toggle)
   ========================================= */

.toggle-container {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
}

.toggle-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-option:hover {
  border-color: var(--color-primary);
  background: rgba(255, 122, 3, 0.02);
}

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

.toggle-option.selected {
  border-width: 2px;
  border-color: var(--color-primary);
  background: rgba(255, 122, 3, 0.05);
  color: var(--color-primary);
  box-shadow: var(--shadow-glow-selected);
}

@media (max-width: 640px) {
  .toggle-container {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* =========================================
   Tag Cloud (tag_cloud) - Multi-select pills
   ========================================= */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  justify-content: center;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.15s var(--ease-standard),
              background-color 0.15s var(--ease-standard),
              box-shadow 0.15s var(--ease-standard),
              color 0.15s var(--ease-standard);
  user-select: none;
}

.tag-pill:hover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.02);
}

.tag-pill.selected {
  border-width: 2px;
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.05);
  color: var(--color-primary);
  box-shadow: var(--shadow-glow-selected);
  font-weight: 600;
}

.tag-pill .tag-icon {
  font-size: 16px;
}

.tag-confirm-btn {
  display: block;
  width: 100%;
  margin-top: var(--space-lg);
}

.tag-confirm-btn:disabled,
.star-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* =========================================
   Emoji Scale (emoji_scale) - Mood picker
   ========================================= */

.emoji-scale {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

.emoji-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  cursor: pointer;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: border-color 0.15s var(--ease-standard),
              background-color 0.15s var(--ease-standard),
              transform 0.15s var(--ease-standard);
}

.emoji-option:hover {
  background: rgba(var(--color-primary-rgb), 0.03);
  transform: translateY(-2px);
}

.emoji-option .emoji-face {
  font-size: 40px;
  line-height: 1;
  transition: transform 0.15s var(--ease-standard);
}

.emoji-option:hover .emoji-face {
  transform: scale(1.15);
}

.emoji-option .emoji-label {
  font-family: var(--font-tight);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.emoji-option.selected {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.05);
  box-shadow: var(--shadow-glow-selected);
}

.emoji-option.selected .emoji-face {
  transform: scale(1.2);
}

@media (max-width: 640px) {
  .emoji-scale {
    gap: var(--space-xs);
  }
  .emoji-option {
    padding: var(--space-sm);
  }
  .emoji-option .emoji-face {
    font-size: 32px;
  }
}

/* =========================================
   Star Rating (star_rating) - Interactive stars
   ========================================= */

.star-rating {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
}

.star {
  background: none;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
  color: var(--color-border-strong);
  transition: color 0.15s var(--ease-standard),
              transform 0.15s var(--ease-standard);
}

.star svg {
  display: block;
}

.star:hover {
  transform: scale(1.1);
}

.star.highlighted svg,
.star.highlighted {
  color: var(--color-primary);
}

.star.highlighted svg path {
  fill: rgba(var(--color-primary-rgb), 0.15);
}

.star.filled svg,
.star.filled {
  color: var(--color-primary);
}

.star.filled svg path {
  fill: var(--color-primary);
}

.star-label {
  text-align: center;
  font-family: var(--font-tight);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  min-height: 20px;
  margin-bottom: var(--space-sm);
}

.star-confirm-btn {
  display: block;
  width: 100%;
  margin-top: var(--space-md);
}

/* =========================================
   Branded Loading Steps
   ========================================= */

.loading-steps {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) auto;
  text-align: left;
  max-width: 340px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  font-size: 15px;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s var(--ease-standard),
              transform 0.3s var(--ease-standard),
              color 0.3s var(--ease-standard);
}

.loading-step.active {
  opacity: 1;
  transform: translateX(0);
  color: var(--color-text-primary);
}

.loading-step.completed {
  opacity: 0.6;
  color: var(--color-success);
}

.loading-step-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-step-icon .spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s var(--ease-standard) infinite;
}

.loading-step-icon .check-icon {
  color: var(--color-success);
  font-size: 16px;
  font-weight: 700;
}

/* =========================================
   Result Cards
   ========================================= */

.result-card {
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  animation: resultRevealSharp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.result-card .result-badge {
  display: inline-block;
  padding: 0.3em 0.8em;
  font-family: var(--font-tight);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  background: var(--color-surface);
  margin-bottom: var(--space-md);
}

.result-card .result-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-md);
}

.result-card .result-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-lg);
}

/* =========================================
   Form Input
   ========================================= */

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-primary);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* =========================================
   Category Badge
   ========================================= */

.category-badge {
  display: inline-block;
  padding: 0.4em 0.8em;
  font-family: var(--font-tight);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

/* =========================================
   Score Display
   ========================================= */

.score-display {
  text-align: center;
  margin: var(--space-xl) 0;
}

/* =========================================
   Company Story
   ========================================= */

.company-story {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
}

.company-story h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.company-story p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

/* =========================================
   Soft CTA
   ========================================= */

.soft-cta {
  display: inline-block;
  color: var(--color-primary);
  font-size: 14px;
  text-decoration: none;
}

.soft-cta:hover {
  text-decoration: underline;
}

/* =========================================
   Text Highlight
   ========================================= */

.text-highlight {
  color: var(--color-primary);
}

/* =========================================
   Ripple Effect
   ========================================= */

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

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

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

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

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

@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 resultRevealSharp {
  0% { opacity: 0; transform: translateX(30px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes cornerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { left: -100px; }
  100% { left: calc(100% + 100px); }
}

@keyframes progressShimmer {
  0% { left: -100px; }
  100% { left: calc(100% + 100px); }
}

@keyframes selectionGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 3, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255, 122, 3, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 3, 0); }
}

@keyframes resultReveal {
  0% { opacity: 0; transform: scale(0.95); }
  60% { transform: scale(1.01); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

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

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

@keyframes scoreReveal {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

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

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

/* =========================================
   Responsive Breakpoints
   ========================================= */

@media (min-width: 640px) {
  .quiz-container {
    padding: var(--space-xl);
  }

  .card-selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .quiz-container {
    padding: var(--space-2xl) var(--space-xl);
  }
}

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

  h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; }
  h2 { font-size: 28px; line-height: 1.2; }
  h3 { font-size: 24px; line-height: 1.25; }
  h4 { font-size: 20px; }
  h5 { font-size: 18px; }

  .quiz-container {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .toggle-container {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 16px 24px;
  }

  .result-card {
    padding: var(--space-lg);
  }

  .slider-labels {
    font-size: 11px;
  }
}

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

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