/* GrantCompass v2.0 - Professional Modern Design System */

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    min-height: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-300);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-md);
}

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

.loading-container p {
    color: var(--gray-600);
    font-size: var(--text-base);
    margin: 0;
}

/* Error States */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    min-height: 300px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin: var(--space-lg);
}

.error-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.error-container h3 {
    color: var(--gray-900);
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.error-container p {
    color: var(--gray-600);
    font-size: var(--text-base);
    margin-bottom: var(--space-lg);
    max-width: 400px;
}

.retry-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.retry-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Color Palette */
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #E6F2FF;
    --primary-lighter: #F0F7FF;
    
    --secondary: #5E2BFF;
    --secondary-dark: #4B22CC;
    --secondary-light: #F3EFFF;
    
    --accent: #00D4AA;
    --accent-dark: #00A886;
    --accent-light: #E0FFF9;
    
    /* Semantic Colors */
    --success: #00C896;
    --success-light: #E3FFF6;
    --warning: #FFB800;
    --warning-light: #FFF8E6;
    --error: #FF3B30;
    --error-light: #FFE5E3;
    --error-dark: #CC2F26;
    --error-darker: #991F1A;
    --error-lighter: #FFF0EF;

    /* Primary Hover */
    --primary-hover: #0052CC;

    /* Status Color Palettes */
    --green-50: #ECFDF5;
    --green-200: #A7F3D0;
    --green-800: #065F46;
    --red-50: #FEF2F2;
    --red-200: #FECACA;
    --red-800: #991B1B;

    /* Neutral Palette */
    --white: #FFFFFF;
    --gray-50: #FAFBFC;
    --gray-100: #F4F6F8;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --black: #000000;
    
    /* Typography - Modern Font Stack */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Font Sizes - Fixed Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Professional Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.14);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Typography */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

/* Navigation - Modern Glass Effect */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--gray-900);
    text-decoration: none;
    transition: transform var(--transition-base);
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.brand-icon {
    font-size: var(--text-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
    stroke-width: 2.5;
}

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

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    position: relative;
    padding: var(--space-xs) 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: var(--primary);
    transition: transform var(--transition-base);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Dashboard Nav Link - Subtle style next to user menu */
.nav-link-dashboard {
    color: var(--primary) !important;
    padding: 6px 14px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    margin-right: 4px;
}

.nav-link-dashboard:hover {
    background: var(--primary);
    color: var(--white) !important;
}

.nav-link-dashboard::after {
    display: none;
}

/* Resources Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-dropdown-toggle svg {
    transition: transform var(--transition-fast);
}

.nav-dropdown-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-100);
    padding: var(--space-sm);
    z-index: 1000;
    animation: dropdownFadeIn 0.15s ease-out;
}

.nav-dropdown-menu.is-open {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.nav-dropdown-item:hover svg {
    opacity: 1;
    stroke: var(--primary);
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--space-xs) var(--space-sm);
}

/* Mobile menu section label */
.mobile-menu-section-label {
    padding: 2px 12px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Authentication Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: var(--space-lg);
}

.auth-btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-sm);
    border: none;
    font-family: inherit;
    line-height: 1.5;
}

.login-btn {
    background: transparent;
    color: var(--gray-700);
}

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

.login-btn:hover {
    color: var(--primary);
    background: var(--primary-lighter);
}

.signup-btn:hover {
    background: var(--primary-dark);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    background: var(--white);
    border: 2px solid var(--gray-200);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: var(--text-sm);
}

.user-btn:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    width: 16px;
    height: 16px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    margin-top: var(--space-xs);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    color: var(--gray-700);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-sm);
}

.dropdown-item:hover {
    background: var(--primary-lighter);
    color: var(--primary-dark);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
}

.logout-item {
    border-top: 1px solid var(--gray-200);
    color: var(--error);
}

.logout-item:hover {
    background: var(--error-lighter);
    color: var(--error-dark);
}

/* ========================================
   MOBILE NAVIGATION SYSTEM
   ======================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--space-sm);
    cursor: pointer;
    color: var(--gray-700);
    z-index: 1001;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

.mobile-menu-toggle .menu-close {
    display: none;
}

.mobile-menu-toggle.active .menu-open {
    display: none;
}

.mobile-menu-toggle.active .menu-close {
    display: block;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Drawer */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    z-index: 1000;
    padding: 56px 16px 24px;
    box-shadow: var(--shadow-2xl);
    transition: right var(--transition-base);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-auth-buttons {
    display: flex;
    gap: 8px;
}

.mobile-auth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.mobile-auth-btn.primary {
    background: var(--primary);
    color: var(--white);
}

.mobile-auth-btn.primary:hover {
    background: var(--primary-dark);
}

.mobile-auth-btn.secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.mobile-auth-btn.secondary:hover {
    background: var(--gray-200);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--gray-100);
    margin: 12px 0;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu-link {
    display: block;
    padding: 10px 12px;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu-link:hover,
.mobile-menu-link:focus {
    background: var(--primary-light);
    color: var(--primary);
}

/* Show mobile menu toggle on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu {
        display: block;
    }

    /* Prevent body scroll when menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }
}

/* Auth Modal - Redesigned with sidebar */
.auth-modal {
    max-width: 720px;
    width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: row;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.auth-modal .modal-header {
    display: none;
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--gray-500);
}

.auth-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.auth-modal-close i {
    width: 16px;
    height: 16px;
}

.auth-modal-sidebar {
    width: 260px;
    background: var(--gray-900);
    color: var(--white);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.auth-modal-sidebar::before {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.2), transparent 70%);
    pointer-events: none;
}

.auth-sidebar-content {
    position: relative;
    z-index: 1;
}

.auth-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: var(--text-sm);
    margin-bottom: var(--space-xl);
    color: var(--gray-300);
}

.auth-sidebar-logo img,
.auth-sidebar-logo svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.auth-sidebar-heading {
    font-size: var(--text-xl);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-sidebar-sub {
    font-size: 13px;
    color: var(--gray-400);
    line-height: 1.5;
    margin-bottom: var(--space-xl);
}

.auth-sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: var(--space-xl);
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--gray-300);
}

.auth-feature i {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.auth-sidebar-trust {
    font-size: 11px;
    color: var(--gray-500);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.auth-modal-form {
    flex: 1;
    padding: var(--space-xl) var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

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

.auth-form-header h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.auth-form-header p {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin: 0;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
}

.password-toggle:hover { color: var(--gray-600); }

.password-toggle i {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    .auth-modal {
        flex-direction: column;
        max-width: 400px;
        max-height: 90vh;
    }

    .auth-modal-sidebar {
        display: none;
    }

    .auth-modal-form {
        padding: var(--space-lg);
        border-radius: var(--radius-2xl);
    }

    .auth-modal-close {
        background: rgba(0,0,0,0.06);
        color: var(--gray-600);
    }

    .auth-modal-close:hover {
        background: rgba(0,0,0,0.1);
        color: var(--gray-800);
    }
}

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

.auth-method-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
    font-size: var(--text-sm);
}

.google-btn:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.google-btn svg {
    width: 20px;
    height: 20px;
}

.auth-divider {
    text-align: center;
    position: relative;
    color: var(--gray-500);
    font-size: var(--text-sm);
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    z-index: 1;
}

.auth-divider span {
    background: var(--white);
    padding: 0 var(--space-md);
    position: relative;
    z-index: 2;
}

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

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

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

.form-group input {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.submit-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.link-btn:hover {
    color: var(--primary-dark);
}

/* Hero Section - Modern Professional Design */
.hero {
    position: relative;
    min-height: 100vh;
    padding-top: 72px;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #F0F7FF 0%, #E6F2FF 50%, #FFFFFF 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Professional Geometric Shapes */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.3;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    top: 10%;
    left: -10%;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--secondary-light), transparent);
    border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
    top: 60%;
    right: -5%;
    animation: float 25s ease-in-out infinite reverse;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--accent-light), transparent);
    border-radius: 50%;
    bottom: 20%;
    left: 10%;
    animation: float 30s ease-in-out infinite;
}

/* Remove floating emoji elements */
.floating-elements {
    display: none;
}

/* Hero Content - Professional Layout */
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

/* Hero Badge - Trust Indicator */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, var(--white), var(--gray-50));
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.hero-badge::before {
    content: '✓';
    position: absolute;
    left: var(--space-md);
    width: 20px;
    height: 20px;
    background: var(--success);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
}

.badge-text {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-800);
    margin-left: var(--space-lg);
}

/* Hero Title - Bold & Professional */
.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.2;
    color: var(--gray-900);
    margin: 0 auto var(--space-lg);
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.highlight-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto var(--space-md) auto;
    line-height: 1.6;
    text-align: center;
    animation: fadeInUp 0.9s ease-out 0.2s both;
}

.hero-trust-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 0 auto var(--space-xl) auto;
    animation: fadeInUp 0.9s ease-out 0.3s both;
}

.hero-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.hero-trust-item svg {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .hero-trust-strip {
        flex-direction: column;
        gap: 8px;
    }
}

/* Grant Finder Card - Modern Design */
.grant-finder-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: 0 20px 50px rgba(0, 102, 255, 0.08);
    padding: var(--space-xl);
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.3s both;
    border: 1px solid rgba(0, 102, 255, 0.1);
    position: relative;
    overflow: hidden;
}

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

.finder-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.finder-header h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    color: var(--gray-900);
}

.finder-header p {
    color: var(--gray-600);
    font-size: var(--text-base);
}

/* Quiz Container - Professional Form Design */
.quiz-container {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.quiz-step.active {
    display: block;
}

.quiz-label {
    display: block;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-lg);
    text-align: center;
}

/* Quiz Options — Compact Redesign */
.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: var(--space-md);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-option {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-align: left;
    min-height: auto;
}

.quiz-option:hover {
    border-color: var(--primary-light, #93b4f4);
    background: #f8faff;
}

.quiz-option.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.quiz-option.selected::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* Hide icons — compact mode */
.option-icon {
    display: none;
}

.option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 24px;
}

.option-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
    line-height: 1.3;
}

.option-desc {
    font-size: 0.75rem;
    color: var(--gray-500, #6b7280);
    line-height: 1.3;
}

/* Province / Industry — 3-column compact grid, no descriptions */
.quiz-options.compact-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.quiz-options.compact-grid .quiz-option {
    padding: 10px 14px;
    justify-content: center;
    text-align: center;
    min-height: 48px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
}

.quiz-options.compact-grid .option-title {
    white-space: normal;
    line-height: 1.25;
}

.quiz-options.compact-grid .option-content {
    padding-right: 0;
    align-items: center;
}

.quiz-options.compact-grid.multi-select .option-content {
    padding-right: 22px;
}

.quiz-options.compact-grid .option-desc {
    display: none;
}

.quiz-options.compact-grid .quiz-option.selected::before {
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    font-size: 10px;
}

/* Quiz Navigation - Modern Buttons */
.quiz-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
    gap: var(--space-xl);
    position: relative;
}

.quiz-nav-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 120px;
    justify-content: center;
    position: relative;
}

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

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

.quiz-back {
    background: var(--gray-200);
    color: var(--gray-700);
    position: absolute;
    left: 0;
}

.quiz-back:hover {
    background: var(--gray-300);
}

.quiz-next {
    position: absolute;
    right: 0;
}

/* Progress Bar - Sleek Design */
.quiz-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    min-width: 200px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    position: relative;
    min-width: 4%;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary);
    transform: translateX(50%);
}

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

