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

:root {
    /* Modern Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --accent: #06b6d4;
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    
    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Typography */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-light) 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

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

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

@media (min-width: 1024px) {
    .container {
        max-width: 800px;
        padding: var(--space-8);
    }
}

/* Ensure smooth scrolling to top for all transitions */
html {
    scroll-behavior: smooth;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding-top: var(--space-6);
}

.logo {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.025em;
}

.nav-tabs {
    display: flex;
    gap: var(--space-6);
    justify-content: center;
    margin-top: var(--space-4);
}

.nav-tab {
    color: var(--gray-500);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding-bottom: var(--space-1);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: var(--primary);
}

.nav-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Progress Bar */
.progress-container {
    margin-bottom: var(--space-8);
}

.progress-text {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-bottom: var(--space-3);
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    width: 20%;
    transition: width 0.3s ease;
    position: relative;
}

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

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

/* Force immediate scroll to top on page transitions */
.htmx-swapping {
    opacity: 0.6;
    transform: translateY(20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Main Card */
.card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
    flex-grow: 1;
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

@media (max-width: 639px) {
    .card {
        padding: var(--space-6);
        border-radius: var(--radius-xl);
        margin: 0 -var(--space-2);
    }
}

.card-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    letter-spacing: -0.025em;
}

.card-subtitle {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    margin-bottom: var(--space-8);
    line-height: 1.5;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-8);
}

.form-label {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.radio-option {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.radio-option:hover {
    border-color: var(--primary-light);
    background: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.radio-input {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    margin-right: var(--space-4);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-label {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--gray-700);
    flex-grow: 1;
}

/* Radio button customization using :has() selector */
.radio-option:has(.radio-input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.radio-option:has(.radio-input:checked) .radio-custom {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-option:has(.radio-input:checked) .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radio-option:has(.radio-input:checked) .radio-label {
    color: var(--gray-900);
}

/* Multi-select and checkbox styling */
.checkbox-group,
.single-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.checkbox-option:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

/* CSS-first approach: Style parent based on child checkbox state */
.checkbox-option:has(.checkbox-input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.checkbox-input {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-option:has(.checkbox-input:checked) .checkbox-custom {
    border-color: var(--primary);
    background: var(--primary);
}

.checkbox-option:has(.checkbox-input:checked) .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-55%, -60%) rotate(45deg);
}

.checkbox-label {
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--gray-900);
    cursor: pointer;
}

.checkbox-option:has(.checkbox-input:checked) .checkbox-label {
    color: var(--primary-dark);
    font-weight: 500;
}

/* Single checkbox variant (for consent, agreements, etc.) */
.single-checkbox-group .checkbox-option {
    border: none;
    padding: var(--space-2) 0;
    background: transparent;
}

.single-checkbox-group .checkbox-option:hover {
    border: none;
    box-shadow: none;
    background: transparent;
}

.single-checkbox-group .checkbox-option:has(.checkbox-input:checked) {
    border: none;
    background: transparent;
    box-shadow: none;
}

/* Buttons */
.button-group {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.btn {
    padding: var(--space-4) var(--space-6);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

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

.btn-secondary:hover {
    background: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

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

@media (max-width: 639px) {
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* Text input and textarea styling - FIXED VERSION FOR RED BORDER ISSUE */
.text-input {
    width: 100%;
    min-height: 120px;
    padding: var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-sans);
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
    background: white;
    color: var(--gray-800);
}

.text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.text-input:hover:not(:focus) {
    border-color: var(--gray-400);
}

/* Only show error styling when explicitly marked with error class */
.form-group.has-error .text-input,
.text-input.error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.text-input::placeholder {
    color: var(--gray-500);
    opacity: 1;
}

/* Results Page Specific Styles */
.results-header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
}

.completion-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--success);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.completion-icon {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--success);
}

.results-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    letter-spacing: -0.025em;
}

.results-subtitle {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    margin-bottom: var(--space-6);
}

/* Score Display */
.score-display {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-4);
}

.score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 113;
    animation: drawScore 2s ease-out;
}

@keyframes drawScore {
    from {
        stroke-dashoffset: 283;
    }
    to {
        stroke-dashoffset: 113;
    }
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.score-label {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    font-weight: 500;
}

/* Card Icons */
.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.card-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.card-icon.success {
    background: #dcfce7;
    color: var(--success);
}

.card-icon.warning {
    background: #fef3c7;
    color: var(--warning);
}

.card-description {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.card-content {
    color: var(--gray-700);
    line-height: 1.6;
}

/* Category Scores */
.category-scores {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.category-info {
    flex-grow: 1;
}

.category-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.category-description {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.category-score {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-4);
}

.score-bar {
    width: 60px;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 1s ease-out;
}

.score-fill.excellent { background: var(--success); }
.score-fill.good { background: var(--accent); }
.score-fill.average { background: var(--warning); }
.score-fill.poor { background: var(--error); }

.score-value {
    font-weight: 600;
    color: var(--gray-900);
    font-size: var(--font-size-sm);
    min-width: 30px;
    text-align: right;
}

/* Recommendations */
.recommendation-list {
    list-style: none;
    padding: 0;
}

.recommendation-item {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
}

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

.recommendation-icon {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    margin-top: var(--space-1);
}

.recommendation-content {
    flex-grow: 1;
}

.recommendation-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

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

/* Action Buttons */
.action-buttons {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

@media (min-width: 640px) {
    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }
}

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

/* Animations */
.slide-up {
    animation: slideUp 0.8s ease-out;
}

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

/* Spinner animation for loading states */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* Mobile optimizations for results page */
@media (max-width: 639px) {
    .results-title {
        font-size: var(--font-size-2xl);
    }
    
    .score-display {
        width: 100px;
        height: 100px;
    }
    
    .category-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
    
    .category-score {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .score-bar {
        flex-grow: 1;
        max-width: 120px;
    }
}

/* Mobile optimizations */
@media (max-width: 639px) {
    .container {
        padding: var(--space-3);
    }
    
    .header {
        margin-bottom: var(--space-6);
        padding-top: var(--space-4);
    }
    
    .logo {
        font-size: var(--font-size-2xl);
    }
    
    .card-title {
        font-size: var(--font-size-xl);
    }
    
    .form-label {
        font-size: var(--font-size-base);
    }
    
    .radio-option {
        padding: var(--space-3);
    }
}

/* Touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .radio-option {
        min-height: 52px;
    }
    
    .btn {
        min-height: 52px;
    }
}

/* REMOVE ALL HOMEPAGE SECTION STYLES - Let inline styles handle everything */

/* Remove these problematic sections completely: */
/* .hero-section, .stats-section, .features-section, .cta-section */
/* All the complex positioning, viewport width tricks, and background decorations */

/* Only keep essential component styles that don't affect layout: */

/* Progress Bar */
.progress-container {
    margin-bottom: var(--space-8);
}

.progress-text {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-bottom: var(--space-3);
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    width: 20%;
    transition: width 0.3s ease;
    position: relative;
}

/* Text input and textarea styling */
.text-input {
    width: 100%;
    min-height: 120px;
    padding: var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
    background: white;
}

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

/*
.text-input:invalid {
    border-color: var(--error);
}
*/


.text-input::placeholder {
    color: var(--gray-500);
    opacity: 1;
}

/* Form group with error state */
.form-group.has-error .text-input {
    border-color: var(--error);
}

/* Mobile responsive textarea */
@media (max-width: 768px) {
    .text-input {
        min-height: 100px;
        padding: var(--space-3);
        font-size: var(--font-size-sm);
    }
}

/* Results Page Specific Styles */
.results-header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
}

.completion-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--success);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.completion-icon {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--success);
}

.results-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    letter-spacing: -0.025em;
}

.results-subtitle {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    margin-bottom: var(--space-6);
}

/* Score Display */
.score-display {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-4);
}

