/*!
 * Personal Injury Whiz - CSS Framework
 * Version: 15.0.0 (Reorganized & Enhanced)
 *
 * TABLE OF CONTENTS:
 * ==================
 *
 * PART I: FOUNDATION
 * 1. Design System & CSS Variables
 * 2. Reset & Base Styles
 * 3. Accessibility Foundation
 *
 * PART II: CORE SYSTEMS
 * 4. Typography System
 * 5. Layout & Grid System
 * 6. Animation System
 *
 * PART III: COMPONENTS
 * 7. Form System
 * 8. Button Components
 * 9. Card Components
 * 10. Navigation Components
 * 11. Modal System
 * 12. Alert & Notification Components
 * 13. Icon System
 * 14. Progress Components
 * 15. Interactive Elements
 *
 * PART IV: PAGE-SPECIFIC STYLES
 * 16. Homepage Styles
 * 17. Assessment Pages
 * 17.1 Assessment Layout
 * 17.2 Basics Step
 * 17.3 Incident Step
 * 17.4 Detailed Step
 * 17.5 Legal Step
 * 17.6 Results Step
 * 18. Company Pages
 * 18.1 Accessibility Page
 * 18.2 Privacy Page
 * 18.3 Terms Page
 * 19. Resource Pages
 * 19.1 Bar Associations
 * 19.2 Case Types
 * 19.3 Glossary
 *
 * PART V: UTILITIES & HELPERS
 * 20. Responsive Design
 * 21. Print Styles
 * 22. High Contrast Mode
 * 23. Utility Classes
 * 24. JavaScript States
 *
 * Copyright (c) 2025 personalinjurywhiz.com
 */

/* ========================================
   PART I: FOUNDATION
   ======================================== */

/* =================
   1. DESIGN SYSTEM & CSS VARIABLES
   ================= */

:root {
  /* Brand Colors */
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --primary-25: #f8faff;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* Accent Colors */
  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-dark: #059669;
  --accent-violet: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-25: #fcfcfd;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Status Colors */
  --success: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  --success-50: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;
  --warning-50: #fffbeb;
  --error: #ef4444;
  --error-light: #f87171;
  --error-dark: #dc2626;
  --error-50: #fef2f2;
  --info: #3b82f6;
  --info-50: #eff6ff;

  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  /* Typography Scale */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Spacing Scale */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */

  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* FORCE LIGHT MODE ONLY - Dark Mode Disabled */
/* Override any dark mode preferences to enforce light mode across the website */
@media (prefers-color-scheme: dark) {
  :root {
    /* Force light mode color scheme - override system dark mode */
    color-scheme: light only;
    
    /* Keep all light mode colors even when system prefers dark */
    --white: #ffffff;
    --gray-25: #fcfcfd;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
  }
  
  /* Force light backgrounds and text colors */
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }
  
  /* Force light mode for all form elements */
  input, textarea, select, button {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
  }
  
  /* Force light mode for all cards and containers */
  .card, .container, .modal-container, .assessment-container {
    background: #ffffff !important;
    color: #111827 !important;
  }
}

/* Global Light Mode Enforcement */
/* Ensure light mode is enforced regardless of user preferences */
html {
  color-scheme: light only !important;
}

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

/* Force light mode on all common elements */
* {
  color-scheme: light only !important;
}

/* Ensure form elements stay light */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="range"], 
input[type="search"],
textarea, 
select {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #e5e7eb !important;
}

/* Force light mode on option elements */
option {
  background: #ffffff !important;
  color: #111827 !important;
}

/* Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: 0ms;
    --transition-fast: 0ms;
    --transition-slow: 0ms;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

html {
  line-height: 1.15;
  scroll-behavior: smooth;
  height: 100%;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 2rem;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

/* Remove default margins */
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
dl, dd, ol, ul, figure,
hr, fieldset, legend {
  margin: 0;
  padding: 0;
}

/* Remove list styles */
ol, ul {
  list-style: none;
}

/* Make images responsive */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements inherit font */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Remove button styling */
button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Remove link styling */
a {
  color: inherit;
  text-decoration: inherit;
}

/* Remove default focus outline */
*:focus {
  outline: none;
}

/* =================
   3. ACCESSIBILITY FOUNDATION
   ================= */

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100vh;
  left: var(--space-4);
  background: var(--gray-900);
  color: var(--white);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  border: 2px solid var(--primary-500);
  transition: all var(--transition);
  z-index: var(--z-toast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 3px solid var(--warning);
  outline-offset: 2px;
}

/* Focus visible styles */
:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
  position: relative;
  z-index: 10;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.2);
}

/* Required field indicator */
.required-indicator {
  color: var(--error);
  font-weight: 700;
  margin-left: var(--space-1);
}

/* ========================================
   PART II: CORE SYSTEMS
   ======================================== */

/* =================
   4. TYPOGRAPHY SYSTEM
   ================= */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h4 {
  font-size: var(--text-2xl);
  font-weight: 600;
}

h5 {
  font-size: var(--text-xl);
  font-weight: 600;
}

h6 {
  font-size: var(--text-lg);
  font-weight: 600;
}

/* Body text */
p {
  margin-bottom: var(--space-6);
  line-height: 1.7;
  color: var(--gray-600);
  font-weight: 400;
}

.lead {
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-600);
}

/* Links */
a {
  color: var(--primary-600);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
}

a:hover {
  color: var(--primary-500);
  text-decoration-thickness: 3px;
}

a:focus-visible {
  color: var(--primary-500);
  background-color: rgba(251, 191, 36, 0.1);
  padding: 0 var(--space-1);
  margin: 0 calc(-1 * var(--space-1));
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--gray-100);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  color: var(--gray-800);
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--primary-200);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  color: var(--gray-600);
  font-size: var(--text-lg);
}

/* =================
   5. LAYOUT & GRID SYSTEM
   ================= */

/* Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-sm { max-width: 640px; }
.container-md { max-width: 768px; }
.container-lg { max-width: 1024px; }
.container-xl { max-width: 1280px; }
.container-fluid { max-width: none; padding: 0 var(--space-4); }

/* Flexbox System */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

/* Auto-fit grids */
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-auto-md { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto-lg { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }

/* Gap utilities */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* =================
   6. ANIMATION SYSTEM
   ================= */

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

@keyframes pulse {
  0%, 100% {
    box-shadow: var(--shadow-sm), 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: var(--shadow-md), 0 0 0 10px rgba(59, 130, 246, 0);
    transform: translateY(-1px) scale(1.05);
  }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes criticalPulse {
  0%, 100% { box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 8px 35px rgba(220, 38, 38, 0.5); }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

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

@keyframes highlightPulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(59, 130, 246, 0.4),
      0 20px 25px -5px rgba(0, 0, 0, 0.1),
      0 8px 10px -6px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(59, 130, 246, 0.2),
      0 25px 30px -5px rgba(0, 0, 0, 0.15),
      0 12px 15px -6px rgba(0, 0, 0, 0.15);
  }
  100% {
    box-shadow:
      0 0 0 3px rgba(59, 130, 246, 0.3),
      0 20px 25px -5px rgba(0, 0, 0, 0.1),
      0 8px 10px -6px rgba(0, 0, 0, 0.1);
  }
}

@keyframes loading-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes gentle-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1);
  }
}