/* Quiz Results - Professional Layout */
.quiz-results {
    text-align: center;
    padding: var(--space-xl);
}

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

.results-icon {
    animation: bounce 1s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    min-width: 80px;
    flex-shrink: 0;
    margin: 0 auto var(--space-lg);
    background: var(--success-light);
    border-radius: var(--radius-full);
}

.results-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--success);
    stroke-width: 3;
}

/* Funding highlight — the "wow moment" after quiz completion */
.quiz-funding-highlight {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: var(--space-md);
}

.quiz-funding-highlight.visible {
    display: flex;
}

.quiz-funding-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.quiz-funding-label {
    font-size: var(--text-base);
    color: var(--gray-600);
}

.quiz-funding-label strong {
    color: var(--gray-800);
}

.quiz-funding-sublabel {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: 2px;
}

@media (max-width: 640px) {
    .quiz-funding-amount {
        font-size: 2rem;
    }
}

/* Advanced quiz funding stat in stats row */
.results-stat.funding .stat-num {
    color: var(--primary);
}

.results-stat.approval .stat-num {
    color: #10b981;
}

.results-preview {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    text-align: left;
}

/* --- Quiz Result Cards (qr-*) --- */
@keyframes qrCardReveal {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    cursor: pointer;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-fast);
    position: relative;
    animation: qrCardReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--card-index, 0) * 120ms + 200ms);
}

.qr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.qr-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.1);
    transform: translateY(-2px);
}

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

.qr-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.qr-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.qr-card-amount {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.qr-card-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.qr-card-org {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin: 0 0 var(--space-sm) 0;
}

.qr-card-desc {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0 0 var(--space-md) 0;
}

.qr-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--gray-100);
}

.qr-card-deadline {
    font-size: var(--text-xs);
    color: var(--gray-500);
    font-weight: 500;
}

.qr-card-deadline.deadline-urgent {
    color: var(--error);
}

.qr-card-deadline.deadline-soon {
    color: var(--warning);
}

.qr-card-deadline.deadline-ongoing {
    color: var(--success);
}

/* Quick quiz card actions (Save + View Details) */
.qr-card-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.qr-card-save,
.qr-card-details {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.qr-card-save {
    background: none;
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.qr-card-save:hover { background: var(--gray-50); }

.qr-card-details {
    background: var(--primary);
    border: none;
    color: white;
    flex: 1;
    text-align: center;
}

.qr-card-details:hover { opacity: 0.9; }

.qr-card-cta {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition-fast);
}

.qr-card:hover .qr-card-cta {
    gap: 8px;
}

.qr-card-empty {
    text-align: center;
    cursor: default;
}

.qr-card-empty:hover {
    transform: none;
    border-color: var(--gray-200);
    box-shadow: none;
}

/* Blurred quick quiz card state — auth gate locks cards #2-3 */
.qr-card--blurred {
    filter: blur(2.5px);
    opacity: 0.65;
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.qr-card--blurred:hover {
    transform: none;
    border-color: var(--gray-200);
    box-shadow: none;
}

/* --- Premium Teaser (after quiz cards) --- */
.qr-premium-teaser {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f6ff 0%, #f0f7ff 100%);
    border: 1px solid rgba(94, 43, 255, 0.1);
    border-radius: var(--radius-lg);
    margin-top: var(--space-sm);
    animation: qrCardReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--card-index, 3) * 120ms + 200ms);
}

.qr-premium-teaser svg {
    color: var(--secondary);
    flex-shrink: 0;
}

.qr-premium-teaser span {
    font-size: var(--text-xs);
    color: var(--gray-600);
    flex: 1;
    line-height: 1.4;
}

.qr-premium-teaser a {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 12px;
    border: 1px solid rgba(94, 43, 255, 0.2);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.qr-premium-teaser a:hover {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

/* --- Mobile quiz cards --- */
@media (max-width: 640px) {
    .quiz-results {
        padding: var(--space-md);
    }

    .qr-card-top {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .qr-card-amount {
        font-size: var(--text-sm);
        white-space: normal;
        word-break: break-word;
    }

    .qr-premium-teaser {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
    }

    .qr-premium-teaser a {
        align-self: center;
    }

    .quiz-signup-bar {
        flex-wrap: wrap;
        justify-content: center;
        font-size: var(--text-xs);
        gap: 4px;
    }
}

/* Legacy classes kept for backwards compat — unused by new cards */
.preview-grant {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-base);
}

.preview-grant:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.preview-grant-info h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
}

.preview-grant-info p {
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.preview-amount {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary);
}

.view-all-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Quiz Signup Bar — slim inline CTA above cards */
.quiz-signup-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f0fdf4 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.quiz-signup-bar svg {
    color: var(--primary);
    flex-shrink: 0;
}

.quiz-signup-bar a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.quiz-signup-bar a:hover {
    text-decoration: underline;
}

.quiz-signup-divider {
    color: var(--gray-400);
    font-size: var(--text-xs);
}

/* Quiz Selection Screen - Professional Layout */
.quiz-selection-container {
    display: none;
    text-align: center;
    padding: var(--space-xl) 0;
}

.quiz-selection-container.active {
    display: block;
}

.finder-header {
    margin-bottom: var(--space-xl);
}

.finder-header h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.finder-header p {
    font-size: var(--text-base);
    color: var(--gray-600);
}

.quiz-options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    max-width: 700px;
    margin: 0 auto;
}

.quiz-type-option {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
    position: relative;
    min-height: 200px;
}

.quiz-type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.quiz-type-option:hover {
    border-color: var(--primary);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quiz-type-option:hover::before {
    opacity: 1;
}

.quiz-type-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    padding: var(--space-md);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.quiz-type-icon i {
    width: 28px;
    height: 28px;
}

.quiz-type-option:hover .quiz-type-icon {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

.quiz-type-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.quiz-type-content h4 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.quiz-type-content p {
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin: 0;
    line-height: 1.4;
}

.quiz-type-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: center;
    margin-top: var(--space-sm);
    width: 100%;
}

.quiz-detail {
    background: transparent;
    color: var(--gray-600);
    padding: 0;
    font-size: var(--text-xs);
    font-weight: 500;
    position: relative;
    padding-left: var(--space-md);
}

.quiz-detail::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.quiz-type-option:hover .quiz-detail {
    color: var(--gray-700);
}

.quiz-type-arrow {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    color: var(--gray-400);
    font-size: var(--text-lg);
    transition: all var(--transition-base);
    width: 20px;
    height: 20px;
}

.quiz-type-option:hover .quiz-type-arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* Advanced Quiz Enhancements */
.advanced-quiz {
    min-height: 400px;
}

.back-to-selection-btn {
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.back-to-selection-btn:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
}

/* Multiple Select Options — compact */
.quiz-options.multiple-select .quiz-option,
.quiz-options.multi-select .quiz-option {
    position: relative;
}

.quiz-options.multiple-select .quiz-option.selected {
    border-color: var(--accent);
    background: var(--accent-light, #eff6ff);
}

.option-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.quiz-option:hover .option-checkbox {
    border-color: var(--gray-400);
}

.quiz-option.selected .option-checkbox {
    border-color: var(--accent, var(--primary));
    background: var(--accent, var(--primary));
    color: var(--white);
}

.option-checkbox i,
.option-checkbox svg {
    font-size: 12px;
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.15s ease;
}

.quiz-option.selected .option-checkbox i,
.quiz-option.selected .option-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

/* Advanced Quiz Results - Tiered Layout */
.advanced-results {
    text-align: left;
}

/* Results Summary Banner */
/* ── Results Summary Banner — Editorial reveal ── */
.results-summary-banner {
    background: linear-gradient(145deg, #0f1729 0%, #132041 40%, #0d2847 70%, #0a1e3d 100%);
    color: var(--white);
    border-radius: 20px;
    padding: 40px 44px 36px;
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
    animation: bannerReveal 0.6s ease-out both;
}
@keyframes bannerReveal {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Radial glow behind stats */
.results-banner-glow {
    position: absolute;
    bottom: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.10) 0%, transparent 65%);
    pointer-events: none;
}

/* Subtle noise grain */
.results-summary-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

/* Diagonal accent line */
.results-summary-banner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 60px;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 212, 170, 0.25), transparent);
    pointer-events: none;
}

.results-banner-inner {
    position: relative;
    z-index: 1;
}

.results-banner-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(0, 212, 170, 0.85);
    margin-bottom: 14px;
}
.results-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00D4AA;
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.results-banner-headline {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #fff 0%, #c8d8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-banner-summary {
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 24px;
    max-width: 540px;
}
.results-banner-summary strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* Stats row — pill indicators with shapes */
.results-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.results-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    animation: statSlideIn 0.5s ease-out both;
}
.results-stat:nth-child(1) { animation-delay: 0.15s; }
.results-stat:nth-child(2) { animation-delay: 0.25s; }
.results-stat:nth-child(3) { animation-delay: 0.35s; }

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

/* Tier shape indicators — diamond, circle, square */
.results-stat::before {
    content: '';
    flex-shrink: 0;
}
.results-stat.perfect::before {
    width: 10px; height: 10px;
    background: #34D399;
    transform: rotate(45deg);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}