.score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 113;
    animation: drawScore 2s ease-out;
}

@keyframes drawScore {
    from {
        stroke-dashoffset: 283;
    }
    to {
        stroke-dashoffset: 113;
    }
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.score-label {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    font-weight: 500;
}

/* Card Icons */
.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.card-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.card-icon.success {
    background: #dcfce7;
    color: var(--success);
}

.card-icon.warning {
    background: #fef3c7;
    color: var(--warning);
}

.card-description {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.card-content {
    color: var(--gray-700);
    line-height: 1.6;
}

/* Category Scores */
.category-scores {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.category-info {
    flex-grow: 1;
}

.category-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.category-description {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.category-score {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-4);
}

.score-bar {
    width: 60px;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 1s ease-out;
}

.score-fill.excellent { background: var(--success); }
.score-fill.good { background: var(--accent); }
.score-fill.average { background: var(--warning); }
.score-fill.poor { background: var(--error); }

.score-value {
    font-weight: 600;
    color: var(--gray-900);
    font-size: var(--font-size-sm);
    min-width: 30px;
    text-align: right;
}

/* Recommendations */
.recommendation-list {
    list-style: none;
    padding: 0;
}

.recommendation-item {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
}

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

.recommendation-icon {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    margin-top: var(--space-1);
}

.recommendation-content {
    flex-grow: 1;
}

.recommendation-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

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

/* Action Buttons */
.action-buttons {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

@media (min-width: 640px) {
    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }
}

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

/* Animations */
.slide-up {
    animation: slideUp 0.8s ease-out;
}

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

/* Spinner animation for loading states */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* Mobile optimizations for results page */
@media (max-width: 639px) {
    .results-title {
        font-size: var(--font-size-2xl);
    }
    
    .score-display {
        width: 100px;
        height: 100px;
    }
    
    .category-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
    
    .category-score {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .score-bar {
        flex-grow: 1;
        max-width: 120px;
    }
}

/* Mobile optimizations */
@media (max-width: 639px) {
    .container {
        padding: var(--space-3);
    }
    
    .header {
        margin-bottom: var(--space-6);
        padding-top: var(--space-4);
    }
    
    .logo {
        font-size: var(--font-size-2xl);
    }
    
    .card-title {
        font-size: var(--font-size-xl);
    }
    
    .form-label {
        font-size: var(--font-size-base);
    }
    
    .radio-option {
        padding: var(--space-3);
    }
}

/* Touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .radio-option {
        min-height: 52px;
    }
    
    .btn {
        min-height: 52px;
    }
}