@keyframes checkmark-pop {
  0% { transform: scale(1.2); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1.2); }
}

@keyframes ready-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4), 0 0 0 8px rgba(37, 99, 235, 0.1);
  }
}

@keyframes gentle-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes numberUpdate {
  0% { background-color: #dbeafe; }
  100% { background-color: transparent; }
}

@keyframes pulseRed {
  0%, 100% { border-color: #ef4444; }
  50% { border-color: #dc2626; }
}

@keyframes pulseOrange {
  0%, 100% { border-color: #f59e0b; }
  50% { border-color: #d97706; }
}

/* Animation utility classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-in {
  animation: slideUp 0.6s ease-out forwards;
}

.loading {
  animation: loading-pulse 1.5s ease-in-out infinite;
}

.interactive:hover {
  transform: scale(1.02);
  transition: transform var(--transition-fast);
}

.interactive:active {
  transform: scale(0.98);
}

/* ========================================
   PART III: COMPONENTS
   ======================================== */

/* =================
   7. FORM SYSTEM
   ================= */

/* Base Form Elements */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  line-height: 1.5;
  transition: all var(--transition);
  background: var(--white);
  color: var(--gray-700);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--gray-100);
}

/* Number inputs - enhanced styling */
input[type="number"],
input[name$="_costs"],
input[name*="income"],
input[name="weeks_missed"] {
  min-width: 120px;
  text-align: right;
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
  transition: background-color 0.2s ease;
}

input[type="number"]:focus,
input[name$="_costs"]:focus,
input[name*="income"]:focus,
input[name="weeks_missed"]:focus {
  background-color: #f8fafc;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Remove number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Range Inputs */
input[type="range"] {
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--primary-500);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-600);
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--primary-500);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: none;
  transition: all var(--transition);
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-500);
  cursor: pointer;
  margin: 0;
}

/* Form Field Groups */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.form-field label {
  font-weight: 600;
  color: var(--gray-900);
  font-size: var(--text-sm);
  cursor: pointer;
  user-select: none;
}

/* Validation states */
.form-field.error input,
.form-field.error textarea,
.form-field.error select {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-field.success input,
.form-field.success textarea,
.form-field.success select {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.validation-error {
  color: var(--error);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.validation-success {
  color: var(--success);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Fieldsets and Legends */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
}

/* Labels */
label {
  cursor: pointer;
  user-select: none;
  display: block;
}

/* Helper text */
.helper-text {
  font-size: var(--text-xs);
  color: var(--gray-500);
  line-height: 1.4;
  margin-top: var(--space-1);
}

/* Form animations */
input.formatting {
  background-color: #f1f5f9;
  transition: background-color 0.1s ease;
}

input.formatted {
  background-color: #f0fdf4;
  transition: background-color 0.3s ease;
}

.number-updated {
  animation: numberUpdate 0.5s ease-out;
}

/* =================
   8. BUTTON COMPONENTS
   ================= */

/* Base Button Styles */
.btn,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-xl);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  min-height: 44px;
  white-space: nowrap;
  overflow: hidden;
}

/* Primary Button */
.btn,
.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px) scale(1.02);
}

.btn:active:not(:disabled),
.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

/* Secondary Button */
.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-800);
  transform: translateY(-1px) scale(1.02);
  box-shadow: var(--shadow-md);
}

/* Button Variants */
.btn-outline {
  background: transparent;
  color: var(--primary-600);
  border: 2px solid var(--primary-600);
  box-shadow: none;
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-600);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), var(--success-dark));
  color: var(--white);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), var(--warning-dark));
  color: var(--white);
}

.btn-error {
  background: linear-gradient(135deg, var(--error), var(--error-dark));
  color: var(--white);
}

/* Button Sizes */
.btn-xs {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  min-height: 32px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  min-height: 36px;
  border-radius: var(--radius-lg);
}

.btn-lg,
.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: 700;
  min-height: 56px;
  border-radius: var(--radius-2xl);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
  font-weight: 700;
  min-height: 64px;
  border-radius: var(--radius-2xl);
}

/* Button Icons */
.btn-icon,
.btn svg,
.btn-primary svg,
.btn-secondary svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Button States */
.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}

.btn.loading,
.btn-primary.loading,
.btn-secondary.loading {
  pointer-events: none;
  opacity: 0.8;
  color: transparent;
  position: relative;
}

.btn.loading::after,
.btn-primary.loading::after,
.btn-secondary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  color: var(--white);
}

.btn.pulse,
.btn-primary.pulse {
  animation: pulse 2s infinite;
}

/* Focus states for all buttons */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
  box-shadow: var(--shadow-md), 0 0 0 6px rgba(251, 191, 36, 0.2);
}

/* =================
   9. CARD COMPONENTS
   ================= */

/* Base Card */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
  /* Moved from rogue block: */
  padding: var(--space-8);
  margin: var(--space-8) 0;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}

.card-header {
  padding: var(--space-6) var(--space-6) 0;
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: 0 var(--space-6) var(--space-6);
  border-top: 1px solid var(--gray-100);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
}

/* Card Variants */
.card-elevated {
  box-shadow: var(--shadow-lg);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-primary {
  border-color: var(--primary-200);
  background: linear-gradient(135deg, var(--primary-50), var(--white));
}

.card-success {
  border-color: var(--success-light);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), var(--white));
}

.card-warning {
  border-color: var(--warning-light);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--white));
}

.card-error {
  border-color: var(--error-light);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), var(--white));
}

/* Feature Cards */
.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px -8px rgba(59, 130, 246, 0.15);
  border-color: var(--primary-200);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card > * {
  position: relative;
  z-index: 2;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-emerald));
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.feature-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--gray-900);
}

.feature-description {
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0;
}

/* Case Type Cards */
.case-type-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}

.case-type-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
}

.case-type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-emerald-light);
}

.case-type-card:hover::before {
  opacity: 1;
}

.case-type-card > * {
  position: relative;
  z-index: 2;
}

.case-type-icon {
  display: block;
  font-size: 3rem;
  margin: 0 auto var(--space-6);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.case-type-card:hover .case-type-icon {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.case-type-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--gray-900);
}

.case-type-description {
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 var(--space-4) 0;
}

.case-type-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-50), rgba(16, 185, 129, 0.05));
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  transition: all var(--transition);
}