.results-stat.strong::before {
    width: 10px; height: 10px;
    background: #60A5FA;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}
.results-stat.good::before {
    width: 9px; height: 9px;
    background: #FBBF24;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.results-stat .stat-num {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--white);
}

.results-stat .stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* Loading shimmer state */
.results-summary-banner.loading .results-banner-summary,
.results-summary-banner.loading .results-stats-row {
    opacity: 0;
}
.results-summary-banner.loading .results-banner-headline::after {
    content: '';
    display: block;
    margin-top: 14px;
    width: 70%;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    background-size: 200% 100%;
    animation: shimmerSlide 1.5s ease-in-out infinite;
}
@keyframes shimmerSlide {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.results-summary-banner:not(.loading) .results-banner-summary,
.results-summary-banner:not(.loading) .results-stats-row {
    animation: fadeInUp 0.4s ease-out both;
    animation-delay: 0.3s;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Tiered Results */
.tiered-results {
    margin: 0 0 var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.result-tier {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.tier-header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
}

.tier-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tier-header-left i {
    width: 20px;
    height: 20px;
}

.perfect-matches .tier-header { border-left: 4px solid #10B981; }
.perfect-matches .tier-header-left i { color: #10B981; }

.strong-matches .tier-header { border-left: 4px solid var(--primary); }
.strong-matches .tier-header-left i { color: var(--primary); }

.good-matches .tier-header { border-left: 4px solid #F59E0B; }
.good-matches .tier-header-left i { color: #F59E0B; }

.tier-header h4 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.tier-badge {
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

.perfect-matches .tier-badge {
    background: #ECFDF5;
    color: #047857;
}

.strong-matches .tier-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.good-matches .tier-badge {
    background: #FFFBEB;
    color: #B45309;
}

/* Results Actions */
.results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
}

.secondary-btn {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.secondary-btn:hover {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mobile Responsiveness for New Quiz Features */
@media (max-width: 768px) {
    .quiz-options-container {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        max-width: 400px;
    }
    
    .quiz-type-option {
        min-height: 180px;
        padding: var(--space-md);
    }
    
    .quiz-type-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .quiz-type-icon i {
        width: 24px;
        height: 24px;
    }
    
    .quiz-type-content h4 {
        font-size: var(--text-base);
    }
    
    .quiz-type-details {
        margin-top: var(--space-xs);
    }
    
    .tiered-results {
        gap: var(--space-md);
    }
    
    .tier-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        text-align: left;
    }
    
    .tier-header h4 {
        font-size: var(--text-lg);
    }
    
    .results-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Hide/Show Logic for Quiz Containers */
.quiz-container[data-quiz-mode="quick"] {
    display: block;
}

.quiz-container[data-quiz-mode="quick"].hidden,
.quiz-container[data-quiz-mode="advanced"]:not(.active) {
    display: none;
}

.quiz-container[data-quiz-mode="advanced"].active {
    display: flex;
}

.quiz-selection-container:not(.active) {
    display: none;
}

/* Match Score Badge */
.match-score {
    background: var(--accent);
    color: var(--white);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Stats - Clean Design */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    border-top: 2px solid rgba(0, 102, 255, 0.1);
    animation: fadeInUp 1.1s ease-out 0.4s both;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(240,247,255,0.8));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: var(--text-3xl);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
    line-height: 1;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-divider {
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--primary-light), transparent);
    align-self: stretch;
    border-radius: var(--radius-full);
}

/* Results Section - Professional Layout */
.results-section {
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    padding: var(--space-4xl) 0;
    min-height: 100vh;
    scroll-margin-top: 72px;
}

.results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-xl);
}

/* Sidebar Filters - Modern Design */
.filters-sidebar {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-header h3 {
    font-size: var(--text-lg);
    font-weight: 700;
}

.reset-filters {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-fast);
}

.reset-filters:hover {
    color: var(--primary-dark);
}

/* Filter Groups */
.filter-group {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--gray-100);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-md);
}

/* Search Input - Modern Style */
.search-input-container {
    position: relative;
    margin-bottom: var(--space-sm);
}

.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    padding-left: 40px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.search-suggestion {
    padding: var(--space-md);
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.selected {
    background: var(--primary-lighter);
    color: var(--primary-dark);
}

.search-suggestion-icon {
    color: var(--gray-500);
    flex-shrink: 0;
}

.search-suggestion-text {
    flex: 1;
}

.search-suggestion-type {
    font-size: var(--text-xs);
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* Filter Buttons - Toggle Style */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

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

/* Filter Select - Custom Style */
.filter-select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Bookmarks Section */
.bookmarks-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-200);
}

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

.bookmarks-header h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--gray-700);
}

.bookmark-count {
    background: var(--primary);
    color: var(--white);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.bookmarks-list {
    max-height: 400px;
    overflow-y: auto;
}

.bookmark-item {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bookmark-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.bookmark-info {
    min-width: 0;
    flex: 1;
}

.bookmark-info h5 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.bookmark-info p {
    font-size: var(--text-xs);
    color: var(--gray-600);
}

.bookmark-remove {
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--space-xs);
    transition: all var(--transition-fast);
}

.bookmark-remove:hover {
    color: var(--error);
}

.no-bookmarks {
    text-align: center;
    padding: var(--space-xl);
    color: var(--gray-500);
    font-size: var(--text-sm);
}

/* Main Results Area */
.results-main {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
}

.results-info h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
}

.results-count {
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.results-controls {
    display: flex;
    gap: var(--space-md);
}

.sort-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sort-container label {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.sort-select {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Grant Items - Card Design */
.grants-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.grant-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.grant-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.grant-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.grant-item:hover::before {
    transform: scaleY(1);
}

.grant-main-info {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: var(--space-lg);
}

.grant-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
    position: relative;
}

.grant-icon.federal {
    background: var(--primary-light);
}

.grant-icon.provincial {
    background: var(--secondary-light);
}

.grant-icon.municipal {
    background: var(--accent-light);
}

.grant-icon.private {
    background: var(--warning-light);
}

.grant-content {
    flex: 1;
    min-width: 0;
}

.grant-header {
    margin-bottom: var(--space-md);
}

.grant-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
    transition: color var(--transition-fast);
    line-height: 1.4;
}

.grant-item:hover .grant-title {
    color: var(--primary);
}

.grant-organization {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.grant-description {
    font-size: var(--text-sm);
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grant-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.grant-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 500;
}

.grant-tag.federal {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.grant-tag.provincial {
    background: var(--secondary-light);
    color: var(--secondary-dark);
}

.grant-tag.municipal {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.grant-tag.private {
    background: var(--warning-light);
    color: var(--gray-800);
}

/* Funding Type Badges - Visual indicators for funding type classification */
.funding-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.funding-type-grant {
    background: #dcfce7;
    color: #166534;
}

.funding-type-tax-credit {
    background: #dbeafe;
    color: #1e40af;
}

.funding-type-award {
    background: #fef3c7;
    color: #92400e;
}

.funding-type-program {
    background: #f3e8ff;
    color: #7c3aed;
}

.funding-type-forgivable-loan {
    background: #e0e7ff;
    color: #4338ca;
}

.funding-type-loan {
    background: #f1f5f9;
    color: #475569;
}

.grant-meta {
    display: flex;
    gap: var(--space-xl);
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.grant-deadline,
.grant-provinces {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.grant-deadline i,
.grant-provinces i {
    width: 16px;
    height: 16px;
}

.deadline-urgent {
    color: var(--error);
    font-weight: 600;
}

.deadline-soon {
    color: var(--warning);
    font-weight: 600;
}

.deadline-ongoing {
    color: var(--success);
}

.grant-side-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-width: 180px;
    max-width: 260px;
    flex-shrink: 0;
}

.grant-amount {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
}

.grant-actions {
    display: flex;
    gap: var(--space-sm);
}

.bookmark-btn {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.bookmark-btn:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.bookmark-btn.bookmarked {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.bookmark-btn i {
    width: 18px;
    height: 18px;
}

.program-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.program-status-paused {
    background: #fef3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.program-status-discontinued {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hide-btn {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--gray-400);
}

.hide-btn:hover {
    border-color: var(--danger, #e74c3c);
    background: #fef2f2;
    color: var(--danger, #e74c3c);
}

.hide-btn i {
    width: 18px;
    height: 18px;
}

.apply-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-base);
}

.apply-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.apply-btn i {
    width: 14px;
    height: 14px;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: var(--space-4xl);
}

.no-results-icon {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.no-results h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

.no-results p {
    color: var(--gray-600);
    margin-bottom: var(--space-xl);
}

.reset-filters-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
}

.pagination-btn {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary-lighter);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

/* Modal - Modern Design */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--gray-200);
}

.auth-modal .modal-header {
    padding: var(--space-lg);
}

.modal-header h3 {
    font-size: var(--text-2xl);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--space-sm);
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: var(--space-xl);
}

.auth-modal .modal-body {
    padding: var(--space-lg);
}

.modal-grant-info {
    margin-bottom: var(--space-2xl);
}

.modal-amount {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xs, 4px);
}

/* Sprint B QA fix (T1-4) — small subline below modal-amount surfaces the verbose
   `amount` field when it provides additional info beyond compact amountDisplay.
   Examples: id 3 IRAP shows "Up to $1M typical (avg ~$94K) · $10M ceiling for
   major capital projects" below the compact "$75K-$1M typical (up to $10M)". */
.modal-amount-detail {
    font-size: var(--text-sm, 0.875rem);
    color: var(--gray-700, #374151);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    font-style: italic;
    max-width: 100%;
}

.modal-organization {
    font-size: var(--text-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.modal-description {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: var(--space-2xl);
}

.modal-details {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.detail-section {
    margin-bottom: var(--space-xl);
}

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

.detail-section h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

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

.modal-actions {
    display: flex;
    gap: var(--space-md);
}

.modal-actions .bookmark-btn {
    flex: 1;
    width: auto;
    height: auto;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
}

.modal-actions .grant-page-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.modal-actions .grant-page-link:hover {
    color: #2D6A4F;
    border-color: #2D6A4F;
}
.modal-actions .grant-page-link svg { flex-shrink: 0; }

.modal-actions .apply-btn {
    flex: 2;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
}

/* ── Pursue this grant (Dashboard V1 Phase 4) ────────────────── */
/* Modal-scoped pursue button — outlined forest, compact. Sits between
   Bookmark and the primary grant-page CTA. Hidden entirely when no content
   (signed-out users). */
.pursue-wrap {
    display: inline-flex;
    align-items: center;
}
.pursue-wrap:empty {
    display: none;
}
.pursue-wrap--modal {
    flex-shrink: 0;
}
.modal-actions .pursue-wrap--modal {
    margin: 0;
}
/* Apr 25 2026 (post-QA strategic decision D) — filled forest green to
   match homepage-v7 + explore + grant-page primary variants. */
.pursue-btn.pursue-btn--compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-sm) var(--space-lg);
    background: #2D6A4F;
    color: #FFFDFA;
    border: 1.5px solid #2D6A4F;
    border-radius: var(--radius-md);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(45, 106, 79, 0.18);
}
.pursue-btn.pursue-btn--compact:hover {
    background: #1F4A37;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(45, 106, 79, 0.26);
}
.pursue-btn.pursue-btn--compact:focus-visible {
    outline: 2px solid #1F4A37;
    outline-offset: 2px;
}
.pursue-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #E8EFEA;
    border: 1px solid #C8D9CE;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    line-height: 1.2;
    white-space: nowrap;
}
.pursue-status__label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1F4A37;
}
.pursue-status__link {
    color: #2D6A4F;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}
.pursue-status__link:hover { text-decoration: underline; }

/* Icon variant — used on quiz .cb card aside (compact chip). */
.pursue-btn.pursue-btn--icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    color: #2D6A4F;
    border: 1px solid #2D6A4F;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    line-height: 1.1;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.pursue-btn.pursue-btn--icon:hover {
    background: #2D6A4F;
    color: #FFFDFA;
}
.pursue-btn.pursue-btn--icon:focus-visible {
    outline: 2px solid #1F4A37;
    outline-offset: 1px;
}
.pursue-btn.pursue-btn--icon svg { flex-shrink: 0; }
.pursue-status.pursue-status--icon {
    padding: 4px 8px;
    gap: 6px;
    font-size: 11px;
}
.pursue-status.pursue-status--icon .pursue-status__label {
    font-size: 9px;
}
.pursue-status.pursue-status--icon .pursue-status__link {
    font-size: 11px;
}

/* Quiz .cb-card aside variant wrapper */
.cb__pursue {
    margin-top: 6px;
}
.cb__pursue:empty { display: none; }

/* Modal Help CTA - Professional Grant Writers */
.modal-help-cta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    transition: all var(--transition-normal);
}

.modal-help-cta:hover {
    border-color: #86efac;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.help-cta-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: var(--radius-md);
    color: white;
}

.help-cta-content {
    flex: 1;
    min-width: 0;
}

.help-cta-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.help-cta-description {
    display: block;
    font-size: var(--text-xs);
    color: var(--gray-600);
    line-height: 1.4;
}

.help-cta-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.help-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.help-cta-btn svg {
    transition: transform var(--transition-fast);
}

.help-cta-btn:hover svg {
    transform: translate(2px, -2px);
}

/* Modal Help CTA - Mobile Responsive */
@media (max-width: 600px) {
    .modal-help-cta {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }

    .help-cta-content {
        order: 2;
    }

    .help-cta-btn {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
}

/* Global section offset for smooth scrolling with fixed navbar */
section[id] {
    scroll-margin-top: 72px;
}

/* ========================================
   How It Works Section
   ======================================== */
.hiw-section {
    padding: var(--space-5xl) 0;
    background: var(--white);
    scroll-margin-top: 72px;
}

.hiw-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.hiw-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.hiw-badge {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-lighter);
    padding: var(--space-xs) var(--space-lg);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.hiw-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.hiw-header p {
    font-size: var(--text-lg);
    color: var(--gray-600);
}

.hiw-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: var(--space-3xl);
}

.hiw-step {
    flex: 1;
    max-width: 240px;
    text-align: center;
    padding: 0 var(--space-md);
}

.hiw-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
}

.hiw-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    background: var(--primary-lighter);
    border-radius: var(--radius-xl);
    color: var(--primary);
}

.hiw-step-icon svg {
    width: 28px;
    height: 28px;
}

.hiw-step h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
}

.hiw-step p {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.6;
}

.hiw-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
    padding-top: 56px;
    color: var(--gray-300);
}

