        /* Premium Generational Theme Design System */
        :root {
            --gen-dark: #1e293b;
            --gen-medium: #475569;
            --gen-light: #64748b;
            --gen-silver: #cbd5e1;
            --gen-white: #f8fafc;
            --gen-purple: #8b5cf6;
            --gen-blue: #3b82f6;
            --gen-teal: #14b8a6;
            --primary: var(--gen-purple);
            --primary-light: #a78bfa;
            --primary-dark: #7c3aed;
            --secondary: var(--gen-teal);
            --warning: #f59e0b;
            --danger: #ef4444;
            --success: var(--gen-teal);
            --bg-primary: #ffffff;
            --bg-secondary: var(--gen-white);
            --surface-elevated: #ffffff;
            --surface-generational: rgba(139, 92, 246, 0.05);
            --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

            /* Generational Colors */
            --greatest: #8b5a2b;
            --silent: #6b7280;
            --boomer: #dc2626;
            --genx: #7c3aed;
            --millennial: #059669;
            --genz: #ea580c;
            --alpha: #0ea5e9;

            /* Spacing Scale */
            --space-xs: 0.25rem;
            --space-sm: 0.5rem;
            --space-md: 1rem;
            --space-lg: 1.5rem;
            --space-xl: 2rem;
            --space-2xl: 3rem;
            --space-3xl: 4rem;

            /* Border Radius */
            --radius-sm: 6px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 24px;
            --radius-full: 9999px;

            /* Shadows */
            --shadow-sm: 0 1px 2px 0 rgba(30, 41, 59, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(30, 41, 59, 0.1), 0 2px 4px -1px rgba(30, 41, 59, 0.06);
            --shadow-lg: 0 10px 15px -3px rgba(30, 41, 59, 0.1), 0 4px 6px -2px rgba(30, 41, 59, 0.05);
            --shadow-generational: 0 8px 32px rgba(139, 92, 246, 0.15);

            /* Transitions */
            --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        body {
            font-family: var(--font-primary);
            background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
            color: var(--gen-dark);
            line-height: 1.6;
            min-height: 100vh;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(139,92,246,0.03)"/><circle cx="80" cy="80" r="2" fill="rgba(139,92,246,0.02)"/><circle cx="50" cy="30" r="1.5" fill="rgba(139,92,246,0.025)"/></svg>');
            background-size: 200px 200px;
            animation: generationalFloat 25s ease-in-out infinite;
            pointer-events: none;
            z-index: -1;
        }

        @keyframes generationalFloat {

            0%,
            100% {
                transform: translateY(0px) rotate(0deg);
            }

            50% {
                transform: translateY(-15px) rotate(180deg);
            }
        }

        .hero {
            background: linear-gradient(135deg, var(--gen-dark) 0%, var(--gen-medium) 50%, var(--primary) 100%);
            color: white;
            padding: var(--space-3xl) var(--space-xl);
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10 50h20M30 50h20M50 50h20M70 50h20" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/></svg>');
            background-size: 150px 150px;
            animation: timelineMove 20s linear infinite;
            pointer-events: none;
        }

        @keyframes timelineMove {
            0% {
                transform: translateX(0);
            }

            100% {
                transform: translateX(-150px);
            }
        }

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

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: var(--space-sm);
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius-full);
            font-size: 0.875rem;
            font-weight: 500;
            margin-bottom: var(--space-xl);
            animation: fadeInUp 0.6s ease-out;
        }

        .hero-title {
            font-size: clamp(2rem, 5vw, 3.5rem);
            font-weight: 800;
            margin: 0 0 var(--space-lg) 0;
            text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            animation: fadeInUp 0.6s ease-out 0.2s both;
        }

        .hero-subtitle {
            font-size: clamp(1rem, 2vw, 1.25rem);
            opacity: 0.9;
            margin: 0;
            animation: fadeInUp 0.6s ease-out 0.4s both;
        }

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

        .tabs {
            display: flex;
            background: var(--surface-generational);
            border-radius: var(--radius-md);
            padding: var(--space-xs);
            margin-bottom: var(--space-xl);
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .tab-btn {
            flex: 1;
            padding: var(--space-md) var(--space-lg);
            background: transparent;
            border: none;
            border-radius: var(--radius-sm);
            font-weight: 600;
            color: var(--gen-medium);
            cursor: pointer;
            transition: var(--transition-base);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-sm);
        }

        .tab-btn.active {
            background: var(--primary);
            color: white;
            box-shadow: var(--shadow-md);
        }

        .tab-btn:not(.active):hover {
            background: rgba(139, 92, 246, 0.1);
            color: var(--primary);
        }

        .calculator-layout {
            display: flex;
            justify-content: center;
            align-items: flex-start;
            margin-top: var(--space-2xl);
        }

        @media (max-width: 1200px) {
            .calculator-layout {
                display: flex;
                justify-content: center;
            }
        }

        .calculator-panel {
            background: var(--surface-elevated);
            border-radius: var(--radius-xl);
            padding: var(--space-2xl);
            box-shadow: var(--shadow-generational);
            border: 1px solid rgba(139, 92, 246, 0.1);
            position: relative;
            overflow: hidden;
            height: fit-content;
            position: sticky;
            top: var(--space-xl);
        }

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

        .panel-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--gen-dark);
            margin: 0 0 var(--space-lg) 0;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .input-group {
            margin-bottom: var(--space-lg);
        }

        .input-label {
            display: block;
            font-weight: 500;
            color: var(--gen-dark);
            margin-bottom: var(--space-sm);
            font-size: 0.875rem;
        }

        .input-field {
            width: 100%;
            padding: var(--space-lg);
            border: 2px solid rgba(139, 92, 246, 0.1);
            border-radius: var(--radius-md);
            font-size: 1.125rem;
            font-weight: 500;
            text-align: center;
            transition: var(--transition-base);
            background: var(--bg-primary);
        }

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

        .input-help {
            font-size: 0.75rem;
            color: var(--gen-medium);
            margin-top: var(--space-xs);
            text-align: center;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            color: white;
            border: none;
            padding: var(--space-lg) var(--space-xl);
            border-radius: var(--radius-full);
            font-weight: 600;
            font-size: 1rem;
            cursor: pointer;
            transition: var(--transition-base);
            box-shadow: var(--shadow-md);
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-sm);
        }

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

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

        .error-message {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: var(--danger);
            padding: var(--space-md);
            border-radius: var(--radius-md);
            font-size: 0.875rem;
            margin-top: var(--space-md);
            text-align: center;
        }

        .timeline-section {
            background: var(--surface-elevated);
            border-radius: var(--radius-xl);
            padding: var(--space-2xl);
            box-shadow: var(--shadow-generational);
            border: 1px solid rgba(139, 92, 246, 0.1);
            margin-bottom: var(--space-xl);
            position: relative;
            overflow: hidden;
        }

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

        .section-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--gen-dark);
            margin: 0 0 var(--space-xl) 0;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-sm);
        }

        .timeline-container {
            position: relative;
            margin: var(--space-xl) 0;
        }

        .timeline-track {
            display: flex;
            height: 80px;
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-md);
            margin-bottom: var(--space-lg);
        }

        .timeline-segment {
            flex: 1;
            position: relative;
            cursor: pointer;
            transition: var(--transition-base);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.875rem;
            text-align: center;
            padding: var(--space-sm);
        }

        .timeline-segment:hover {
            transform: scaleY(1.15);
            z-index: 10;
            box-shadow: var(--shadow-lg);
        }

        .timeline-segment.greatest {
            background: var(--greatest);
        }

        .timeline-segment.silent {
            background: var(--silent);
        }

        .timeline-segment.boomer {
            background: var(--boomer);
        }

        .timeline-segment.genx {
            background: var(--genx);
        }

        .timeline-segment.millennial {
            background: var(--millennial);
        }

        .timeline-segment.genz {
            background: var(--genz);
        }

        .timeline-segment.alpha {
            background: var(--alpha);
        }

        .birth-year-marker {
            position: absolute;
            top: -15px;
            width: 6px;
            height: 110px;
            background: var(--gen-dark);
            border-radius: var(--radius-sm);
            transform: translateX(-3px);
            transition: var(--transition-base);
            box-shadow: var(--shadow-lg);
            z-index: 20;
        }

        .birth-year-marker::before {
            content: attr(data-year);
            position: absolute;
            top: -35px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--gen-dark);
            color: white;
            padding: var(--space-xs) var(--space-sm);
            border-radius: var(--radius-md);
            font-size: 0.75rem;
            font-weight: 700;
            white-space: nowrap;
            box-shadow: var(--shadow-md);
        }

        .birth-year-marker::after {
            content: '';
            position: absolute;
            top: -15px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 8px solid var(--gen-dark);
        }

        .timeline-labels {
            display: flex;
            justify-content: space-between;
            margin-top: var(--space-md);
            font-size: 0.875rem;
            color: var(--gen-medium);
            font-weight: 500;
        }

        .tooltip {
            position: relative;
        }

        .tooltip-content {
            position: absolute;
            bottom: calc(100% + 15px);
            left: 50%;
            transform: translateX(-50%);
            background: var(--gen-dark);
            color: white;
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius-md);
            font-size: 0.75rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition-fast);
            z-index: 1000;
            box-shadow: var(--shadow-lg);
        }

        .tooltip-content::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: var(--gen-dark);
        }

        .tooltip:hover .tooltip-content {
            opacity: 1;
            visibility: visible;
        }

        .results-panel {
            display: none;
        }

        .results-panel.active {
            display: block;
            animation: fadeInUp 0.6s ease-out;
        }

        .result-card {
            background: var(--surface-elevated);
            border-radius: var(--radius-xl);
            padding: var(--space-2xl);
            box-shadow: var(--shadow-generational);
            border: 1px solid rgba(139, 92, 246, 0.1);
            margin-bottom: var(--space-xl);
            position: relative;
            overflow: hidden;
        }

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

        .generation-header {
            text-align: center;
            margin-bottom: var(--space-2xl);
            padding-bottom: var(--space-lg);
            border-bottom: 2px solid var(--surface-generational);
        }

        .generation-name {
            font-size: clamp(2rem, 4vw, 3rem);
            font-weight: 800;
            margin-bottom: var(--space-sm);
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .generation-range {
            font-size: 1.25rem;
            color: var(--gen-medium);
            margin-bottom: var(--space-sm);
            font-weight: 500;
        }

        .generation-age {
            font-size: 1rem;
            color: var(--gen-light);
            font-weight: 500;
        }

        .insights-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: var(--space-xl);
            margin-bottom: var(--space-2xl);
        }

        .insight-card {
            background: var(--surface-generational);
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            border-left: 4px solid var(--primary);
            transition: var(--transition-base);
        }

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

        .insight-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--gen-dark);
            margin-bottom: var(--space-md);
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .insight-content {
            color: var(--gen-medium);
            line-height: 1.7;
        }

        .cultural-section {
            background: var(--surface-generational);
            border-radius: var(--radius-lg);
            padding: var(--space-xl);
            margin-top: var(--space-xl);
        }

        .cultural-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--gen-dark);
            margin-bottom: var(--space-xl);
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-sm);
        }

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

        .cultural-item {
            background: var(--surface-elevated);
            border-radius: var(--radius-md);
            padding: var(--space-lg);
            box-shadow: var(--shadow-sm);
            transition: var(--transition-base);
        }

        .cultural-item:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .cultural-item-title {
            font-weight: 600;
            color: var(--gen-dark);
            margin-bottom: var(--space-sm);
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            font-size: 1rem;
        }

        .cultural-item-content {
            color: var(--gen-medium);
            font-size: 0.875rem;
            line-height: 1.6;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

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

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

            .calculator-panel,
            .result-card,
            .timeline-section {
                padding: var(--space-lg);
            }

            /* Mobile Horizontal Scrollable Timeline */
            .timeline-container {
                overflow-x: auto;
                overflow-y: hidden;
                padding-bottom: var(--space-md);
                margin-bottom: var(--space-lg);
            }

            .timeline-track {
                min-width: 800px;
                /* Ensure timeline is wide enough to scroll */
                height: 100px;
                /* Slightly taller for better touch targets */
                flex-direction: row;
                /* Keep horizontal */
            }

            .timeline-segment {
                height: 100%;
                min-width: 100px;
                /* Minimum width for readability */
                flex: 1;
                font-size: 0.75rem;
                padding: var(--space-sm);
                display: flex;
                align-items: center;
                justify-content: center;
                text-align: center;
                white-space: nowrap;
            }

            .timeline-segment:hover {
                transform: scaleY(1.1);
                z-index: 10;
            }

            .birth-year-marker {
                width: 6px;
                height: 130px;
                /* Taller to accommodate larger timeline */
                top: -15px;
                left: auto;
                right: auto;
                transform: translateX(-3px);
            }

            .birth-year-marker::before {
                top: -35px;
                left: 50%;
                right: auto;
                transform: translateX(-50%);
                white-space: nowrap;
            }

            .birth-year-marker::after {
                top: -15px;
                left: 50%;
                right: auto;
                transform: translateX(-50%);
                border-left: 6px solid transparent;
                border-right: 6px solid transparent;
                border-top: 8px solid var(--gen-dark);
                border-bottom: none;
            }

            .timeline-labels {
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                gap: auto;
                margin-top: var(--space-md);
                min-width: 800px;
                /* Match timeline width */
            }

            .tooltip-content {
                bottom: calc(100% + 15px);
                left: 50%;
                right: auto;
                transform: translateX(-50%);
                white-space: nowrap;
            }

            .tooltip-content::after {
                top: 100%;
                left: 50%;
                right: auto;
                bottom: auto;
                transform: translateX(-50%);
                border-left: 6px solid transparent;
                border-right: 6px solid transparent;
                border-top: 6px solid var(--gen-dark);
                border-bottom: none;
            }

            /* Add scrollbar styling for better UX */
            .timeline-container::-webkit-scrollbar {
                height: 8px;
            }

            .timeline-container::-webkit-scrollbar-track {
                background: var(--surface-generational);
                border-radius: var(--radius-sm);
            }

            .timeline-container::-webkit-scrollbar-thumb {
                background: var(--primary);
                border-radius: var(--radius-sm);
            }

            .timeline-container::-webkit-scrollbar-thumb:hover {
                background: var(--primary-dark);
            }

            /* Add scroll hint */
            .timeline-section {
                position: relative;
            }

            .timeline-section::after {
                content: '← Scroll to explore timeline →';
                position: absolute;
                bottom: var(--space-md);
                left: 50%;
                transform: translateX(-50%);
                font-size: 0.75rem;
                color: var(--gen-medium);
                opacity: 0.7;
                pointer-events: none;
            }

            .insights-grid,
            .cultural-grid {
                grid-template-columns: 1fr;
            }

            .tabs {
                margin-left: var(--space-md);
                margin-right: var(--space-md);
            }
        }

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

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

        *:focus {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }

        .timeline-segment:focus {
            outline: 3px solid var(--primary);
            outline-offset: 3px;
            z-index: 15;
        }