.case-type-card:hover .case-type-preview {
  background: linear-gradient(135deg, var(--primary-100), rgba(16, 185, 129, 0.1));
  border-color: var(--primary-200);
  transform: translateY(-2px);
}

.preview-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
}

.preview-value {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--primary-600);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Floating Mobile CTA */
.floating-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.floating-cta.visible {
  transform: translateY(0);
  opacity: 1;
}

.floating-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
}

.floating-cta:active {
  transform: translateY(0);
}

.floating-cta svg {
  width: 18px;
  height: 18px;
}

/* Exit Intent Modal - CRITICAL: Hide by default to prevent FOUC */
.exit-intent-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.9) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2147483647 !important; /* Maximum z-index value */
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s ease !important;
  
  /* CRITICAL: Force hide until CSS loads */
  transform: translateY(-100vh) !important;
}

/* Only show modal when explicitly activated AND CSS is loaded */
.exit-intent-modal.active {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Attention-grabbing shake animation */
@keyframes attention-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.exit-intent-modal.attention-shake .exit-intent-content {
  animation: attention-shake 0.6s ease-in-out;
}

.exit-intent-content {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 550px;
  width: 95%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5), 0 0 0 5px rgba(255, 255, 255, 0.1);
  position: relative;
  border: 3px solid var(--primary-500);
}

.exit-intent-modal.active .exit-intent-content {
  transform: scale(1) translateY(0);
}

.exit-intent-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  font-size: var(--text-2xl);
  color: var(--gray-400);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exit-intent-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.exit-intent-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

.exit-intent-subtitle {
  color: var(--gray-600);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.exit-intent-benefits {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0;
  text-align: left;
}

.exit-intent-benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  color: var(--gray-700);
}

.exit-intent-benefits li svg {
  color: var(--success);
  flex-shrink: 0;
}

.exit-intent-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
}

/* Pulsing animation for primary button in exit intent */
@keyframes exit-intent-pulse {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.5), 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.8), 0 0 0 15px rgba(59, 130, 246, 0);
  }
}

.exit-intent-modal .btn-primary {
  animation: exit-intent-pulse 2s infinite;
  font-size: var(--text-lg);
  padding: var(--space-4) var(--space-8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exit-intent-modal .btn-secondary {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
}

/* Mobile-specific modal styling for iPhone 12 Mini and Safari */
@media (max-width: 768px) {
  /* Ensure modal is properly hidden on mobile until CSS loads */
  .exit-intent-modal:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-100vh) !important;
  }
  
  .exit-intent-content {
    padding: var(--space-6) !important;
    margin: var(--space-4) !important;
    width: calc(100vw - 2rem) !important;
    max-width: 400px !important;
    border-radius: var(--radius-xl) !important;
    /* Prevent content from being cut off */
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  
  .exit-intent-title {
    font-size: var(--text-xl) !important;
    margin-bottom: var(--space-3) !important;
  }
  
  .exit-intent-subtitle {
    font-size: var(--text-base) !important;
    margin-bottom: var(--space-4) !important;
  }
  
  .exit-intent-benefits {
    margin-bottom: var(--space-6) !important;
  }
  
  .exit-intent-benefits li {
    font-size: var(--text-sm) !important;
    padding: var(--space-2) 0 !important;
  }
  
  .exit-intent-buttons {
    flex-direction: column !important;
    gap: var(--space-3) !important;
  }
  
  .exit-intent-modal .btn-primary,
  .exit-intent-modal .btn-secondary {
    width: 100% !important;
    min-height: 48px !important;
    font-size: var(--text-base) !important;
    padding: var(--space-4) !important;
    justify-content: center !important;
  }
  
  .exit-intent-close {
    top: var(--space-3) !important;
    right: var(--space-3) !important;
    width: 36px !important;
    height: 36px !important;
    font-size: var(--text-lg) !important;
  }
}

/* Safari-specific modal fixes */
@supports (-webkit-touch-callout: none) {
  .exit-intent-modal {
    -webkit-transform: translateY(-100vh) !important;
  }
  
  .exit-intent-modal.active {
    -webkit-transform: translateY(0) !important;
  }
  
  .exit-intent-content {
    -webkit-transform: scale(0.9) translateY(20px);
    -webkit-backface-visibility: hidden;
  }
  
  .exit-intent-modal.active .exit-intent-content {
    -webkit-transform: scale(1) translateY(0);
  }
}

/* Social Proof Elements */
.social-proof {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  margin: var(--space-6) 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.social-proof-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-emerald));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: var(--text-lg);
}

.social-proof-content {
  flex: 1;
}

.social-proof-text {
  font-style: italic;
  color: var(--gray-700);
  margin-bottom: var(--space-1);
}

.social-proof-author {
  font-size: var(--text-sm);
  color: var(--gray-500);
  font-weight: 500;
}

.social-proof-rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.social-proof-rating svg {
  color: #fbbf24;
  width: 16px;
  height: 16px;
}

/* Real-time Activity Notifications */
.activity-notification {
  position: fixed;
  bottom: 100px;
  left: 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 320px;
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
}

.activity-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.activity-pulse {
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.activity-text {
  color: var(--gray-700);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.activity-location {
  font-weight: 600;
  color: var(--primary-600);
}

/* Enhanced Mobile Touch Interactions */
@media (max-width: 768px) {
  /* Larger touch targets for mobile */
  .btn-primary,
  .btn-secondary,
  .case-type-card,
  .feature-card,
  .faq-question {
    min-height: 48px;
    touch-action: manipulation;
  }
  
  /* Enhanced card interactions */
  .case-type-card,
  .feature-card {
    padding: var(--space-6);
    margin-bottom: var(--space-4);
  }
  
  .case-type-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  /* Mobile floating CTA adjustments */
  .floating-cta {
    bottom: 15px;
    right: 15px;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    min-height: 56px;
  }
  
  /* Touch-friendly FAQ */
  .faq-question {
    padding: var(--space-4);
    font-size: var(--text-base);
  }
  
  /* Hero section mobile enhancements */
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-4);
    width: 100%;
  }
  
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 56px;
    font-size: var(--text-lg);
  }
  
  /* Mobile trust indicators */
  .trust-indicators {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    text-align: center;
  }
  
  /* Social proof mobile layout */
  .social-proof {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }
  
  /* Activity notification mobile positioning */
  .activity-notification {
    left: 10px;
    right: 10px;
    bottom: 80px;
    max-width: none;
  }
  
  /* Exit intent modal mobile adjustments */
  .exit-intent-content {
    margin: var(--space-4);
    padding: var(--space-6);
    max-width: none;
    width: auto;
  }
  
  .exit-intent-buttons {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .exit-intent-buttons .btn-primary,
  .exit-intent-buttons .btn-secondary {
    width: 100%;
    min-height: 48px;
  }
}