.hiw-connector svg {
    width: 24px;
    height: 24px;
}

.hiw-cta {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.hiw-cta-btn {
    padding: var(--space-md) var(--space-2xl) !important;
    font-size: var(--text-base) !important;
}

.hiw-cta-note {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

/* ========================================
   Credibility Stats Strip
   ======================================== */
.stats-strip {
    background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
    padding: var(--space-3xl) var(--space-xl);
}

.stats-strip-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
}

.stats-strip-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.stats-strip-number {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
}

.stats-money {
    color: #10b981;
}

.stats-update {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-2xl);
}

.stats-strip-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: statsPulse 2s ease-in-out infinite;
}

@keyframes statsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.stats-strip-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.stats-strip-divider {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   Testimonials Section
   ======================================== */
.testimonials-section {
    padding: var(--space-5xl) 0;
    background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 50%, #ffffff 100%);
}

.testimonials-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.testimonials-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.testimonials-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.testimonials-header p {
    font-size: var(--text-lg);
    color: var(--gray-600);
}

.testimonial-hero {
    margin-bottom: var(--space-2xl);
}

.testimonial-hero-quote {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    border: 1px solid var(--gray-200);
    position: relative;
}

.testimonial-quote-mark {
    width: 36px;
    height: 36px;
    color: var(--primary-light);
    margin-bottom: var(--space-lg);
    opacity: 0.4;
}

.testimonial-stars {
    color: #fbbf24;
    font-size: var(--text-base);
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
}

.testimonial-hero-quote blockquote {
    font-size: var(--text-xl);
    line-height: 1.7;
    color: var(--gray-800);
    margin-bottom: var(--space-xl);
    font-style: normal;
}

.testimonial-hero-quote blockquote strong {
    color: #10b981;
    font-weight: 700;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.testimonial-author cite {
    display: block;
    font-weight: 600;
    font-style: normal;
    color: var(--gray-900);
    font-size: var(--text-base);
}

.testimonial-author span {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

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

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--gray-200);
}

.testimonial-card .testimonial-stars {
    margin-bottom: var(--space-sm);
}

.testimonial-card blockquote {
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: var(--space-lg);
    font-style: normal;
}

.testimonial-card blockquote strong {
    color: #10b981;
    font-weight: 700;
}

.testimonials-disclaimer {
    text-align: center;
    margin-top: var(--space-2xl);
    font-size: var(--text-xs);
    color: var(--gray-400);
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-section {
    padding: var(--space-5xl) 0;
    background: var(--white);
    scroll-margin-top: 72px;
}

.faq-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.faq-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.faq-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.faq-header p {
    font-size: var(--text-lg);
    color: var(--gray-600);
}

.faq-item {
    border-bottom: 1px solid var(--gray-200);
}

.faq-item:first-child {
    border-top: 1px solid var(--gray-200);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) 0;
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--gray-900);
    cursor: pointer;
    list-style: none;
    transition: color var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--gray-400);
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: var(--space-lg);
}

.faq-item[open] summary::after {
    content: '\2212';
    color: var(--primary);
}

.faq-item summary:hover {
    color: var(--primary);
}

.faq-answer {
    padding-bottom: var(--space-xl);
}

.faq-answer p {
    font-size: var(--text-sm);
    line-height: 1.8;
    color: var(--gray-600);
}

.faq-answer a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-answer a:hover {
    color: var(--primary-dark);
}

/* ========================================
   Final CTA Section
   ======================================== */
.final-cta-section {
    padding: var(--space-5xl) var(--space-xl);
    background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
    text-align: center;
}

.final-cta-container {
    max-width: 600px;
    margin: 0 auto;
}

.final-cta-section h2 {
    font-size: var(--text-4xl);
    color: var(--white);
    margin-bottom: var(--space-md);
}