/* Touch-specific enhancements */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .case-type-card:hover,
  .feature-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }
  
  /* Focus styles for touch navigation */
  .case-type-card:focus-visible,
  .feature-card:focus-visible {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
  }
  
  /* Touch-friendly ripple effects */
  .btn-primary:active,
  .btn-secondary:active {
    transform: scale(0.97);
  }
  
  /* Touch active states */
  .touch-active {
    transform: scale(0.98);
    opacity: 0.9;
    transition: all 0.1s ease;
  }
}

/* Swipe gesture support */
.swipe-container {
  touch-action: pan-x;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.swipe-item {
  scroll-snap-align: center;
  flex-shrink: 0;
}

/* Pull-to-refresh indicator (for supported browsers) */
@supports (overscroll-behavior: contain) {
  body {
    overscroll-behavior: contain;
  }
}

/* =================
   10. NAVIGATION COMPONENTS
   ================= */

/* Header Navigation */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all var(--transition);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--gray-900);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  transition: all var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
  color: var(--gray-900);
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: all var(--transition);
}

.logo:hover img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

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

.nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  transform: translateY(-1px);
  text-decoration: none;
}

.nav-link:focus-visible {
  background: var(--primary-50);
  color: var(--primary-700);
}

.nav-link.start-assessment-btn {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: var(--white);
  font-weight: 600;
  font-size: 14px !important;
  line-height: 1.5 !important;
  letter-spacing: normal !important;
}

.nav-link.start-assessment-btn:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  transform: translateY(-1px) scale(1.02);
}

/* Footer Navigation */
.footer {
  background: var(--gray-800);
  color: var(--gray-300);
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid var(--gray-700);
}

.footer-content {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-bottom {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section h3 {
  color: var(--white);
  font-weight: 600;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.footer-section p {
  color: var(--gray-300);
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}

.footer-link {
  color: var(--gray-300);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: block;
  margin-bottom: var(--space-2);
  padding: var(--space-1) 0;
  font-size: var(--text-base);
}

.footer-link:hover {
  color: var(--primary-400);
  text-decoration: none;
}

.footer-link:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
  color: var(--primary-400);
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-sm);
}

.footer-bottom {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  border-top: 1px solid var(--gray-700);
  padding-top: var(--space-8);
  text-align: center;
}

.footer-bottom p {
  color: var(--gray-400);
  font-size: var(--text-sm);
  margin: 0;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: var(--z-fixed);
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: var(--shadow-xl);
  transform: translateY(0) scale(1.1);
  text-decoration: none;
}

.back-to-top:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =================
   11. MODAL SYSTEM
   ================= */

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.modal-container {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: calc(100vh - 40px);
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
  padding: 32px 32px 24px;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 8px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  color: var(--gray-600);
  font-size: 16px;
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

/* Modal Progress */
.acknowledgment-progress {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
  border-bottom: 1px solid var(--primary-200);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-text {
  font-weight: 600;
  color: var(--primary-700);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-count {
  background: var(--primary-500);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  transition: all 0.3s ease;
}

.progress-count.complete {
  background: var(--success-500);
  transform: scale(1.1);
}

/* Modal Body */
.modal-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-300) var(--gray-100);
  scroll-behavior: smooth;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-300);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--primary-400);
}

.acknowledgments {
  padding: 24px 32px 32px;
}

/* Acknowledgment Items */
.acknowledgment-item {
  margin-bottom: 20px;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.acknowledgment-item:hover {
  border-color: var(--primary-300);
  background: #f8faff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.acknowledgment-item.selected {
  border-color: var(--success-500);
  background: var(--success-50);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

.acknowledgment-item.next-to-check {
  border-color: var(--primary-500);
  background: var(--primary-50);
  animation: gentle-pulse 2s ease-in-out infinite;
}

.acknowledgment-item:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.acknowledgment-label {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
}

.acknowledgment-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--success-500);
  transform: scale(1.2);
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.acknowledgment-checkbox:checked {
  animation: checkmark-pop 0.3s ease;
}

.acknowledgment-checkbox:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.acknowledgment-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-700);
  margin: 0;
}

.acknowledgment-text strong {
  display: block;
  color: var(--gray-900);
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 16px;
}

/* Modal Footer */
.modal-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
}

.modal-btn-primary {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.modal-btn-primary:hover:not(:disabled) {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.modal-btn-primary:disabled {
  opacity: 0.6;
  background: var(--gray-400);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.modal-btn-primary.ready {
  animation: ready-pulse 3s infinite;
}

.modal-btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.modal-btn-secondary:hover {
  background: var(--gray-300);
  border-color: var(--gray-400);
}

/* Modal Utility Classes */
.modal-overlay[aria-hidden="false"] {
  display: flex !important;
}

/* Force Light Mode for Modal - Dark Mode Disabled */
@media (prefers-color-scheme: dark) {
  .modal-container {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
  }

  .modal-header {
    background: #ffffff !important;
    color: #111827 !important;
  }

  .modal-title {
    color: #111827 !important;
  }

  .modal-subtitle {
    color: #6b7280 !important;
  }

  .acknowledgment-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
  }

  .acknowledgment-text {
    color: #6b7280 !important;
  }

  .acknowledgment-text strong {
    color: #111827 !important;
  }

  .modal-footer {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
  }

  .modal-btn-secondary {
    background: #f9fafb !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
  }
}

/* Accessibility improvements for modal reduced motion */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-container,
  .acknowledgment-item,
  .modal-btn {
    transition: none;
  }

  .modal-btn-primary.ready {
    animation: none;
  }

  .acknowledgment-item.next-to-check {
    animation: none;
  }
}

/* =================
   12. ALERT & NOTIFICATION COMPONENTS
   ================= */

/* Notification Cards */
/* Moved from rogue block: */
.notification-card {
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin: var(--space-6) 0;
  transition: all var(--transition);
  border: 2px solid;
}

.notification-card.has-icon {
  display: flex;
  gap: var(--space-4); /* Changed from 6 to 4 for consistency/compactness */
  align-items: flex-start;
}

.notification-card .notification-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.notification-card .notification-icon svg {
  width: 20px;
  height: 20px;
}

.notification-card .notification-content {
  flex: 1;
}

/* Notification Variants */
.notification-warning,
.warning-notice {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), var(--white));
  border: 2px solid var(--error-light);
}

.notification-warning .notification-icon,
.warning-notice .notification-icon {
  background: var(--error);
}

.notification-warning h3,
.notification-warning h4,
.warning-notice h3,
.warning-notice h4 {
  color: var(--error-dark);
}

.notification-info,
.referral-notice {
  background: linear-gradient(135deg, var(--primary-50), var(--white));
  border: 2px solid var(--primary-200);
}

.notification-info .notification-icon,
.referral-notice .notification-icon {
  background: var(--primary-500);
}

.notification-info h3,
.notification-info h4,
.referral-notice h3,
.referral-notice h4 {
  color: var(--primary-dark);
}

.notification-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), var(--white));
  border: 2px solid var(--success-light);
}

.notification-success .notification-icon {
  background: var(--success);
}

.notification-success h3,
.notification-success h4 {
  color: var(--success-dark);
}

/* SOL Warning Components */
.critical-sol-warning {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border: 3px solid #b91c1c;
  border-radius: 12px;
  margin: 20px 0;
  padding: 0;
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
  animation: criticalPulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.critical-sol-warning::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 3s ease-in-out infinite;
}

.critical-sol-content {
  padding: 24px;
  color: white;
  position: relative;
  z-index: 1;
}

.critical-sol-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.critical-sol-icon {
  font-size: 32px;
  animation: bounce 2s ease-in-out infinite;
}

.critical-sol-title {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.critical-sol-message {
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.critical-sol-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.sol-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sol-detail:last-child {
  margin-bottom: 0;
}

.sol-detail-label {
  font-weight: 600;
  opacity: 0.9;
}

.sol-detail-value {
  font-weight: 700;
}

.sol-detail-value.expired {
  color: #fecaca;
  text-transform: uppercase;
  font-weight: 800;
}

.sol-detail-value.critical {
  color: #fed7d7;
  font-weight: 800;
}

.critical-sol-action {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid white;
}

.critical-sol-action p {
  margin-bottom: 8px;
}

.critical-sol-action p:last-child {
  margin-bottom: 0;
}

.urgent-sol-warning {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border: 2px solid #d97706;
  border-radius: 10px;
  margin: 16px 0;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
}

.urgent-sol-content {
  padding: 20px;
  color: white;
}

.urgent-sol-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.urgent-sol-icon {
  font-size: 24px;
}

.urgent-sol-title {
  font-size: 18px;
  font-weight: 700;
}

.urgent-sol-recommendation {
  font-weight: 600;
  margin-top: 8px;
}

.urgent-sol-details {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 14px;
}

.days-remaining {
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.sol-warning-container {
  margin: 20px 0;
  border-radius: 8px;
  padding: 16px;
  display: none;
}

.sol-warning-container.critical {
  background: #fef2f2;
  border: 2px solid #dc2626;
  color: #7f1d1d;
}

.sol-warning-container.urgent {
  background: #fffbeb;
  border: 2px solid #f59e0b;
  color: #92400e;
}

/* =================
   13. ICON SYSTEM
   ================= */

.icon-container {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-6);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-emerald));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  flex-shrink: 0;
}

.icon-container svg {
  width: 24px;
  height: 24px;
}

/* Icon variants */
.icon-primary { background: linear-gradient(135deg, var(--primary-500), var(--primary-600)); }
.icon-success { background: linear-gradient(135deg, var(--success), var(--success-dark)); }
.icon-warning { background: linear-gradient(135deg, var(--warning), var(--warning-dark)); }
.icon-error { background: linear-gradient(135deg, var(--error), var(--error-dark)); }

/* Icon-content layout pattern */
.icon-content-layout {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  padding: var(--space-8);
}

.icon-content-layout .icon-container {
  margin: 0;
  width: 48px;
  height: 48px;
}

.icon-content-layout .card-body {
  padding: 0;
  flex: 1;
}

.icon-content-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* =================
   14. PROGRESS COMPONENTS
   ================= */

.progress-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.progress-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  text-align: center;
}

.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-emerald));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* =================
   15. INTERACTIVE ELEMENTS
   ================= */

/* Option Cards */
.option-card {
  display: block;
  cursor: pointer;
  border-radius: var(--radius-xl);
  transition: all var(--transition);
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card .option-content {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  transition: all var(--transition);
}

.option-card:hover .option-content {
  border-color: var(--primary-300);
  background: linear-gradient(135deg, var(--primary-25), var(--white));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.option-card input:checked + .option-content {
  border-color: var(--primary-500);
  background: linear-gradient(135deg, var(--primary-50), var(--white));
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--success);
}

.option-card input:focus + .option-content {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
}

.option-text {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.option-detail {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.4;
}

/* Checkbox Cards */
.checkbox-card {
  display: block;
  cursor: pointer;
  border-radius: var(--radius-xl);
  transition: all var(--transition);
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-card .checkbox-content {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  transition: all var(--transition);
}

.checkbox-card:hover .checkbox-content {
  border-color: var(--primary-300);
  background: linear-gradient(135deg, var(--primary-25), var(--white));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.checkbox-card input:checked + .checkbox-content {
  border-color: var(--primary-500);
  background: linear-gradient(135deg, var(--primary-50), var(--white));
  box-shadow: var(--shadow-md);
}

.checkbox-card input:focus + .checkbox-content {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
}

/* ========================================
   PART IV: PAGE-SPECIFIC STYLES
   ======================================== */

/* =================
   16. HOMEPAGE STYLES
   ================= */

/* Hero Section */
.hero,
.hero-section {
  background: linear-gradient(135deg,
    var(--primary-50) 0%,
    var(--white) 50%,
    rgba(16, 185, 129, 0.05) 100%);
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-20) var(--space-6);
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.hero::after,
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-600);
  margin-bottom: var(--space-8);
  backdrop-filter: blur(10px);
}

/* Hero Entrance Animations */
@keyframes heroEntrance {
  0% { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes counterUp {
  0% { 
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  100% { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  color: var(--gray-900);
  letter-spacing: -0.02em;
  animation: heroEntrance 0.8s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--gray-600);
  margin-bottom: var(--space-12);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 400;
  animation: heroEntrance 0.8s ease-out 0.4s both;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  animation: heroEntrance 0.8s ease-out 0.6s both;
}

/* Features Section */
.features {
  padding: var(--space-24) 0;
  background: var(--gray-25);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23e5e7eb" opacity="0.5"/></svg>') repeat;
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.3;
}

.features .container {
  position: relative;
  z-index: 1;
}

/* Case Types Section */
.case-types {
  padding: var(--space-24) 0;
  background: var(--white);
  position: relative;
}

.case-types::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.case-types .container {
  position: relative;
  z-index: 1;
}

/* FAQ Section */
.faq {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, var(--gray-25) 0%, var(--white) 100%);
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-4);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.faq-item.active {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-lg);
}

.faq-question {
  width: 100%;
  padding: var(--space-6);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  transition: all var(--transition);
}

.faq-question:hover {
  background: var(--gray-25);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--gray-500);
  transition: all var(--transition);
  flex-shrink: 0;
}

.faq-item.active .faq-question svg {
  color: var(--primary-600);
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--space-6);
  color: var(--gray-600);
  line-height: 1.6;
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 var(--space-6) var(--space-6);
  opacity: 1;
  visibility: visible;
}

.faq-answer p {
  margin: 0;
  padding-top: var(--space-2);
}

/* Stats Section */
.stats {
  padding: var(--space-20) 0;
  background: var(--white);
  position: relative;
}

.stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.stats .container {
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: var(--space-8);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-50) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-200);
}