.final-cta-section p {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

.final-cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.final-cta-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-3xl);
    background: var(--white);
    color: #0a1628;
    font-size: var(--text-base);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.final-cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.final-cta-btn-secondary {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.final-cta-btn-secondary:hover {
    color: var(--white);
}

/* ========================================
   Newsletter Section
   ======================================== */
.newsletter-section {
    padding: var(--space-2xl) var(--space-xl);
    background: var(--gray-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.newsletter-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
}

.newsletter-content h3 {
    font-size: var(--text-lg);
    color: var(--white);
    margin-bottom: var(--space-xs);
}

.newsletter-content p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.newsletter-input {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    font-size: var(--text-sm);
    width: 240px;
    outline: none;
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.newsletter-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.newsletter-submit {
    padding: var(--space-sm) var(--space-xl);
    background: var(--white);
    color: var(--gray-900);
    font-size: var(--text-sm);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.newsletter-submit:hover {
    background: var(--gray-100);
}

/* ========================================
   Bottom Sections Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .hiw-steps {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }

    .hiw-step {
        max-width: 320px;
    }

    .hiw-connector {
        transform: rotate(90deg);
        padding-top: 0;
        width: 24px;
        height: 24px;
    }

    .stats-strip-inner {
        flex-wrap: wrap;
        gap: var(--space-xl);
    }

    .stats-strip-divider {
        display: none;
    }

    .stats-strip-card {
        width: calc(50% - var(--space-md));
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-hero-quote {
        padding: var(--space-xl);
    }

    .testimonial-hero-quote blockquote {
        font-size: var(--text-lg);
    }

    .final-cta-section h2 {
        font-size: var(--text-3xl);
    }

    .newsletter-container {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }

    .newsletter-form {
        width: 100%;
        max-width: 360px;
        flex-direction: column;
    }

    .newsletter-input {
        width: 100%;
    }

    .newsletter-submit {
        width: 100%;
    }
}

/* Footer - Clean Design */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

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

.footer-brand-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-brand .brand-icon {
    font-size: var(--text-2xl);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0;
}

.footer-brand .brand-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--white);
    stroke-width: 2;
}

.footer-brand .brand-text {
    font-size: var(--text-xl);
    font-weight: 700;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.footer-trust {
    margin-top: var(--space-sm);
    font-size: 12px;
    opacity: 0.7;
}

.footer-trust a {
    color: var(--gray-400);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-trust a:hover {
    color: var(--white);
}

.footer-column h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
    line-height: 1.6;
}

.footer-column a:hover {
    color: var(--white);
}

/* Sister-product sub-group inside a footer column (Jul 2026) — footer-content
   is a fixed 5-column grid (2fr + 1fr + 1fr + 1fr + 1.2fr), so a 6th
   "More from GrantCompass" column would need a grid-template change; a
   clearly-separated sub-block inside the Platform column is the lower-risk fit. */
.footer-subgroup {
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--gray-800);
}

.footer-subgroup h5 {
    font-size: var(--text-xs);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--gray-800);
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: var(--text-xs);
    line-height: 1.6;
}

/* ★★ WCAG AA (2026-08-06) — AND THE FAILURE WAS NOT IN THIS FILE, WHICH IS WHY IT
   SURVIVED. The "Privacy Policy" link in the footer bottom bar measured 4.4:1, below the
   4.5:1 floor. `.footer-bottom p` is `--gray-500` (#ADB5BD) on `--gray-900` (#212529) =
   7.43:1 and was never the problem; the link carries an INLINE
   `style="color:inherit;…;opacity:0.7"`, and 0.7 over #212529 composites #ADB5BD down to
   #83898F = 4.40:1. A computed-style contrast probe reads `color` and never sees it.
   ⚠ `!important` is not a preference here, it is the only mechanism: an inline `style`
   attribute outranks every selector, and the attribute is baked into the static HTML of
   every page carrying this footer. Fixing it in the markup would mean editing each page.
   ⚠ Scoped to `.footer-bottom p a` deliberately — `.footer-trust` next door also runs at
   0.7 opacity and is fine (5.81:1, because it starts from the lighter `--gray-400`), so
   it is left alone rather than swept up. The link keeps its underline, which is what
   distinguishes it from the sentence around it now that both are the same ink. */
.footer-bottom p a { opacity: 1 !important; }

/* Footer Newsletter */
.footer-newsletter p {
    color: var(--gray-400);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.footer-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* ⚠ 2026-08-06 — the OTHER half of the control pair.
   `<input>` does not inherit font-family either, for the same reason the button
   did not: the UA stylesheet sets it explicitly, so inheritance never reaches it.
   Both halves used to be Arial, which was wrong but at least CONSISTENT. Giving
   the button `font-family: inherit` (below) fixed one half and left this one on
   Arial, so the field and its button began rendering in two different typefaces
   inside a single control the comment below itself calls "one control pair".
   Measured before this line: input `Arial` / button `Plus Jakarta Sans` on
   /resources/*, `Arial` / system-stack on /pricing, /dashboard, /explore. */
.footer-newsletter-form input[type="email"] {
    padding: 10px 14px;
    border: 1px solid var(--gray-700);
    border-radius: var(--radius-md);
    background: var(--gray-800);
    color: var(--white);
    font-family: inherit;
    font-size: var(--text-sm);
}

.footer-newsletter-form input[type="email"]::placeholder {
    color: var(--gray-500);
}

.footer-newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* ★★ 2026-08-05 — THE FOOTER'S ONLY BUTTON WAS OFF-BRAND EVERYWHERE, IN TWO WAYS.
   Measured computed style: `rgb(0, 102, 255)` in **Arial**, against a nav primary
   that is sienna and a page primary that is forest. Two independent causes, both
   invisible in the source:
   ① `var(--primary)` is `#0066FF`, a legacy token from before the ivory/forest/
      sienna palette. It is still read in 116 places in this file, so the TOKEN is
      deliberately left alone and only this component is corrected — repointing
      `--primary` would repaint the whole site from one line.
   ② No `font-family` was declared, and a `<button>` does NOT inherit one: it fell
      through to the User-Agent default while every word around it was Plus Jakarta
      Sans. Nothing could have caught this by reading the rule, because the defect is
      the declaration that is not there.
   ⚠ The 8px radius deliberately STAYS. The three-way disagreement in the finding
   (9999px nav / 10px pricing / 8px here) resolves in favour of the field this button
   is attached to: it sits directly under a `--radius-md` email input as one control
   pair, and a pill welded to a rounded-rectangle field looks like a mistake in a way
   the colour never did.

   ★★ 2026-08-06 — THE ①-FIX OVERSHOT: IT ALSO REPAINTED THE PAGES THAT WERE RIGHT.
   `var(--sienna)` is a CONSTANT, and a constant cannot tell a page that never set a
   primary from a page that set one deliberately. The eight /resources/* + toolkit-store
   pages load homepage-v7.css AFTER this file, which re-points `--primary` to the forest
   `#2D6A4F` on purpose. Measured before/after on those pages: `rgb(45, 106, 79)` ->
   `rgb(196, 83, 43)`. They were never the legacy blue this fix was aimed at, so they
   were never the bug — the fix was the regression.
   The correction is a COMPONENT token, not a constant and not `--primary` itself:
     · unset  -> the sienna literal, i.e. exactly the ①-fix, for every page still
                 sitting on the legacy `--primary: #0066FF` (pricing / explore /
                 dashboard / premium-guide / products/*, all measured `rgb(0,102,255)`);
     · set    -> whatever the page scoped, because the stylesheet that re-points
                 `--primary` sets this alongside it (homepage-v7.css `:root`).
   ⚠ Deliberately a var() FALLBACK rather than a `:root` default here. Two `:root`
   declarations of the same token are decided by SOURCE ORDER, and this component is
   painted on pages that load these two files in an order no rule guarantees. With
   only one file ever declaring the token, load order stops mattering.
   ⚠ The focus ring stays a fixed warm tint on purpose: it is measured for contrast
   against the DARK FOOTER it sits on, not against the button, so it does not need to
   track the button's hue and must not inherit a faint `--primary-light`. */
.footer-newsletter-form button {
    padding: 10px 20px;
    background: var(--footer-cta-bg, #C4532B);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.footer-newsletter-form button:hover {
    background: var(--footer-cta-bg-hover, #A3401F);
}
.footer-newsletter-form button:focus-visible {
    outline: 2px solid #E8A87C;
    outline-offset: 2px;
}

/* Newsletter CTA Section */
.newsletter-cta {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    padding: 64px 24px;
}

.newsletter-cta-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-cta-content h2 {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.newsletter-cta-content > p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.newsletter-cta-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-cta-form input[type="email"] {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.newsletter-cta-form input[type="email"]:focus {
    border-color: #ffffff;
    background: #ffffff;
}

.newsletter-cta-form input[type="email"]::placeholder {
    color: #9ca3af;
}

.newsletter-cta-form button {
    padding: 16px 32px;
    background: #ffffff;
    color: #0066FF;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.newsletter-cta-form button:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.newsletter-privacy {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 16px;
}

@media (max-width: 640px) {
    .newsletter-cta {
        padding: 48px 20px;
    }

    .newsletter-cta-form {
        flex-direction: column;
    }

    .newsletter-cta-form button {
        width: 100%;
    }

    .newsletter-cta-content h2 {
        font-size: 24px;
    }

    .footer-newsletter-form {
        flex-direction: column;
    }
}

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

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(1deg);
    }
    75% {
        transform: translateY(20px) rotate(-1deg);
    }
}

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

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Error Message */
.error-message {
    background: var(--error-light);
    border: 1px solid var(--error);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
}

.error-content {
    text-align: center;
}

.error-content h3 {
    color: var(--error);
    margin-bottom: var(--space-md);
}

.retry-btn {
    background: var(--error);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-lg);
    transition: all var(--transition-base);
}

.retry-btn:hover {
    background: var(--error-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design */
@media (max-width: 1280px) {
    .results-container {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 1024px) {
    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-stats {
        gap: var(--space-2xl);
    }

    .results-section {
        padding-top: var(--space-xl);
    }

    .results-container {
        grid-template-columns: 1fr;
        padding: 0 var(--space-md);
        max-width: 100%;
        overflow-x: hidden;
    }

    .filters-sidebar {
        position: static;
        max-height: none;
        margin-bottom: var(--space-2xl);
    }

    .grants-list {
        max-width: 100%;
        overflow-x: hidden;
    }

    .grant-item {
        max-width: 100%;
        overflow: hidden;
        flex-direction: column;
        gap: var(--space-md);
    }

    .grant-main-info {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .grant-side-info {
        min-width: unset;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: var(--space-md);
        border-top: 1px solid var(--gray-100);
    }

    .grant-amount {
        font-size: var(--text-lg);
    }

    .grant-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: var(--text-base);
    }

    .grant-meta {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .grant-provinces {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .auth-buttons {
        gap: var(--space-sm);
    }
    
    .auth-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-xs);
    }
    
    .user-menu {
        position: static;
    }
    
    .user-dropdown {
        right: auto;
        left: 0;
        min-width: 180px;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-3xl) 0;
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .quiz-options {
        grid-template-columns: repeat(2, 1fr);
    }
    .quiz-options.compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quiz-option {
        padding: 10px 12px;
    }
    .option-title {
        font-size: 0.82rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-xl);
    }
    
    .stat-divider {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .grant-item {
        flex-direction: column;
    }
    
    .grant-side-info {
        width: 100%;
        flex-direction: row;
        align-items: center;
        border-top: 1px solid var(--gray-200);
        padding-top: var(--space-md);
        margin-top: var(--space-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .results-container {
        padding: 0 var(--space-sm);
    }

    .results-main {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .results-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .filters-sidebar {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .grant-item {
        padding: var(--space-md);
    }

    .grant-icon {
        width: 36px;
        height: 36px;
        font-size: var(--text-lg);
    }

    .grant-title {
        font-size: var(--text-sm);
    }

    .grant-description {
        font-size: var(--text-xs);
    }

    .grant-tag {
        font-size: 10px;
        padding: 2px 6px;
    }

    .grant-meta-item {
        font-size: var(--text-xs);
    }

    .grant-amount {
        font-size: var(--text-base);
    }

    .bookmark-item h5 {
        font-size: var(--text-xs);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .bookmark-item p {
        font-size: 11px;
    }

    .fiverr-cta {
        padding: var(--space-md);
    }

    .fiverr-cta p {
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: var(--space-xl) var(--space-md);
    }

    .hero-title {
        font-size: var(--text-3xl);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtitle {
        font-size: var(--text-base);
        padding: 0 var(--space-sm);
    }

    .hero-badge {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-md);
    }

    .grant-finder-card {
        padding: var(--space-lg);
        margin: 0 var(--space-xs);
    }

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

    .grant-card-title {
        font-size: var(--text-base);
        word-wrap: break-word;
    }

    .modal-content {
        border-radius: var(--radius-xl);
        margin: var(--space-sm);
        max-height: calc(100vh - var(--space-lg));
    }

    .modal-header {
        padding: var(--space-md);
    }

    .modal-header h3 {
        font-size: var(--text-lg);
        line-height: 1.3;
        padding-right: var(--space-md);
    }

    .modal-body {
        padding: var(--space-md);
    }

    .modal-amount {
        font-size: var(--text-xl);
    }

    .modal-organization {
        font-size: var(--text-base);
    }

    .modal-tags .grant-tag,
    .modal-tags .modal-tag {
        font-size: var(--text-xs);
    }

    .modal-description {
        font-size: var(--text-sm);
    }

    .modal-details {
        padding: var(--space-md);
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .detail-item {
        word-break: break-word;
    }

    .modal-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .modal-actions .bookmark-btn,
    .modal-actions .apply-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: var(--space-md);
    }

    .modal-actions .apply-btn {
        flex: unset;
    }

    .modal-actions .bookmark-btn {
        flex: unset;
    }

    .premium-modal-cta {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }

    .premium-modal-cta-btn {
        width: 100%;
    }

    /* Grant card amount/actions row fix for mobile */
    .grant-side-info {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .grant-amount {
        font-size: var(--text-sm);
        flex-shrink: 1;
        min-width: 0;
        word-break: break-word;
    }

    .grant-actions {
        flex-shrink: 0;
    }

    /* Pagination fix for mobile */
    .pagination {
        gap: var(--space-md);
    }

    .pagination-info {
        white-space: nowrap;
    }
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 3000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--primary);
}

.notification-success {
    border-left-color: var(--success);
}

.notification-error {
    border-left-color: var(--error);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
}

.notification-content i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.notification-success i {
    color: var(--success);
}

.notification-error i {
    color: var(--error);
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--space-xs);
    margin-left: auto;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.notification-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Profile Modal Styles - Deprecated, profile now lives in dashboard panel */

/* Coming Soon Styles */
.coming-soon {
    text-align: center;
    padding: var(--space-2xl);
}

.coming-soon i {
    width: 48px;
    height: 48px;
    color: var(--gray-400);
    margin-bottom: var(--space-lg);
}

.coming-soon h3 {
    margin-bottom: var(--space-md);
    color: var(--gray-700);
}

.coming-soon p {
    color: var(--gray-600);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Disabled button state */
.auth-method-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

/* ============================================
   DASHBOARD STYLES - Overhauled Feb 2026
   ============================================ */

/* Dashboard Section */
.dashboard-section {
    padding: calc(72px + var(--space-xl)) 0 var(--space-4xl);
    background: #F8F9FB;
    min-height: calc(100vh - 72px);
    scroll-margin-top: 72px;
    margin-bottom: var(--space-2xl);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* --- Profile Panel --- */
.dash-profile-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) var(--space-2xl);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--gray-200);
}

.dash-profile-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.dash-profile-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #E0ECFF 0%, #C7D9FF 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.dash-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.dash-profile-avatar i,
.dash-profile-avatar svg {
    width: 24px;
    height: 24px;
}

.dash-greeting {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.dash-email {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin: 0;
}

.dash-profile-right {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.dash-member-since {
    font-size: var(--text-xs);
    color: var(--gray-400);
    white-space: nowrap;
}

.dash-profile-actions {
    display: flex;
    gap: var(--space-sm);
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.dash-action-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.dash-action-btn i,
.dash-action-btn svg {
    width: 16px;
    height: 16px;
}

/* --- Profile Completion Bar --- */
.dash-completion-bar {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.dash-completion-bar.is-complete {
    display: none;
}

.dash-completion-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.dash-completion-text {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
}

.dash-completion-hint {
    font-size: var(--text-xs);
    color: var(--gray-500);
    white-space: nowrap;
}

.dash-completion-track {
    flex: 1;
    height: 6px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    min-width: 100px;
}

.dash-completion-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #4D94FF 100%);
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dashboard Stats --- */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Color variants */
.stat-card--blue::before { background: #3B82F6; }
.stat-card--blue .stat-icon { background: #EFF6FF; color: #3B82F6; }
.stat-card--blue .stat-number { color: #1E40AF; }

.stat-card--green::before { background: #10B981; }
.stat-card--green .stat-icon { background: #ECFDF5; color: #10B981; }
.stat-card--green .stat-number { color: #065F46; }

.stat-card--amber::before { background: #F59E0B; }
.stat-card--amber .stat-icon { background: #FFFBEB; color: #F59E0B; }
.stat-card--amber .stat-number { color: #92400E; }

.stat-card--red::before { background: #EF4444; }
.stat-card--red .stat-icon { background: #FEF2F2; color: #EF4444; }
.stat-card--red .stat-number { color: #991B1B; }

.stat-icon {
    padding: 10px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i,
.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-number {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2px;
    line-height: 1.1;
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* --- Subscription Panel --- */
.dash-subscription {
    margin-bottom: var(--space-xl);
}

.dash-sub-card {
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    border: 1px solid var(--gray-100);
}

.dash-sub-card--premium {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: rgba(45, 106, 79, 0.2);
}

.dash-sub-card--free {
    background: var(--white);
}

.dash-sub-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

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

.dash-sub-icon--premium {
    background: rgba(45, 106, 79, 0.12);
    color: #2d6a4f;
}

.dash-sub-icon--free {
    background: var(--gray-100);
    color: var(--gray-500);
}

.dash-sub-title {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
}

.dash-sub-plan {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.dash-sub-badge {
    margin-left: auto;
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-sub-badge--active {
    background: rgba(45, 106, 79, 0.12);
    color: #2d6a4f;
}

.dash-sub-badge--free {
    background: var(--gray-100);
    color: var(--gray-500);
}

.dash-sub-details {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-md) 0;
    border-top: 1px solid rgba(45, 106, 79, 0.1);
    margin-bottom: var(--space-md);
}

.dash-sub-detail-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-bottom: 2px;
}

.dash-sub-detail-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-900);
}

.dash-sub-features {
    margin-bottom: var(--space-md);
}

.dash-sub-teaser {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0;
}

.dash-sub-cta {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #2d6a4f;
    text-decoration: none;
}

.dash-sub-cta:hover {
    text-decoration: underline;
}

.dash-sub-cta--upgrade {
    display: block;
    text-align: center;
    padding: var(--space-sm) var(--space-lg);
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.dash-sub-cta--upgrade:hover {
    background: var(--primary-dark);
    text-decoration: none;
    color: var(--white);
}

/* --- Recently Viewed --- */
.dash-recently-viewed {
    margin-bottom: var(--space-xl);
}

.dash-section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.dash-recent-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.dash-recent-scroll::-webkit-scrollbar {
    height: 4px;
}

.dash-recent-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.dash-recent-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.dash-recent-card {
    flex: 0 0 220px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.dash-recent-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.08);
}

.dash-recent-card h5 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dash-recent-card .dash-recent-amount {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--primary);
}

/* --- Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--space-xl);
}

.dashboard-section-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.section-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-header h3 i,
.section-header h3 svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.section-actions {
    display: flex;
    gap: var(--space-sm);
}

/* --- Pipeline Tabs --- */
.dash-pipeline-tabs {
    display: flex;
    gap: 2px;
    padding: var(--space-sm) var(--space-lg);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.dash-pipeline-tabs::-webkit-scrollbar {
    display: none;
}

.dash-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--gray-500);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.dash-tab:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

.dash-tab.active {
    color: var(--primary);
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-weight: 600;
}

.dash-tab-count {
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-500);
    padding: 0 5px;
}

.dash-tab.active .dash-tab-count {
    background: var(--primary-light);
    color: var(--primary);
}

/* --- Bookmark Search --- */
.dash-bookmark-search {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
}

.dash-bookmark-search i,
.dash-bookmark-search svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.dash-bookmark-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    color: var(--gray-800);
    padding: 6px 0;
    outline: none;
}

.dash-bookmark-search input::placeholder {
    color: var(--gray-400);
}

/* --- Bookmarked Grants List --- */
.bookmarked-grants-list,
.recommendations-list {
    padding: var(--space-md) var(--space-lg);
    max-height: 600px;
    overflow-y: auto;
}

.dashboard-grant-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.dashboard-grant-item:hover {
    border-top-color: var(--gray-300);
    border-right-color: var(--gray-300);
    border-bottom-color: var(--gray-300);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

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

/* Status color coding */
.dashboard-grant-item[data-status="bookmarked"] { border-left-color: #3B82F6; }
.dashboard-grant-item[data-status="in_progress"] { border-left-color: #F59E0B; }
.dashboard-grant-item[data-status="applied"] { border-left-color: #8B5CF6; }
.dashboard-grant-item[data-status="approved"] { border-left-color: #10B981; }
.dashboard-grant-item[data-status="rejected"] { border-left-color: #EF4444; }

.dash-grant-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: 6px;
}

.dash-grant-top h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.dash-grant-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dash-status-select {
    padding: 5px 24px 5px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C757D' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
    line-height: 1.4;
}

.dash-status-select:hover {
    border-color: var(--gray-400);
    background-color: var(--gray-50);
}

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

/* Color-coded status selects */
.dashboard-grant-item[data-status="bookmarked"] .dash-status-select {
    border-color: #BFDBFE;
    background-color: #EFF6FF;
    color: #1D4ED8;
}
.dashboard-grant-item[data-status="in_progress"] .dash-status-select {
    border-color: #FDE68A;
    background-color: #FFFBEB;
    color: #B45309;
}
.dashboard-grant-item[data-status="applied"] .dash-status-select {
    border-color: #C4B5FD;
    background-color: #F5F3FF;
    color: #6D28D9;
}
.dashboard-grant-item[data-status="approved"] .dash-status-select {
    border-color: #A7F3D0;
    background-color: #ECFDF5;
    color: #047857;
}
.dashboard-grant-item[data-status="rejected"] .dash-status-select {
    border-color: #FECACA;
    background-color: #FEF2F2;
    color: #B91C1C;
}

.note-btn {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 4px;
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.note-btn i,
.note-btn svg {
    width: 14px;
    height: 14px;
}

.note-btn:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.note-btn.has-note {
    color: #F59E0B;
    border-color: #FDE68A;
    background: #FFFBEB;
}

.dash-grant-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.dash-grant-org {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.dash-grant-amount {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--primary);
}

.dash-grant-deadline {
    font-size: var(--text-xs);
    color: var(--gray-400);
    margin-left: auto;
}

.dash-grant-deadline.is-urgent {
    color: #DC2626;
    font-weight: 600;
}

.dash-grant-note-preview {
    margin-top: 6px;
    font-size: var(--text-xs);
    color: var(--gray-500);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-left: 8px;
    border-left: 2px solid #FDE68A;
}

/* --- Recommendation specific styles --- */
.dashboard-grant-item.recommendation {
    border-left-color: var(--primary);
}

.dash-rec-reason {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.recommendation-score {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.dash-rec-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.dash-rec-actions .dash-action-btn {
    padding: 5px 12px;
    font-size: var(--text-xs);
}

.dash-dismiss-btn {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: var(--text-xs);
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.dash-dismiss-btn:hover {
    color: var(--gray-600);
}

/* --- Empty States --- */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--gray-500);
}

.empty-state i,
.empty-state svg {
    width: 40px;
    height: 40px;
    color: var(--gray-300);
    margin-bottom: var(--space-md);
}

.empty-state h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-xs);
}

.empty-state p {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: var(--space-lg);
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Dashboard button styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* --- Note Modal --- */
.note-modal {
    max-width: 500px;
    width: 90%;
}

.note-modal .modal-body textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-base);
    resize: vertical;
    min-height: 120px;
}

.note-modal .modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.08);
}

.note-modal .modal-footer {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

/* --- Dashboard Responsive --- */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

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

    .dash-profile-panel {
        padding: var(--space-lg) var(--space-xl);
    }
}

@media (max-width: 768px) {
    .dashboard-section {
        padding: calc(72px + var(--space-lg)) var(--space-md) var(--space-xl);
    }

    .dashboard-container {
        padding: 0;
    }

    .dash-profile-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
        padding: var(--space-lg);
    }

    .dash-profile-right {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .stat-card {
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .stat-number {
        font-size: var(--text-xl);
    }

    .stat-label {
        font-size: 10px;
    }

    .dash-completion-bar {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .dash-completion-info {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .dash-completion-track {
        width: 100%;
    }

    .dash-grant-top {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .dash-grant-actions {
        align-self: flex-end;
    }

    .bookmarked-grants-list,
    .recommendations-list {
        padding: var(--space-sm);
        max-height: none;
        overflow: visible;
    }

    .section-header {
        padding: var(--space-md) var(--space-lg);
    }

    .section-header h3 {
        font-size: var(--text-sm);
    }

    .dash-recent-card {
        flex: 0 0 180px;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
    }

    .footer-brand {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .stat-icon {
        display: none;
    }

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

    .dash-pipeline-tabs {
        padding: var(--space-xs) var(--space-sm);
    }
}

/* Accessibility improvements */
.dashboard-grant-item:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dash-status-select:focus,
.note-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* Loading states for dashboard */
.dashboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--gray-600);
}

/* Success/Error states */
.dashboard-success {
    background: var(--green-50);
    border: 1px solid var(--green-200);
    color: var(--green-800);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.dashboard-error {
    background: var(--red-50);
    border: 1px solid var(--red-200);
    color: var(--red-800);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

/* ========================================
   TIERED GRANT CARDS - Professional Design
   ======================================== */

.tier-grants-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-lg);
}

.tier-grants-container:empty {
    display: none;
}

/* Tiered Grant Cards - Redesigned */
.tiered-grant-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tiered-grant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--gray-300);
}

.tiered-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
}

.tiered-card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.level-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-badge.federal { background: #FEE2E2; color: #991B1B; }
.level-badge.provincial { background: #DBEAFE; color: #1E40AF; }
.level-badge.municipal { background: #D1FAE5; color: #065F46; }
.level-badge.private { background: #EDE9FE; color: #5B21B6; }
.level-badge.territorial { background: #FEF3C7; color: #92400E; }

.match-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.match-badge.perfect { background: #D1FAE5; color: #047857; }
.match-badge.strong { background: #DBEAFE; color: #1D4ED8; }
.match-badge.good { background: #FEF3C7; color: #B45309; }

/* Legacy bookmark btn removed — replaced by .tiered-save-btn in card footer */

.tiered-card-body {
    padding: 0 var(--space-md) var(--space-sm);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tiered-grant-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.01em;
}

.tiered-grant-org {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
    margin: 0;
}

.tiered-grant-desc {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.45;
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tiered-card-meta {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.tiered-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-600);
}

.tiered-meta-item i {
    width: 13px;
    height: 13px;
    stroke: var(--gray-400);
}

.tiered-meta-item.amount {
    font-weight: 700;
    color: var(--gray-900);
}

.tiered-meta-item.amount i { stroke: #10B981; }

.tiered-card-actions {
    display: flex;
    gap: 8px;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--gray-100);
}

.tiered-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-600);
}
.tiered-save-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.tiered-save-btn.saved {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 102, 255, 0.06);
}
.tiered-save-btn i {
    width: 14px;
    height: 14px;
}

.tiered-apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    background: var(--primary);
    border: none;
    color: white;
}

.tiered-apply-btn:hover {
    background: var(--primary-dark);
}

.tiered-apply-btn i {
    width: 13px;
    height: 13px;
}

/* Show More Button */
.tiered-show-more-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: var(--space-md);
    background: transparent;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tiered-show-more-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 102, 255, 0.04);
}

/* Premium CTA between tiers */
.quiz-premium-cta {
    border: 1px solid rgba(0, 102, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.04), rgba(0, 212, 170, 0.03));
}
.quiz-premium-cta-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.quiz-premium-cta-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #0088ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.quiz-premium-cta-icon i { color: white; width: 18px; height: 18px; }
.quiz-premium-cta-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-600);
}
.quiz-premium-cta-text strong {
    display: block;
    color: var(--gray-900);
    font-weight: 600;
    margin-bottom: 2px;
}
.quiz-premium-cta-btn {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.quiz-premium-cta-btn:hover { background: var(--primary-dark); }

@media (max-width: 640px) {
    .quiz-premium-cta-inner { flex-direction: column; text-align: center; }
    .quiz-premium-cta-btn { width: 100%; text-align: center; }
}

/* ========================================
   PRECISION QUIZ SIGNUP CTA - Redesigned
   ======================================== */

.precision-quiz-signup-cta {
    background: var(--gray-900);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-xl) 0;
}

.precision-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.precision-cta-left h4 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--white);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.precision-cta-left p {
    font-size: var(--text-sm);
    color: var(--gray-400);
    margin: 0;
    line-height: 1.5;
}

.precision-cta-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.precision-cta-signup-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--white);
    color: var(--gray-900);
    border: none;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.precision-cta-signup-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.precision-cta-signup-btn i {
    width: 14px;
    height: 14px;
}

.precision-cta-note {
    font-size: 11px;
    color: var(--gray-500);
}

@media (max-width: 768px) {
    .precision-cta-inner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .results-summary-content {
        flex-direction: column;
        text-align: center;
    }

    .results-stats-row {
        justify-content: center;
        flex-wrap: wrap;
    }

    .results-summary-banner {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }
    .results-summary-banner::after { display: none; }
    .results-banner-headline { font-size: 22px; }
    .results-banner-summary { font-size: 14px; margin-bottom: 18px; }
    .results-stats-row { gap: 8px; }
    .results-stat { padding: 8px 14px 8px 12px; gap: 8px; }
    .results-stat .stat-num { font-size: 18px; }
    .results-stat .stat-label { font-size: 12px; }
}

/* ========================================
   GUEST BOOKMARK MODAL
   ======================================== */

.guest-bookmark-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--space-lg);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.guest-bookmark-modal.active {
    opacity: 1;
}

.guest-bookmark-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    max-width: 420px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-base);
}

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

.close-guest-modal {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

.close-guest-modal i {
    width: 20px;
    height: 20px;
}

.guest-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.guest-modal-icon i {
    width: 40px;
    height: 40px;
    stroke: var(--primary);
}

.guest-bookmark-content h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.guest-bookmark-content > p {
    font-size: var(--text-base);
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.guest-modal-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl) 0;
    text-align: left;
}

.guest-modal-benefits li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    font-size: var(--text-sm);
    color: var(--gray-700);
}

.guest-modal-benefits li i {
    width: 16px;
    height: 16px;
    color: var(--success);
    flex-shrink: 0;
}

.guest-modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.guest-signup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.guest-signup-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #003D99);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.guest-signup-btn i {
    width: 20px;
    height: 20px;
}

.guest-login-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    padding: var(--space-sm);
    transition: color var(--transition-fast);
}

.guest-login-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.guest-continue-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.guest-continue-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ========================================
   MULTI-SELECT QUIZ OPTIONS — Compact
   ======================================== */

.quiz-options.multi-select .quiz-option,
.quiz-options.multiple-select .quiz-option {
    position: relative;
}

.quiz-options.multi-select .quiz-option::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    transition: all 0.15s ease;
}

.quiz-options.multi-select .quiz-option.selected::after {
    background: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.quiz-options.multi-select .quiz-option.selected::before,
.quiz-options.multiple-select .quiz-option.selected::before {
    display: none;
}

.multi-select-hint {
    font-size: var(--text-sm);
    color: var(--gray-500);
    font-style: italic;
    margin-top: calc(var(--space-sm) * -1);
    margin-bottom: var(--space-md);
    text-align: center;
}

/* Quiz Auth Re-entry Prompt */
.quiz-auth-reentry {
    text-align: center;
    padding: 16px 0 8px;
    font-size: 0.88rem;
}

.quiz-auth-reentry a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

.quiz-auth-reentry a:hover {
    color: var(--primary-dark, #1e40af);
}

/* Small inline spinner */
.spinner-sm {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinner-sm-spin 0.6s linear infinite;
    vertical-align: middle;
}

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

/* ========================================
   TIERED RESULTS RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .tier-grants-container {
        grid-template-columns: 1fr;
        padding: var(--space-md);
    }

    .tiered-card-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .tiered-card-badges {
        order: 2;
        width: 100%;
    }

    .tiered-card-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .tiered-card-actions {
        flex-direction: column;
    }

    .guest-bookmark-content {
        padding: var(--space-xl);
    }

    .guest-modal-icon {
        width: 60px;
        height: 60px;
    }

    .guest-modal-icon i {
        width: 30px;
        height: 30px;
    }

    .guest-bookmark-content h3 {
        font-size: var(--text-xl);
    }
}

/* ========================================
   UNIFIED QUIZ RESULTS — Gated Reveal
   ======================================== */

.unified-quiz-results {
    margin-top: var(--space-xl);
}

.quiz-results-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.quiz-no-results {
    text-align: center;
    color: var(--gray-500);
    padding: var(--space-2xl) 0;
    font-size: var(--text-base);
}

/* Quiz result card */
.quiz-result-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
    transition: box-shadow 0.2s ease;
    position: relative;
    border-left: 3px solid var(--gray-300);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Tier-specific left border accent */
.quiz-result-card[data-tier="perfect"] {
    border-left-color: #16a34a;
    background: linear-gradient(135deg, #f0fdf4 0%, var(--white) 40%);
}
.quiz-result-card[data-tier="strong"] {
    border-left-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, var(--white) 40%);
}
.quiz-result-card[data-tier="good"] {
    border-left-color: #d97706;
    background: linear-gradient(135deg, #fffbeb 0%, var(--white) 40%);
}

.quiz-result-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
}

/* Rank indicator */
.quiz-result-card__rank {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.02em;
    line-height: 1;
}

.quiz-result-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 6px;
}

.quiz-result-card__score {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.quiz-result-card__score--perfect { background: #dcfce7; color: #15803d; }
.quiz-result-card__score--strong { background: #dbeafe; color: #1d4ed8; }
.quiz-result-card__score--good { background: #fef3c7; color: #b45309; }

.quiz-result-card__title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 2px;
    line-height: 1.35;
    padding-right: 2rem;
}

.quiz-result-card__org {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin: 0 0 6px;
}

.quiz-result-card__desc {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0 0 var(--space-sm);
}

/* Combined footer: amount, deadline, and actions in one row */
.quiz-result-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--text-sm);
    color: var(--gray-500);
    flex-wrap: wrap;
}

.quiz-result-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.quiz-result-card__amount {
    font-weight: 600;
    color: var(--gray-800);
}

.quiz-result-card__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.quiz-result-card__save,
.quiz-result-card__details {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.quiz-result-card__save {
    background: none;
    border: 1px solid var(--gray-200);
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.quiz-result-card__save:hover { background: var(--gray-50); color: var(--gray-700); }

.quiz-result-card__save.saved {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light, #eff6ff);
}

.quiz-result-card__details {
    background: none;
    border: none;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 6px;
}

.quiz-result-card__details:hover { color: #1d4ed8; }

/* Blurred card state — lighter blur so titles tease through */
.quiz-result-card--blurred {
    filter: blur(2.5px);
    opacity: 0.65;
    pointer-events: none;
    user-select: none;
}

/* Hidden card state (used for cards 5+) */
.quiz-result-card--hidden {
    display: none;
}

/* ============================================
   Auth gate — premium unlock experience
   ============================================ */
.quiz-auth-gate {
    background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 50%, #e0e7ff 100%);
    border: 1px solid #93c5fd;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    margin: var(--space-md) 0;
    position: relative;
    overflow: hidden;
    animation: quizGateFadeIn 0.4s ease-out;
}

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

/* Subtle decorative shimmer */
.quiz-auth-gate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    animation: quizGateShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes quizGateShimmer {
    0%, 100% { transform: translateX(-25%); }
    50% { transform: translateX(25%); }
}

/* Lock icon container */
.quiz-auth-gate__icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-sm);
    color: #2563eb;
}

.quiz-auth-gate__icon svg {
    filter: drop-shadow(0 2px 4px rgba(37,99,235,0.15));
}

.quiz-auth-gate__content h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 6px;
}

.quiz-auth-gate__content > p {
    color: var(--gray-600);
    margin: 0 0 var(--space-lg);
    font-size: var(--text-sm);
    line-height: 1.6;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-auth-gate__google {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    margin-bottom: var(--space-sm);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    animation: quizGateBtnPulse 2.5s ease-in-out infinite;
}

@keyframes quizGateBtnPulse {
    0%, 100% { box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); }
    50% { box-shadow: 0 2px 12px rgba(37,99,235,0.15), 0 1px 3px rgba(0,0,0,0.06); }
}

.quiz-auth-gate__google:hover {
    box-shadow: 0 4px 16px rgba(37,99,235,0.2);
    transform: translateY(-1px);
}

.quiz-auth-gate__email {
    display: block;
    color: var(--primary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
    text-decoration: none;
}

.quiz-auth-gate__email:hover {
    text-decoration: underline;
}

.quiz-auth-gate__free {
    font-size: var(--text-xs) !important;
    color: var(--gray-600) !important;
    margin: 0 auto var(--space-md) auto !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
}

.quiz-auth-gate__dismiss {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: none;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.quiz-auth-gate__dismiss:hover { opacity: 1; color: var(--gray-500); }

/* View all button in quiz results */
.quiz-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-xl);
    padding: 12px 24px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
}

.quiz-view-all:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

@media (max-width: 640px) {
    .quiz-auth-gate {
        padding: var(--space-lg) var(--space-md);
    }
    .quiz-auth-gate__google {
        padding: 12px 24px;
        font-size: var(--text-sm);
        width: 100%;
        justify-content: center;
    }
    .quiz-result-card {
        padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);
    }
    .quiz-result-card__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .quiz-result-card__actions {
        margin-left: 0;
        width: 100%;
    }
    .quiz-result-card__title {
        font-size: var(--text-sm);
        padding-right: 1.5rem;
    }
    .quiz-result-card__desc {
        font-size: 0.8rem;
    }
    .quiz-result-card__rank {
        font-size: 0.65rem;
    }
}

/* ========================================
   POST-QUIZ AUTO-SAVE SYSTEM
   ======================================== */

/* Phase 1 toast */
.auto-save-toast {
    animation: autoSaveSlideDown 0.4s ease;
    margin-bottom: 16px;
}
@keyframes autoSaveSlideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
.auto-save-toast--fading {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.auto-save-toast__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.9rem;
    color: #166534;
    line-height: 1.4;
}
.auto-save-toast__inner svg {
    color: #10b981;
    flex-shrink: 0;
}
.auto-save-toast__inner strong {
    font-weight: 600;
}
.auto-save-toast__close {
    margin-left: auto;
    background: none;
    border: none;
    color: #86efac;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.auto-save-toast__close:hover {
    color: #166534;
}

/* V2 Conversion Sprint (2026-04-25) — auto-pursue toast.
 * Positioned bottom-right as a fixed pill (distinct from the inline
 * auto-save toast which appears above quiz results). Fires ~1.5s after
 * auth-complete so it doesn't collide with the bookmark toast.
 * Lasts 10s (auto-dismiss) or until user closes. Deep-links to dashboard.
 */
.auto-pursue-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 380px;
    background: #FFFDFA;
    border: 1.5px solid #C4532B;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 16px 40px rgba(26, 24, 20, 0.18), 0 3px 10px rgba(26, 24, 20, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 9998;
    font-family: 'DM Sans', -apple-system, sans-serif;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease;
}
.auto-pursue-toast.is-shown {
    transform: translateX(0);
    opacity: 1;
}
.auto-pursue-toast__icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 2px;
}
.auto-pursue-toast__body {
    flex: 1;
    min-width: 0;
}
.auto-pursue-toast__title {
    font-size: 14px;
    font-weight: 700;
    color: #1A1814;
    margin: 0 0 4px;
    letter-spacing: 0.01em;
}
.auto-pursue-toast__desc {
    font-size: 13px;
    color: #57534E;
    margin: 0;
    line-height: 1.5;
}
.auto-pursue-toast__link {
    color: #1F4A37;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(31, 74, 55, 0.25);
    transition: border-color 120ms ease;
}
.auto-pursue-toast__link:hover,
.auto-pursue-toast__link:focus-visible {
    border-bottom-color: #1F4A37;
    outline: none;
}
.auto-pursue-toast__close {
    background: transparent;
    border: none;
    color: #8B8275;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: background 120ms ease, color 120ms ease;
    flex-shrink: 0;
}
.auto-pursue-toast__close:hover,
.auto-pursue-toast__close:focus-visible {
    background: #F4EEDF;
    color: #1A1814;
    outline: none;
}

/* Mobile */
@media (max-width: 520px) {
    .auto-pursue-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .auto-pursue-toast {
        transition: opacity 120ms ease;
        transform: translateX(0);
    }
}

/* Phase 2 roadmap reveal card */
.rm-reveal {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 20px;
    animation: autoSaveSlideDown 0.5s ease;
}
.rm-reveal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.rm-reveal__header svg {
    color: #10b981;
    flex-shrink: 0;
}
.rm-reveal__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #14532d;
    margin: 0;
}
.rm-reveal__grants {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.rm-reveal__grants li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.9rem;
    color: #166534;
    font-weight: 500;
}
.rm-reveal__grants li svg {
    color: #10b981;
    flex-shrink: 0;
}

/* Premium pitch inside reveal card */
.rm-reveal__pitch {
    background: rgba(255,255,255,0.7);
    border: 1px solid #d1fae5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.rm-reveal__pitch-text {
    font-size: 0.95rem;
    color: #374151;
    margin: 0 0 14px;
    line-height: 1.5;
}
.rm-reveal__pitch-cta {
    display: inline-block;
    background: #1a5632;
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.rm-reveal__pitch-cta:hover {
    background: #15472a;
}
.rm-reveal__pitch-guarantee {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 8px;
}
.rm-reveal__pitch-dismiss {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.78rem;
    cursor: pointer;
    margin-top: 6px;
    padding: 0;
}
.rm-reveal__pitch-dismiss:hover {
    color: #6b7280;
}

/* View roadmap CTA */
.rm-reveal__roadmap-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #1a5632;
    color: #fff !important;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.rm-reveal__roadmap-cta:hover {
    background: #15472a;
}

/* Enhanced save button on quiz result cards */
.quiz-result-card__save {
    border: 1.5px solid #d1d5db !important;
    background: #fff !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}
.quiz-result-card__save:hover {
    border-color: #f59e0b !important;
    color: #d97706;
    background: #fffbeb !important;
}
.quiz-result-card__save.saved {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #92400e;
    font-weight: 600;
}

/* Match reasoning line on result cards */
.quiz-result-card__reasons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: -4px 0 6px;
    font-size: 0.78rem;
    line-height: 1.3;
}
.quiz-result-card__reasons-count {
    color: #6b7280;
    font-weight: 500;
}
.quiz-result-card__reasons-detail {
    color: #10b981;
    font-weight: 500;
}
.quiz-result-card__reasons-count::after {
    content: '\00b7';
    margin-left: 6px;
    color: #d1d5db;
}

/* Not-relevant thumbs-down button */
.quiz-result-card__not-relevant {
    background: none !important;
    border: 1.5px solid transparent !important;
    border-radius: 6px !important;
    padding: 5px 7px !important;
    cursor: pointer;
    color: #d1d5db;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.quiz-result-card__not-relevant:hover {
    color: #ef4444;
    border-color: #fecaca !important;
    background: #fef2f2 !important;
}

/* Rejected card overlay (pre-signup) */
.quiz-result-card--rejected {
    position: relative;
    pointer-events: none;
}
.quiz-result-card--rejected > *:not(.quiz-result-card__rejected-overlay) {
    opacity: 0.15;
    filter: grayscale(1);
}
.quiz-result-card__rejected-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    pointer-events: auto;
    z-index: 2;
}
.quiz-result-card__rejected-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #374151;
    text-align: center;
    line-height: 1.4;
}
.quiz-result-card__rejected-msg svg {
    color: #10b981;
    flex-shrink: 0;
}
.quiz-result-card__rejected-undo {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.8rem;
    color: #6b7280;
    cursor: pointer;
}
.quiz-result-card__rejected-undo:hover {
    border-color: #9ca3af;
    color: #374151;
}

/* Removing animation (post-signup) */
.quiz-result-card--removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s, transform 0.4s;
}

/* Undo toast (bottom of screen) */
.undo-not-relevant-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: #f9fafb;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
}
.undo-not-relevant-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.undo-not-relevant-toast button {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #60a5fa;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.undo-not-relevant-toast button:hover {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 640px) {
    .rm-reveal { padding: 20px 16px; }
    .rm-reveal__title { font-size: 1rem; }
    .rm-reveal__pitch-cta { width: 100%; text-align: center; }
    .rm-reveal__roadmap-cta { width: 100%; justify-content: center; }
    .quiz-result-card__reasons { flex-direction: column; align-items: flex-start; gap: 2px; }
    .quiz-result-card__reasons-count::after { display: none; }
    .undo-not-relevant-toast { left: 16px; right: 16px; transform: translateY(20px); }
    .undo-not-relevant-toast.active { transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   ROADMAP PROGRESS TRACKER (.rm-progress-*)
   Live progress card shown during async roadmap generation
   ═══════════════════════════════════════════════════════════════ */

.rm-progress-tracker {
    background: linear-gradient(135deg, #0c1929 0%, #162d4a 60%, #1a3a5c 100%);
    border-radius: 16px;
    padding: 0;
    margin: 24px auto;
    max-width: 720px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(12, 25, 41, 0.35), 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    animation: rm-progress-fadeIn 0.6s ease-out;
}

@keyframes rm-progress-fadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Top progress bar */
.rm-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}

.rm-progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80, #86efac);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rm-progress-bar__fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -1px;
    width: 60px;
    height: 5px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    border-radius: 2px;
}

/* Content area */
.rm-progress-content {
    padding: 28px 32px 32px;
}

/* Header */
.rm-progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.rm-progress-header__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(34,197,94,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rm-progress-header__icon svg {
    width: 20px;
    height: 20px;
    stroke: #4ade80;
}

.rm-progress-header__text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.rm-progress-header__text p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    margin: 2px 0 0;
    line-height: 1.4;
}

/* Stages */
.rm-progress-stages {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.rm-progress-stage {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    position: relative;
    transition: opacity 0.4s ease;
}

/* Vertical connector line between stages */
.rm-progress-stage:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 36px;
    width: 2px;
    height: calc(100% - 16px);
    background: rgba(255,255,255,0.08);
    transition: background 0.5s ease;
}

.rm-progress-stage.rm-progress-stage--completed:not(:last-child)::after {
    background: rgba(34,197,94,0.3);
}

/* Stage indicator dot */
.rm-progress-stage__indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

/* Pending state */
.rm-progress-stage--pending .rm-progress-stage__indicator {
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.12);
}

.rm-progress-stage--pending .rm-progress-stage__indicator svg {
    stroke: rgba(255,255,255,0.2);
    width: 14px;
    height: 14px;
}

.rm-progress-stage--pending .rm-progress-stage__label {
    color: rgba(255,255,255,0.25);
}

/* Active state */
.rm-progress-stage--active .rm-progress-stage__indicator {
    background: rgba(34,197,94,0.12);
    border: 1.5px solid rgba(34,197,94,0.4);
    animation: rm-progress-pulse 2s ease-in-out infinite;
}

.rm-progress-stage--active .rm-progress-stage__indicator svg {
    stroke: #4ade80;
    width: 14px;
    height: 14px;
}

.rm-progress-stage--active .rm-progress-stage__label {
    color: #fff;
    font-weight: 600;
}

@keyframes rm-progress-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.2); }
    50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* Completed state */
.rm-progress-stage--completed .rm-progress-stage__indicator {
    background: rgba(34,197,94,0.15);
    border: 1.5px solid rgba(34,197,94,0.5);
}

.rm-progress-stage--completed .rm-progress-stage__indicator svg {
    stroke: #22c55e;
    width: 14px;
    height: 14px;
}

.rm-progress-stage--completed .rm-progress-stage__label {
    color: rgba(255,255,255,0.5);
}

/* Stage label */
.rm-progress-stage__label {
    font-size: 0.88rem;
    line-height: 1.4;
    transition: color 0.4s ease;
}

/* Completion state — card transforms */
.rm-progress-tracker.rm-progress-tracker--complete {
    background: linear-gradient(135deg, #0d2818 0%, #14532d 60%, #166534 100%);
    box-shadow: 0 8px 32px rgba(22,101,52,0.3), 0 0 60px rgba(34,197,94,0.08);
    animation: rm-progress-completeGlow 2s ease-out;
}

@keyframes rm-progress-completeGlow {
    0% { box-shadow: 0 8px 32px rgba(22,101,52,0.3), 0 0 0 rgba(34,197,94,0); }
    30% { box-shadow: 0 8px 32px rgba(22,101,52,0.3), 0 0 80px rgba(34,197,94,0.15); }
    100% { box-shadow: 0 8px 32px rgba(22,101,52,0.3), 0 0 60px rgba(34,197,94,0.08); }
}

/* Completion CTA */
.rm-progress-cta {
    display: none;
    margin-top: 24px;
    text-align: center;
    animation: rm-progress-ctaReveal 0.6s ease-out 0.3s both;
}

@keyframes rm-progress-ctaReveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.rm-progress-tracker--complete .rm-progress-cta {
    display: block;
}

.rm-progress-cta__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}

.rm-progress-cta__subtitle {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 16px;
}

.rm-progress-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(34,197,94,0.3);
    letter-spacing: -0.01em;
}

.rm-progress-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(34,197,94,0.4);
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.rm-progress-cta__btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.rm-progress-cta__btn:hover svg {
    transform: translateX(3px);
}

/* Error state */
.rm-progress-tracker.rm-progress-tracker--error {
    background: linear-gradient(135deg, #1c1017 0%, #2d1a24 60%, #3b1f2b 100%);
}

.rm-progress-error {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.rm-progress-tracker--error .rm-progress-error {
    display: block;
}

.rm-progress-error__text {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px;
}

.rm-progress-error__retry {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rm-progress-error__retry:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
}

/* Returning user — compact "View Your Roadmap" link */
.rm-progress-tracker.rm-progress-tracker--ready {
    background: linear-gradient(135deg, #0d2818 0%, #14532d 60%, #166534 100%);
    padding: 0;
}

.rm-progress-tracker--ready .rm-progress-content {
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rm-progress-tracker--ready .rm-progress-stages,
.rm-progress-tracker--ready .rm-progress-header__text p {
    display: none;
}

.rm-progress-tracker--ready .rm-progress-header {
    margin-bottom: 0;
}

.rm-progress-ready-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.rm-progress-ready-link:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

.rm-progress-ready-link svg {
    width: 16px;
    height: 16px;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .rm-progress-tracker {
        margin: 16px 12px;
        border-radius: 12px;
    }
    .rm-progress-content {
        padding: 20px 20px 24px;
    }
    .rm-progress-header__icon {
        width: 36px;
        height: 36px;
    }
    .rm-progress-header__text h3 {
        font-size: 0.95rem;
    }
    .rm-progress-stage__label {
        font-size: 0.82rem;
    }
    .rm-progress-stage__indicator {
        width: 28px;
        height: 28px;
    }
    .rm-progress-cta__btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    .rm-progress-tracker--ready .rm-progress-content {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px;
    }
    .rm-progress-ready-link {
        justify-content: center;
    }
}

/* ★ 2026-09-03 tap target: the footer Subscribe button measured 37px on phones
   (sitewide footer). 44px floor. Debt audit on this selector: 0 duplicates. */
@media (max-width: 768px) {
  .footer-newsletter-form button[type="submit"] { min-height: 44px; }
}