.stat-item:hover::before {
  opacity: 1;
}

.stat-item > * {
  position: relative;
  z-index: 1;
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--primary-600);
  margin-bottom: var(--space-2);
  display: block;
  line-height: 1;
}

.stat-label {
  color: var(--gray-600);
  font-weight: 500;
  font-size: var(--text-base);
  margin: 0;
}

/* CTA Section */
.cta {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg,
    var(--primary-50) 0%,
    rgba(16, 185, 129, 0.05) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.cta::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta-card {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-16);
  border-radius: var(--radius-3xl);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-2xl);
  position: relative;
}

.cta-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  line-height: 1.2;
  color: var(--gray-900);
}

.cta-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  margin-bottom: var(--space-8);
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.cta-feature {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  background: rgba(255, 255, 255, 0.8);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
}

.cta-feature svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* Trust indicators */
.trust-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: var(--space-8);
  animation: heroEntrance 0.8s ease-out 0.8s both;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-3) var(--space-4);
  color: var(--gray-600);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.trust-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
  background: var(--white);
}

.trust-icon {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--primary-100);
  color: var(--primary-700);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  border: 1px solid var(--primary-200);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

/* =================
   17. ASSESSMENT PAGES
   ================= */

/* 17.1 Assessment Layout */
.assessment-container {
  padding: var(--space-8) var(--space-6);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding-top: max(var(--space-8), 2rem);
  scroll-margin-top: 2rem;
  min-height: 100vh;
  background: linear-gradient(135deg,
    var(--primary-50) 0%,
    var(--white) 50%,
    rgba(16, 185, 129, 0.03) 100%);
}

.assessment-progress {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 20;
}

.assessment-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  text-align: center;
}

.assessment-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  text-align: center;
  margin-bottom: var(--space-12);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

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

.question-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.question-section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.question-section .section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gray-900);
  text-align: left;
}

.section-icon {
  font-size: 1.5rem;
  color: var(--primary-500);
}

.question-group {
  margin-bottom: var(--space-8);
  scroll-margin-top: 6rem;
}

.question-group:first-of-type {
  scroll-margin-top: 2rem;
}

.question-group.highlighted {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.3),
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-500);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), var(--white));
  animation: highlightPulse 2s ease-out;
}

.question-title {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.4;
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--primary-500);
  color: var(--white);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
}

.question-description {
  color: var(--gray-600);
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.conditional-question {
  transition: all var(--transition);
}

.conditional-question[style*="display: none"] {
  display: none !important;
}

/* Assessment grids */
.checkbox-grid,
.expense-grid,
.activity-grid,
.emotional-grid,
.future-care-grid,
.wage-input-grid {
  display: grid;
  gap: var(--space-4);
}

.checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.expense-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: var(--space-8);
}

.activity-grid,
.emotional-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

.future-care-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.wage-input-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

/* Assessment navigation */
.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--gray-200);
  scroll-margin-top: 4rem;
}

.assessment-back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-xl);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  transition: all var(--transition);
  cursor: pointer;
  min-width: 120px;
  justify-content: center;
}

.assessment-back-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

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

.assessment-back-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  border-color: var(--primary-500);
}

.assessment-back-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* 17.2 Basics Step - No specific styles needed */

/* 17.3 Incident Step - No specific styles needed */

/* 17.4 Detailed Step */
.expense-item input,
.wage-details-grid input {
  width: 100%;
  max-width: 200px;
}

/* 17.5 Legal Step - No specific styles needed */

/* 17.6 Results Step */
.settlement-range {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.range-item {
  flex: 1;
  min-width: 150px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s ease;
}

.range-item:hover {
  transform: translateY(-2px);
}

.range-item.conservative {
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  border-left: 4px solid #d97706;
}

.range-item.likely {
  background: linear-gradient(135deg, #dcfce7, #22c55e);
  border-left: 4px solid #16a34a;
}

.range-item.optimistic {
  background: linear-gradient(135deg, #dbeafe, #3b82f6);
  border-left: 4px solid #2563eb;
}

.range-item label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
  opacity: 0.8;
}

.range-item .amount {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

/* Case Strength Display */
.case-strength {
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.case-strength.normal {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 2px solid #0ea5e9;
}

.case-strength.time-barred {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #ef4444;
  animation: pulseRed 2s infinite;
}

.case-strength.critical-urgency {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #f59e0b;
  animation: pulseOrange 2s infinite;
}

.strength-score {
  font-size: 48px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
}

.case-strength.normal .strength-score {
  color: #0ea5e9;
}

.case-strength.time-barred .strength-score {
  color: #ef4444;
}

.case-strength.critical-urgency .strength-score {
  color: #f59e0b;
}

.strength-explanation {
  font-size: 16px;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 15px;
}

.original-merits {
  background: rgba(0, 0, 0, 0.05);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #6b7280;
  font-style: italic;
}

/* Urgent Warnings */
.urgent-warning {
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  border-left: 4px solid;
}

.urgent-warning.critical {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.urgent-warning.high {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.urgent-warning.moderate {
  background: #f0f9ff;
  border-color: #3b82f6;
  color: #1e40af;
}

.warning-message {
  font-weight: 600;
  margin-bottom: 5px;
}

.warning-action {
  font-size: 14px;
  opacity: 0.9;
}

/* SOL Status Display */
.sol-status {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.sol-status.ok {
  background: #f0fdf4;
  border: 1px solid #22c55e;
}

.sol-status.urgent {
  background: #fffbeb;
  border: 1px solid #f59e0b;
}

.sol-status.critical {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  animation: pulseOrange 2s infinite;
}

.sol-status.expired {
  background: #fef2f2;
  border: 1px solid #ef4444;
  animation: pulseRed 2s infinite;
}

.sol-icon {
  font-size: 24px;
  margin-right: 15px;
}

.sol-details {
  flex: 1;
}

.sol-status-text {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 5px;
}

.sol-message {
  font-size: 14px;
  margin-bottom: 5px;
  color: #4b5563;
}

.sol-recommendation {
  font-size: 13px;
  font-style: italic;
  color: #6b7280;
}

/* =================
   18. COMPANY PAGES
   ================= */

/* Page Headers (shared across company pages) */
.page-header {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 100%);
  padding: var(--space-16) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23ffffff" opacity="0.1"/></svg>') repeat;
  background-size: 50px 50px;
  pointer-events: none;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  font-weight: 800;
}

.page-header p {
  font-size: var(--text-lg);
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 18.1 Accessibility Page - No specific styles needed */

/* 18.2 Privacy Page - No specific styles needed */

/* 18.3 Terms Page - No specific styles needed */

/* =================
   19. RESOURCE PAGES
   ================= */

/* 19.1 Bar Associations - No specific styles needed */

/* 19.2 Case Types - No specific styles needed */

/* 19.3 Glossary */
.glossary-nav {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  margin: var(--space-6) 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
  z-index: var(--z-dropdown);
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.nav-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-8);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  background: var(--white);
  transition: var(--transition-fast);
}

.search-icon {
  position: absolute;
  left: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  width: 16px;
  height: 16px;
}

.clear-search {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  background: var(--gray-200);
  border: none;
  border-radius: var(--radius-full);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0;
  visibility: hidden;
}

.clear-search:hover {
  background: var(--gray-300);
}

.clear-search.visible {
  opacity: 1;
  visibility: visible;
}

.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  justify-content: center;
}

.alphabet-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-xs);
  transition: var(--transition-fast);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

.alphabet-link:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-700);
  transform: translateY(-1px);
  text-decoration: none;
}

.alphabet-link.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--white);
}

.alphabet-link:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 2px;
}

/* ========================================
   PART V: UTILITIES & HELPERS
   ======================================== */

/* =================
   20. RESPONSIVE DESIGN
   ================= */

/* Tablet (768px and down) */
@media (max-width: 768px) {
  /* Navigation */
  .navigation {
    flex-direction: column;
    gap: var(--space-4);
  }

  .navigation .btn,
  .assessment-back-btn {
    width: 100%;
    justify-content: center;
    order: 2;
  }

  .assessment-back-btn {
    order: 1;
    margin-bottom: var(--space-2);
  }

  .nav {
    display: none;
  }

  .header-content {
    padding: var(--space-3) var(--space-4);
  }

  .logo img {
    height: 36px;
  }

  /* Grid layouts */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Hero section */
  .hero,
  .hero-section {
    padding: var(--space-16) var(--space-4);
    min-height: 80vh;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn,
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Trust indicators */
  .trust-indicators {
    flex-direction: column;
    gap: var(--space-4);
  }

  /* Stats section */
  .stats .container > div {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* CTA section */
  .cta-card {
    padding: var(--space-8);
    margin: 0 var(--space-4);
  }

  .cta-features {
    flex-direction: column;
    gap: var(--space-3);
  }

  /* Page header */
  .page-header {
    padding: var(--space-12) 0;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Grid systems */
  .grid-auto,
  .grid-auto-sm,
  .grid-auto-md,
  .grid-auto-lg {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  /* Notifications */
  .notification-card.has-icon {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Assessment */
  .assessment-container {
    padding: var(--space-6) var(--space-4);
    padding-top: max(var(--space-6), 1.5rem);
  }

  .checkbox-grid,
  .expense-grid,
  .future-care-grid {
    grid-template-columns: 1fr;
  }

  .question-title {
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start;
  }

  .wage-input-grid {
    grid-template-columns: 1fr;
  }

  .activity-grid,
  .emotional-grid {
    grid-template-columns: 1fr;
  }

  .question-group {
    scroll-margin-top: 4rem;
  }

  /* Back to top */
  .back-to-top {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 48px;
    height: 48px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }

  /* Icon content layout */
  .icon-content-layout {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }

  /* SOL warnings */
  .critical-sol-content,
  .urgent-sol-content {
    padding: 16px;
  }

  .critical-sol-title {
    font-size: 16px;
  }

  .critical-sol-icon {
    font-size: 24px;
  }

  .sol-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .urgent-sol-details {
    flex-direction: column;
    gap: 8px;
  }

  /* Glossary Navigation */
  .nav-header {
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
  }

  .nav-title {
    text-align: center;
    font-size: var(--text-base);
  }

  .search-box {
    max-width: none;
  }

  .alphabet-link {
    width: 24px;
    height: 24px;
    font-size: var(--text-xs);
  }

  /* Modal responsive */
  .modal-overlay {
    padding: 10px;
  }

  .modal-container {
    border-radius: 12px;
    max-height: calc(100vh - 20px);
  }

  .modal-header {
    padding: 24px 20px 20px;
  }

  .modal-title {
    font-size: 24px;
  }

  .acknowledgment-progress {
    padding: 12px 20px;
  }

  .acknowledgments {
    padding: 16px 20px 24px;
  }

  .acknowledgment-label {
    padding: 20px 16px;
    gap: 12px;
  }

  .acknowledgment-text {
    font-size: 14px;
  }

  .modal-footer {
    padding: 20px;
    flex-direction: column;
    gap: 12px;
  }

  .modal-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile (480px and down) */
@media (max-width: 480px) {
  /* Container */
  .container {
    padding: 0 var(--space-4);
  }

  /* Logo */
  .logo img {
    height: 32px;
  }

  /* Hero */
  .hero,
  .hero-section {
    padding: var(--space-12) var(--space-4);
    min-height: 70vh;
  }

  /* Sections */
  .section-header {
    margin-bottom: var(--space-12);
  }

  .features {
    padding: var(--space-16) 0;
  }

  .case-types {
    padding: var(--space-16) 0;
  }

  .faq {
    padding: var(--space-16) 0;
  }

  .stats {
    padding: var(--space-12) 0;
  }

  .cta {
    padding: var(--space-16) 0;
  }

  /* Cards */
  .card,
  .feature-card,
  .case-type-card {
    padding: var(--space-6);
  }

  /* Buttons */
  .btn,
  .btn-primary,
  .btn-secondary,
  .nav-link {
    min-height: 48px;
    min-width: 48px;
  }

  /* Stats */
  .stats .container > div {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-6);
  }

  .notification-card {
    padding: var(--space-6);
  }

  /* Assessment */
  .checkbox-card .checkbox-content,
  .option-card .option-content {
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .section-header {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  /* Glossary Navigation */
  .nav-header {
    gap: var(--space-2);
  }

  .search-input {
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-6);
  }

  .search-icon {
    width: 14px;
    height: 14px;
  }

  .alphabet-link {
    width: 20px;
    height: 20px;
  }
}

/* =================
   21. PRINT STYLES
   ================= */

@media print {
  * {
    background: white !important;
    color: black !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  .header,
  .nav,
  .btn,
  .btn-primary,
  .btn-secondary,
  .back-to-top,
  .assessment-back-btn,
  .glossary-nav {
    display: none !important;
  }

  .card,
  .feature-card,
  .case-type-card,
  .question-section {
    border: 2px solid black !important;
    background: white !important;
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  a {
    text-decoration: underline !important;
    color: black !important;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: black !important;
  }

  .hero,
  .hero-section {
    background: white !important;
    color: black !important;
    min-height: auto !important;
    padding: 2rem !important;
  }

  footer {
    background: white !important;
    color: black !important;
    border-top: 2px solid black !important;
  }

  .page-header {
    background: white !important;
    color: black !important;
  }

  .notification-card {
    border: 2px solid black !important;
    background: white !important;
    color: black !important;
  }

  .assessment-container {
    padding: 1rem !important;
  }

  .question-group {
    page-break-inside: avoid;
  }

  .navigation {
    display: none !important;
  }
}

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

@media (prefers-contrast: high) {
  :root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --gray-200: #d1d5db;
    --gray-300: #9ca3af;
  }

  .card,
  .feature-card,
  .case-type-card {
    border-width: 3px;
  }

  .btn,
  .btn-primary,
  .btn-secondary {
    border: 2px solid currentColor;
  }

  .question-group.highlighted {
    border: 3px solid #000;
    background: #ffff00;
    box-shadow: none;
  }

  .assessment-back-btn {
    border-width: 3px;
  }

  .option-card .option-content,
  .checkbox-card .checkbox-content {
    border-width: 3px;
  }

  .alphabet-link {
    border-width: 2px;
  }

  .alphabet-link.active {
    border-width: 3px;
  }

  .acknowledgment-item {
    border-width: 3px;
  }

  .acknowledgment-item:hover,
  .acknowledgment-item.selected {
    border-width: 3px;
  }
}

/* =================
   23. UTILITY CLASSES
   ================= */

/* Display utilities */
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

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

/* Font sizes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

/* Font weights */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Colors */
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-muted { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }
.text-gray-900 { color: var(--gray-900); }
.text-white { color: var(--white); }

/* Background colors */
.bg-primary { background-color: var(--primary-500); }
.bg-primary-50 { background-color: var(--primary-50); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-error { background-color: var(--error); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-white { background-color: var(--white); }
.bg-transparent { background-color: transparent; }

/* Spacing utilities */
.m-0 { margin: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.ml-4 { margin-left: var(--space-4); }
.mr-4 { margin-right: var(--space-4); }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.pt-4 { padding-top: var(--space-4); }
.pb-4 { padding-bottom: var(--space-4); }
.pl-4 { padding-left: var(--space-4); }
.pr-4 { padding-right: var(--space-4); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.h-auto { height: auto; }
.min-h-screen { min-height: 100vh; }

/* Borders */
.border { border: 1px solid var(--gray-200); }
.border-0 { border: none; }
.border-primary { border-color: var(--primary-500); }
.border-gray-200 { border-color: var(--gray-200); }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Transitions */
.transition { transition: all var(--transition); }
.transition-fast { transition: all var(--transition-fast); }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* User select */
.select-none { user-select: none; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Z-index */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* =================
   24. JAVASCRIPT STATES
   ================= */

/* JavaScript/No-JS States */
.js-only { display: block; }
.no-js .js-only { display: none !important; }
.no-js-show { display: none; }
.no-js .no-js-show { display: block !important; }

/* =================
   25. MOBILE NAVIGATION FALLBACK
   ================= */

/* Mobile header is now directly embedded - no fallback needed */

/* Ensure main content has proper spacing on mobile */
@media (max-width: 768px) {
  main {
    min-height: calc(100vh - 60px);
    padding-top: var(--space-4);
  }
  
  /* Assessment pages specific adjustments */
  .assessment-main,
  .main-content {
    padding-top: var(--space-6);
  }
  
  /* Homepage hero adjustments for mobile */
  .hero,
  .hero-section {
    padding-top: var(--space-8);
    margin-top: 0;
  }
}

/* Mobile-specific button improvements */
@media (max-width: 480px) {
  /* Ensure all interactive elements are touch-friendly */
  .btn,
  .btn-primary,
  .btn-secondary,
  .case-type-card,
  .feature-card,
  .faq-question,
  .option-card,
  .checkbox-card {
    min-height: 48px;
    min-width: 48px;
  }
  
  /* Improve button text readability */
  .btn-primary {
    font-size: var(--text-base);
    font-weight: 600;
    padding: var(--space-4) var(--space-6);
  }
  
  /* Better spacing for assessment forms */
  .assessment-container {
    padding: var(--space-4) var(--space-3);
  }
  
  .question-group,
  .question-section {
    padding: var(--space-5);
    margin-bottom: var(--space-6);
  }
  
  /* Mobile-optimized progress indicators */
  .progress-indicators {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .indicator {
    flex-basis: calc(50% - var(--space-1));
    min-width: 100px;
  }
  
  .indicator .label {
    font-size: var(--text-xs);
    white-space: nowrap;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects that don't work on touch */
  .case-type-card:hover,
  .feature-card:hover,
  .btn:hover {
    transform: none;
  }
  
  /* Improve active states for touch */
  .case-type-card:active,
  .feature-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  .btn:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
  }
}

/* =================
   26. SAFARI-SPECIFIC FIXES
   ================= */

/* Safari mobile viewport fixes */
@supports (-webkit-touch-callout: none) {
  /* Safari iOS specific styles */
  
  /* Fix Safari's 100vh issue with address bar */
  .min-h-screen,
  .hero,
  .hero-section {
    min-height: -webkit-fill-available;
  }
  
  /* Safari button appearance fixes */
  .btn,
  .btn-primary,
  .btn-secondary,
  input[type="submit"],
  button {
    -webkit-appearance: none;
    -webkit-border-radius: 0;
    border-radius: var(--radius-xl);
  }
  
  /* Safari form input fixes */
  input,
  select,
  textarea {
    -webkit-appearance: none;
    -webkit-border-radius: 0;
    border-radius: var(--radius-lg);
  }
  
  /* Safari backdrop-filter fallback */
  .assessment-progress,
  #header-placeholder:empty::before {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  
  /* Safari sticky positioning fixes */
  .assessment-progress {
    position: -webkit-sticky;
    position: sticky;
  }
  
  /* Safari transform and animation fixes */
  .btn,
  .case-type-card,
  .feature-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* Safari desktop specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-color-index: 0) {
  /* Safari desktop button fixes */
  .btn-primary {
    -webkit-appearance: none;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  }
}

/* WebKit scrollbar styling for better mobile experience */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Fix Safari's CSS :has() selector fallback for older versions */
@supports not (selector(:has(*))) {
  /* Fallback for Safari versions that don't support :has() */
  @media (max-width: 768px) {
    body {
      padding-top: 60px;
    }
  }
}

/* Safari font rendering improvements */
body,
.btn,
.assessment-title,
.question-title {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Safari safe area insets for newer iPhones */
@supports (padding: max(0px)) {
  .container,
  .assessment-container {
    padding-left: max(var(--space-4), env(safe-area-inset-left));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
  }
  
  #header-placeholder:empty::after {
    padding-left: max(var(--space-4), env(safe-area-inset-left));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
  }
}


