/* ========== Design system: vibrant, animated, professional ========== */
:root {
    --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent-cyan: #22d3ee;
    --accent-violet: #a78bfa;
    --accent-coral: #fb7185;
    --accent-emerald: #34d399;
    --surface: rgba(15, 23, 42, 0.85);
    --surface-glass: rgba(15, 23, 42, 0.6);
    --border-subtle: rgba(148, 163, 184, 0.2);
    --border-glow: rgba(99, 102, 241, 0.5);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #a78bfa 100%);
    --gradient-warm: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
    --gradient-cool: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.5); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes meshMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(2%, 2%) scale(1.02); }
    66% { transform: translate(-1%, 1%) scale(0.98); }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: #030712;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.12), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(167, 139, 250, 0.15), transparent);
    pointer-events: none;
    z-index: 0;
    animation: meshMove 20s ease-in-out infinite;
}

.app-shell {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform var(--transition);
}
.brand-logo-icon:hover { transform: scale(1.05); }
.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: transform var(--transition);
}
.brand-mark:hover { transform: scale(1.05) rotate(-3deg); }

.brand h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f9fafb;
}

.brand p {
    font-size: 0.8rem;
    color: #9ca3af;
}

.nav-item {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.nav-item:hover {
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.35), rgba(15, 23, 42, 0.95));
    color: #f9fafb;
    border-color: rgba(99, 102, 241, 0.8);
    transform: translateY(-1px);
}
.nav-item.active {
    background: var(--gradient-primary);
    color: #f9fafb;
    border-color: rgba(148, 163, 184, 0.8);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

/* User Authentication Section */
.user-auth-section {
    padding: 12px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
}

.user-auth-section .field-label {
    margin-bottom: 8px;
}

.user-auth-section input[type="text"],
.user-auth-section input[type="password"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.8rem;
}

.btn-logout {
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #fca5a5 !important;
}

#username-display {
    word-break: break-word;
}

#user-role-display {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}

.main {
    padding: 28px 36px 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    background: transparent;
}

.top-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.top-bar h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.top-bar-auth {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.user-auth-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Compact login form: stacked, left-aligned, minimal space */
#login-form-display {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
    max-width: 200px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
}

#login-form-display .auth-input,
#login-form-display .btn-compact {
    width: 100%;
    box-sizing: border-box;
}

.user-auth-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e5e7eb;
}

.user-role {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.auth-input {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #e5e7eb;
    min-width: 0;
}

.btn-compact {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Registration modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.modal-card {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-card), 0 0 60px rgba(99, 102, 241, 0.15);
}
.modal-register .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.modal-register .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e5e7eb;
}
.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.modal-close:hover {
    color: #e5e7eb;
}
.modal-register .modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modal-register .modal-body label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}
.modal-register .modal-body .auth-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
}
.form-error {
    font-size: 0.85rem;
    color: #f87171;
    margin: 0;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.top-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0 0;
}

.top-nav-tabs .nav-item {
    width: auto;
    min-width: 0;
    justify-content: center;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.top-nav-tabs .nav-item.active {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.top-bar-home-actions .btn-secondary {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.section {
    display: none;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 28px 28px 32px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    animation: fadeInUp 0.5s ease;
}
.section.active {
    display: block;
    animation: fadeInUp 0.5s ease;
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(99, 102, 241, 0.05);
}

.section h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #e5e7eb;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(34, 211, 238, 0.08) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px 26px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    opacity: 0.6;
}
.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
}

/* Key metrics – Silicon Valley: glassy, vibrant, glowing */
.dashboard-key-metrics .stats { gap: 24px; }
.dashboard-key-metrics .stat-card {
    padding: 26px 28px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.dashboard-key-metrics .stat-card::before {
    height: 4px;
    opacity: 1;
    border-radius: 24px 24px 0 0;
}

.dashboard-key-metrics .stat-card--tests {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.35) 0%, rgba(139, 92, 246, 0.2) 50%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px -8px rgba(99, 102, 241, 0.25);
}
.dashboard-key-metrics .stat-card--tests::before {
    background: linear-gradient(90deg, #6366f1, #a78bfa, #c084fc);
}
.dashboard-key-metrics .stat-card--tests:hover {
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 64px -16px rgba(99, 102, 241, 0.45), 0 0 0 1px rgba(167, 139, 250, 0.2);
}
.dashboard-key-metrics .stat-card--tests p {
    background: linear-gradient(135deg, #c7d2fe 0%, #a78bfa 50%, #e879f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.dashboard-key-metrics .stat-card--validated {
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.35) 0%, rgba(6, 182, 212, 0.2) 50%, rgba(34, 211, 238, 0.1) 100%);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px -8px rgba(34, 211, 238, 0.25);
}
.dashboard-key-metrics .stat-card--validated::before {
    background: linear-gradient(90deg, #22d3ee, #06b6d4, #0891b2);
}
.dashboard-key-metrics .stat-card--validated:hover {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 64px -16px rgba(34, 211, 238, 0.4), 0 0 0 1px rgba(34, 211, 238, 0.15);
}
.dashboard-key-metrics .stat-card--validated p {
    background: linear-gradient(135deg, #67e8f9 0%, #22d3ee 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.dashboard-key-metrics .stat-card--accuracy {
    background: linear-gradient(145deg, rgba(52, 211, 153, 0.35) 0%, rgba(16, 185, 129, 0.2) 50%, rgba(52, 211, 153, 0.1) 100%);
    border-color: rgba(52, 211, 153, 0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px -8px rgba(52, 211, 153, 0.25);
}
.dashboard-key-metrics .stat-card--accuracy::before {
    background: linear-gradient(90deg, #34d399, #10b981, #059669);
}
.dashboard-key-metrics .stat-card--accuracy:hover {
    border-color: rgba(52, 211, 153, 0.65);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 64px -16px rgba(52, 211, 153, 0.4), 0 0 0 1px rgba(52, 211, 153, 0.15);
}
.dashboard-key-metrics .stat-card--accuracy p {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 50%, #10b981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.dashboard-key-metrics .stat-card--variance {
    background: linear-gradient(145deg, rgba(251, 113, 133, 0.35) 0%, rgba(244, 63, 94, 0.2) 50%, rgba(251, 113, 133, 0.1) 100%);
    border-color: rgba(251, 113, 133, 0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px -8px rgba(251, 113, 133, 0.25);
}
.dashboard-key-metrics .stat-card--variance::before {
    background: linear-gradient(90deg, #fda4af, #fb7185, #f43f5e);
}
.dashboard-key-metrics .stat-card--variance:hover {
    border-color: rgba(251, 113, 133, 0.65);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 64px -16px rgba(251, 113, 133, 0.4), 0 0 0 1px rgba(251, 113, 133, 0.15);
}
.dashboard-key-metrics .stat-card--variance p {
    background: linear-gradient(135deg, #fecdd3 0%, #fb7185 50%, #f43f5e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.dashboard-key-metrics .stat-card--stability {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.35) 0%, rgba(245, 158, 11, 0.2) 50%, rgba(251, 191, 36, 0.1) 100%);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px -8px rgba(251, 191, 36, 0.28);
}
.dashboard-key-metrics .stat-card--stability::before {
    background: linear-gradient(90deg, #fde047, #fbbf24, #f59e0b);
}
.dashboard-key-metrics .stat-card--stability:hover {
    border-color: rgba(251, 191, 36, 0.7);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 64px -16px rgba(251, 191, 36, 0.45), 0 0 0 1px rgba(251, 191, 36, 0.2);
}
.dashboard-key-metrics .stat-card--stability p {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.dashboard-key-metrics .stat-card h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}
.dashboard-key-metrics .stat-card p {
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.stat-card h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.stat-card p {
    font-size: 1.75rem;
    background: var(--gradient-cool);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Hero Section - Semilattice Style */
.hero-section {
    text-align: center;
    padding: 80px 0 60px;
    margin-bottom: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.15s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: #6366f1;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-hero-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-hero-secondary {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
    border-color: rgba(148, 163, 184, 0.6);
    background: rgba(148, 163, 184, 0.05);
}

/* How It Works Section */
.how-it-works {
    margin-bottom: 100px;
    padding: 0 24px;
}

.section-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e5e7eb;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subheading {
    font-size: 1.1rem;
    color: #9ca3af;
    text-align: center;
    margin-bottom: 60px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: transform var(--transition);
}
.step-item:hover .step-number { transform: scale(1.08); }

.step-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.step-content p {
    font-size: 1rem;
    color: #9ca3af;
    line-height: 1.6;
}

/* Use Cases Section */
.use-cases {
    margin-bottom: 100px;
    padding: 0 24px;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.use-case-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(34, 211, 238, 0.08) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all var(--transition);
}
.use-case-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.2);
}

.use-case-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.use-case-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.use-case-card p {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(34, 211, 238, 0.1) 50%, rgba(167, 139, 250, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    margin: 80px 0 40px;
    backdrop-filter: blur(12px);
    transition: all var(--transition);
}
.cta-section:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.15);
}

.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 1.1rem;
    color: #9ca3af;
    margin-bottom: 32px;
}

.btn-cta {
    background: linear-gradient(135deg, #6366f1 0%, #22c1c3 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.dashboard-navigation {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--text);
    border: 1px solid rgba(99, 102, 241, 0.4);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

/* Comic Strip Banner */
.comic-strip-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(34, 193, 195, 0.15) 100%);
    border: 2px dashed rgba(99, 102, 241, 0.5);
    border-radius: 20px;
    padding: 28px 32px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
    animation: comicPulse 3s ease-in-out infinite;
}

.comic-strip-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: comicRotate 20s linear infinite;
    pointer-events: none;
}

@keyframes comicPulse {
    0%, 100% {
        border-color: rgba(99, 102, 241, 0.5);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.3);
    }
    50% {
        border-color: rgba(99, 102, 241, 0.8);
        box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.2);
    }
}

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

.comic-strip-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.comic-strip-icon {
    font-size: 4rem;
    animation: comicBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.4));
}

@keyframes comicBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.comic-strip-text {
    flex: 1;
}

.comic-strip-text h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
    line-height: 1.3;
}

.comic-strip-text p {
    font-size: 1rem;
    color: #a5b4fc;
    margin: 4px 0;
    line-height: 1.5;
}

.btn-comic {
    background: linear-gradient(135deg, #6366f1 0%, #22c1c3 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-comic:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-comic:active {
    transform: translateY(0) scale(1);
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
    }
    
    .section-heading {
        font-size: 2rem;
    }
    
    .section-subheading {
        font-size: 1rem;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-section {
        padding: 40px 24px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .btn-cta {
        width: 100%;
    }
    
    .comic-strip-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .comic-strip-icon {
        font-size: 3rem;
    }
    
    .comic-strip-text h3 {
        font-size: 1.2rem;
    }
    
    .btn-comic {
        width: 100%;
    }
    
    .dashboard-navigation {
        flex-direction: column;
    }
    
    .dashboard-navigation button {
        width: 100%;
    }
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.survey-card {
    background: radial-gradient(circle at top left, #020617 0, #020617 60%);
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.survey-card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e5e7eb;
}

.survey-card p {
    font-size: 0.85rem;
    color: #9ca3af;
}

.survey-card small {
    font-size: 0.75rem;
    color: #64748b;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 6px;
}

.panel {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 20px 22px 22px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition);
}
.panel:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.panel h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.field-label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: #9ca3af;
    gap: 4px;
    margin-bottom: 10px;
}

input[type="text"],
input[type="password"],
textarea {
    background: rgba(2, 6, 23, 0.8);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    resize: vertical;
    transition: all var(--transition);
}
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all var(--transition);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    animation: gradientShift 3s ease infinite;
}
.btn-primary:active { transform: translateY(0); }

.btn-primary.full-width {
    width: 100%;
    margin-top: 4px;
}

.results-pre {
    background: #020617;
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #d1d5db;
    max-height: 500px;
    overflow: auto;
    white-space: normal;
}

/* Formatted Results Display */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.results-header h3 {
    font-size: 1rem;
    color: #e5e7eb;
    margin: 0;
}

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

.btn-download {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn-download:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.6);
    color: #c7d2fe;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 3px solid;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 6px;
    letter-spacing: 0.1em;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #a5b4fc;
}

.test-results-list {
    margin-top: 16px;
}

.test-results-list h4 {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.test-item {
    background: radial-gradient(circle at top left, #020617 0, #020617 60%);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-left: 3px solid rgba(99, 102, 241, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.test-item.error {
    border-left-color: #ef4444;
}

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

.test-header strong {
    font-size: 0.85rem;
    color: #e5e7eb;
    font-weight: 600;
}

.tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.test-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.metric {
    font-size: 0.8rem;
    color: #9ca3af;
}

.metric strong {
    color: #d1d5db;
    font-weight: 600;
}

.error-text {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Tab System */
.validation-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.9);
    padding-bottom: 8px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
}

.tab-btn.active {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border-bottom: 2px solid #6366f1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* File Upload Styles */
input[type="file"] {
    width: 100%;
    padding: 8px;
    background: #020617;
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 0.85rem;
    cursor: pointer;
}

input[type="file"]:focus {
    outline: 2px solid rgba(129, 140, 248, 0.9);
    outline-offset: 1px;
}

.file-info {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

select {
    background: #020617;
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 8px;
    padding: 7px 9px;
    color: #e5e7eb;
    font-size: 0.85rem;
    width: 100%;
    cursor: pointer;
}

select:focus {
    outline: 2px solid rgba(129, 140, 248, 0.9);
    outline-offset: 1px;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.help-text {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 12px;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-style: italic;
}

.file-info-section {
    font-size: 0.85rem;
    color: #9ca3af;
}

.file-info-section p {
    margin: 4px 0;
}

/* Reports 2x2 Grid */
.reports-grid-2x2,
.reports-grid,
.reports-grid-three {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}
.reports-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
}
.reports-grid-three {
    grid-template-columns: repeat(3, 1fr);
}

/* Dashboard & Reports layout inspired by landing wireframe */
.dashboard-key-metrics {
    margin-bottom: 40px;
}

.dashboard-key-metrics .section-subrow {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}
.dashboard-key-metrics .section-subrow h3 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 30%, #818cf8 60%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dashboard-key-metrics .section-subrow .subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

.reports-intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 16px 0 28px;
}

.reports-intro-grid .intro-card {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.reports-intro-grid .intro-card h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.reports-intro-grid .intro-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.reports-section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.reports-section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(55, 65, 81, 0.9);
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: rgba(55, 65, 81, 0.9);
    border-color: rgba(99, 102, 241, 0.5);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #6366f1, #22c1c3);
    border-color: #6366f1;
    color: white;
}

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

.pagination-ellipsis {
    padding: 8px 4px;
    color: #9ca3af;
}

/* Report Card 2x2 Design */
.report-card-2x2 {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(2, 6, 23, 0.95) 100%);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--transition);
    transition: all 0.3s ease;
    min-height: 400px;
}

.report-card-2x2:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Top Half: Seed Characteristics */
.report-card-seed-section {
    padding: 20px;
    border-bottom: 2px solid rgba(55, 65, 81, 0.5);
    background: rgba(15, 23, 42, 0.3);
}

.seed-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.seed-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

.seed-characteristics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.seed-char-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seed-section-title .seed-label-bold,
.seed-char-label {
    font-weight: 700;
}
.seed-section-title .seed-value-normal {
    font-weight: 400;
}
.seed-char-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.seed-char-value {
    font-size: 0.9rem;
    color: #e5e7eb;
    font-weight: 400;
    word-break: break-word;
}

/* Bottom Half: Synthetic Results */
.report-card-synthetic-section {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.synthetic-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.synthetic-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0;
}

.overall-accuracy-badge {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 2px solid;
    background: transparent;
}

.synthetic-test-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.test-results-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-results-grid .test-result-item--extra {
    display: none;
}
.test-results-grid.is-expanded .test-result-item--extra {
    display: flex;
}

.test-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 6px;
    gap: 12px;
}

.test-result-name {
    flex: 1;
    font-size: 0.85rem;
    color: #d1d5db;
}

.test-result-accuracy {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

.test-result-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.test-result-item.more-tests {
    background: rgba(99, 102, 241, 0.12);
    font-style: normal;
    color: #a5b4fc;
    cursor: pointer;
    border: 1px dashed rgba(148, 163, 184, 0.4);
}
.test-result-item.more-tests:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

.test-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.summary-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e5e7eb;
}

.report-card-actions-2x2 {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}

.btn-view-details {
    flex: 1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(34, 193, 195, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-view-details:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(34, 193, 195, 0.3));
    border-color: rgba(99, 102, 241, 0.6);
    color: #c7d2fe;
    transform: translateY(-2px);
}

/* Report Cards */
.report-card {
    background: radial-gradient(circle at top left, #020617 0, #020617 60%);
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(55, 65, 81, 0.5);
    border-color: rgba(99, 102, 241, 0.4);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.report-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0;
}

.report-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.report-metric:last-child {
    border-bottom: none;
}

.report-metric .metric-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.report-metric .metric-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e5e7eb;
}

.report-test-breakdown {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}

.test-tier-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.test-tier-item {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.test-tier-item.tier-1 {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.test-tier-item.tier-2 {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.test-tier-item.tier-3 {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.report-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* Industry Survey Reports: S3 section */
.industry-s3-section .help-text {
    margin-bottom: 12px;
    color: var(--text-muted);
}
.industry-subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

/* Industry Survey Cards */
.industry-survey-card {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-left: 5px solid;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.industry-survey-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(99, 102, 241, 0.4);
}

.industry-survey-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.industry-survey-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 2px solid;
    flex-shrink: 0;
}

.industry-survey-title-section {
    flex: 1;
    min-width: 0;
}

.industry-survey-domain {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.industry-survey-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
    line-height: 1.4;
}

.industry-survey-description {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.industry-survey-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
}

.industry-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.industry-stat-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.industry-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e5e7eb;
}

.industry-survey-links {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.industry-link-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
}

.industry-link-button:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.industry-link-button span {
    font-size: 1rem;
}

.btn-view {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s ease;
    flex: 1;
    min-width: 100px;
}

.btn-view:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.6);
    color: #c7d2fe;
}

/* Industry Survey References */
.industry-survey-references {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reference-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reference-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.reference-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.reference-toggle span:first-child {
    font-size: 1.1rem;
}

.toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    margin-left: auto;
}

.reference-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reference-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: rgba(15, 23, 42, 0.3);
}

.reference-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    border-color: currentColor;
    color: #e5e7eb;
}

.reference-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.reference-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.reference-arrow {
    font-size: 1rem;
    opacity: 0.6;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.reference-link:hover .reference-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.btn-download-small {
    background: rgba(55, 65, 81, 0.4);
    border: 1px solid rgba(55, 65, 81, 0.6);
    color: #9ca3af;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn-download-small:hover {
    background: rgba(55, 65, 81, 0.6);
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* Enhanced Test Results Display */
.test-category {
    margin-bottom: 24px;
}

.category-title {
    font-size: 0.9rem;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

.test-interpretation {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
    margin-top: 4px;
    font-weight: normal;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.test-header > div {
    flex: 1;
}

.metrics-primary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border-left: 3px solid rgba(99, 102, 241, 0.4);
}

.metrics-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-item.primary {
    background: rgba(99, 102, 241, 0.1);
    padding: 8px;
    border-radius: 6px;
}

.metric-item .metric-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-item .metric-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e5e7eb;
}

.metric-item.primary .metric-value {
    font-size: 1.1rem;
    color: #a5b4fc;
}

.error-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.test-summary-box {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.test-summary-box h4 {
    font-size: 0.9rem;
    color: #a5b4fc;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
}

.summary-stat .stat-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-stat .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e5e7eb;
}

/* User-Friendly Results Display */
.main-result-card {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-result-icon {
    font-size: 4rem;
    flex-shrink: 0;
}

.main-result-content {
    flex: 1;
}

.main-result-content h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.main-result-description {
    font-size: 1rem;
    color: #d1d5db;
    margin-bottom: 16px;
    line-height: 1.5;
}

.accuracy-display {
    margin-top: 16px;
}

.accuracy-label {
    font-size: 0.85rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.accuracy-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.quick-stat {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.quick-stat-content {
    flex: 1;
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.quick-stat-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.test-results-simple {
    margin-bottom: 24px;
}

.section-description {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 16px;
    line-height: 1.5;
}

.test-item-simple {
    background: radial-gradient(circle at top left, #020617 0, #020617 60%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.test-item-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.test-name-simple {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
    flex: 1;
}

.test-status-simple {
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.simple-metric {
    text-align: center;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
}

.simple-metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #a5b4fc;
    margin-bottom: 4px;
}

.simple-metric-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recommendations-box {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid;
    border: 1px solid rgba(55, 65, 81, 0.9);
    margin-top: 24px;
}

.recommendations-box h4 {
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.recommendations-box p {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 12px;
}

.recommendations-box ul {
    color: #d1d5db;
    padding-left: 20px;
    line-height: 1.8;
}

.recommendations-box li {
    margin-bottom: 6px;
}

/* Empty Results State */
.empty-results-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-results-state h3 {
    font-size: 1.5rem;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.empty-results-state p {
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Enhanced Error States */
.error-state-enhanced {
    animation: fadeInError 0.6s ease-out;
    padding: 80px 20px;
}

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

.error-icon-animated {
    position: relative;
    display: inline-block;
    margin-bottom: 32px;
    animation: errorIconBounce 1s ease-out;
}

@keyframes errorIconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    70% {
        transform: scale(0.9) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.error-icon-circle-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 4px solid #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.4);
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(239, 68, 68, 0.6);
        transform: scale(1.05);
    }
}

.error-icon-emoji-large {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(239, 68, 68, 0.3));
    animation: errorWiggle 2s ease-in-out infinite;
}

@keyframes errorWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

.error-pulse-ring-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 3px solid #ef4444;
    border-radius: 50%;
    opacity: 0.6;
    animation: errorRingPulse 2s ease-out infinite;
}

.error-pulse-ring-large:nth-child(2) {
    animation-delay: 0.4s;
    width: 160px;
    height: 160px;
}

.error-pulse-ring-large:nth-child(3) {
    animation-delay: 0.8s;
    width: 200px;
    height: 200px;
}

@keyframes errorRingPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.error-title-enhanced {
    font-size: 2rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    animation: errorTitleSlide 0.8s ease-out;
}

@keyframes errorTitleSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.error-message-enhanced {
    font-size: 1.1rem;
    color: #d1d5db;
    margin-bottom: 24px;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-details-enhanced {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 24px auto;
    max-width: 600px;
}

.error-details-enhanced code {
    color: #fca5a5;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-word;
    line-height: 1.6;
}

.error-action-button {
    margin-top: 32px;
    animation: errorButtonFade 1s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

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

/* Notification Toast System */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 360px;
    max-width: 500px;
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 16px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
    transform: translateX(400px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: notificationSlideOut 0.3s ease-out;
}

.notification-toast.notification-show {
    opacity: 1;
    transform: translateX(0) scale(1);
    animation: notificationSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(400px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(400px) scale(0.9);
    }
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.notification-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    flex-shrink: 0;
    animation: notificationIconBounce 0.6s ease-out;
}

@keyframes notificationIconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.notification-icon-emoji {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.notification-message {
    font-size: 0.9rem;
    color: #d1d5db;
    line-height: 1.5;
    word-wrap: break-word;
}

.notification-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: rgba(55, 65, 81, 0.5);
    color: #e5e7eb;
    transform: rotate(90deg);
}

.notification-progress {
    height: 3px;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0.8;
}

@keyframes notificationProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Error Display Card Component */
.error-display-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    max-width: 800px;
    margin: 0 auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.error-display-card {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 16px;
    border: 2px solid #ef4444;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.3);
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.error-display-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444 0%, #f87171 50%, #ef4444 100%);
    animation: errorScan 2s linear infinite;
}

@keyframes errorScan {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.error-display-card.error-display-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.error-display-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.error-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 3px solid #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
    animation: errorIconPulse 2s ease-in-out infinite;
}

@keyframes errorIconPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 50px rgba(239, 68, 68, 0.6);
        transform: scale(1.1);
    }
}

.error-icon-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.3));
}

.error-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border: 2px solid #ef4444;
    border-radius: 50%;
    opacity: 0.6;
    animation: errorRingExpand 2s ease-out infinite;
}

.error-pulse-ring:nth-child(2) {
    animation-delay: 0.4s;
    width: 90px;
    height: 90px;
}

@keyframes errorRingExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

.error-display-content {
    position: relative;
    z-index: 1;
}

.error-display-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.error-display-message {
    font-size: 1rem;
    color: #d1d5db;
    margin-bottom: 16px;
    line-height: 1.6;
}

.error-display-details {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
}

.error-display-details code {
    color: #fca5a5;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-word;
}

.error-display-actions {
    margin-top: 16px;
}

.error-display-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(55, 65, 81, 0.5);
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.error-display-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

/* Results Page Specific Styles */
#results-content {
    min-height: 400px;
}

/* File Info Box */
.file-info-box {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.file-info-box h4 {
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.file-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.file-info-item {
    background: rgba(15, 23, 42, 0.5);
    padding: 12px;
    border-radius: 8px;
}

.file-info-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.file-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-info-detail {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Semilattice-style Results Page */
.model-details-card {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.model-details-card.model-details-compact {
    padding: 14px 18px;
    margin-bottom: 14px;
}

.model-details-compact .model-details-header {
    margin-bottom: 12px;
}

.model-details-compact .model-details-header h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.model-details-compact .model-description {
    font-size: 0.875rem;
}

.model-details-compact .model-details-grid {
    margin-top: 12px;
    gap: 10px;
}

.model-details-compact .model-detail-item {
    padding: 8px 10px;
}

.model-details-compact .model-detail-label {
    margin-bottom: 4px;
    font-size: 0.7rem;
}

.model-details-compact .model-detail-value {
    font-size: 0.875rem;
}

.model-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.model-details-header h3 {
    font-size: 1.5rem;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.model-description {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.5;
}

.model-id-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-id {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.5);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
}

.model-id-label {
    color: #9ca3af;
    font-size: 0.85rem;
}

.model-id-value {
    color: #e5e7eb;
    font-size: 0.9rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: #e5e7eb;
}

.model-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.model-detail-item {
    background: rgba(15, 23, 42, 0.5);
    padding: 12px;
    border-radius: 8px;
}

.model-detail-item.full-width {
    grid-column: 1 / -1;
}

.model-detail-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.model-detail-value {
    font-size: 0.95rem;
    color: #e5e7eb;
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
}

.model-detail-value.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

/* Statistical Methodology Section */
.statistical-methodology-section {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

#results-content .statistical-methodology-section {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
}

#results-content .statistical-methodology-section .methodology-header {
    margin-bottom: 14px;
}

#results-content .statistical-methodology-section .methodology-header h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

#results-content .statistical-methodology-section .methodology-description {
    font-size: 0.875rem;
    line-height: 1.5;
}

#results-content .statistical-methodology-section .methodology-tests-grid {
    gap: 12px;
    margin-bottom: 14px;
}

#results-content .statistical-methodology-section .methodology-test-item {
    padding: 12px;
}

.methodology-header {
    margin-bottom: 24px;
}

.methodology-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.methodology-description {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.methodology-tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.methodology-test-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(55, 65, 81, 0.5);
    transition: all 0.2s ease;
}

.methodology-test-item:hover {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.test-method-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.test-method-content {
    flex: 1;
}

.test-method-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.test-method-desc {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
}

.methodology-note {
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.6;
}

.methodology-note strong {
    color: #e5e7eb;
}

/* Results Tabs */
.results-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.results-tab {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.results-tab:hover {
    color: #e5e7eb;
}

.results-tab.active {
    color: #e5e7eb;
    border-bottom-color: #00D4EC;
}

.results-tab-content {
    display: none;
}

.results-tab-content.active {
    display: block;
}

/* Overview Stats */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.overview-stat-card {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #6b7280;
}

.overview-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.overview-stat-label {
    font-size: 0.85rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced Overview Styles */
.overview-hero-card {
    position: relative;
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 32px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.overview-hero-card:hover {
    transform: translateY(-4px);
}

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

.hero-card-decoration {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--tier-color, #00D4EC) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

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

.hero-content-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-text-content {
    flex: 1;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1rem;
    color: #9ca3af;
    font-weight: 500;
}

.hero-accuracy-display {
    position: relative;
    z-index: 1;
}

.accuracy-number-wrapper {
    text-align: center;
    margin-bottom: 24px;
}

.overall-accuracy-value-hero {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--tier-color, #00D4EC) 0%, var(--tier-color, #00D4EC)dd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.accuracy-percent-symbol {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.hero-progress-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.progress-bar-hero-wrapper {
    width: 100%;
    height: 12px;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-hero {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

.tier-badge-hero {
    padding: 12px 24px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    color: white;
}

.tier-badge-icon {
    font-size: 1.2rem;
}

.tier-badge-text {
    text-transform: uppercase;
}

/* Enhanced Stat Cards */
.overview-stats-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.overview-stat-card-enhanced {
    position: relative;
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 16px;
    padding: 24px;
    border-left: 5px solid var(--stat-color, #6b7280);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

.overview-stat-card-enhanced:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-left-width: 6px;
}

.stat-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overview-stat-card-enhanced:hover .stat-card-glow {
    opacity: 1;
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.stat-card-content {
    position: relative;
    z-index: 1;
}

.overview-stat-value-enhanced {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--stat-color, #6b7280) 0%, var(--stat-color, #6b7280)dd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overview-stat-label-enhanced {
    font-size: 0.9rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-card-subtext {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
}

/* Enhanced Recommendations */
.recommendations-section-enhanced {
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

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

.recommendations-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

.recommendations-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border-left: 3px solid rgba(251, 191, 36, 0.6);
    transition: all 0.2s ease;
}

.recommendation-item:hover {
    background: rgba(15, 23, 42, 0.7);
    border-left-color: rgba(251, 191, 36, 1);
    transform: translateX(4px);
}

.recommendation-bullet {
    color: #fbbf24;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.recommendation-item span:last-child {
    color: #d1d5db;
    line-height: 1.6;
}

/* Questions Table */
.questions-table-container {
    overflow-x: auto;
    background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
    border-radius: 12px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.questions-table {
    width: 100%;
    border-collapse: collapse;
}

.questions-table thead {
    background: rgba(15, 23, 42, 0.8);
}

.questions-table th {
    padding: 16px;
    text-align: left;
    color: #9ca3af;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.questions-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    color: #e5e7eb;
}

.questions-table tbody tr:hover {
    background: rgba(15, 23, 42, 0.5);
}

.question-cell {
    min-width: 200px;
}

.question-number {
    display: inline-block;
    background: rgba(0, 212, 236, 0.2);
    color: #00D4EC;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.question-text {
    display: inline;
    font-size: 0.9rem;
}

.answer-options-cell {
    min-width: 250px;
    max-width: 350px;
}

.options-comparison-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.option-comparison-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 6px;
}

.option-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.option-bars {
    display: flex;
    gap: 2px;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
}

.option-bar {
    height: 100%;
    transition: width 0.3s ease;
    min-width: 2px;
}

.option-bar.synthetic {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Question bar chart: Y = options, X = count; Humans green, Synthetic red */
.q-bar-chart {
    min-width: 200px;
    font-size: 0.8rem;
}
.q-bar-chart-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.q-bar-legend-item {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}
.q-bar-chart-y-axis-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.q-bar-chart-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.q-bar-row {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) 1fr;
    align-items: center;
    gap: 10px;
}
.q-bar-y-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    color: var(--text);
}
.q-bar-group {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.q-bar-slot {
    flex: 1;
    min-width: 0;
    height: 18px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}
.q-bar-slot .q-bar {
    flex: 0 0 auto;
}
.q-bar-count-inline {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    color: #e5e7eb;
    pointer-events: none;
}
.q-bar-count-inline.human { color: #22c55e; }
.q-bar-count-inline.synthetic { color: #ef4444; }
.q-bar-chart .q-bar {
    height: 100%;
    min-width: 2px;
    transition: width 0.3s ease;
}
.q-bar-counts {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 4ch;
}
.q-bar-count.human { color: #22c55e; }
.q-bar-count.synthetic { color: #ef4444; }

.option-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 2px;
}

.option-value-syn {
    color: rgba(99, 102, 241, 0.8);
}

.option-value-real {
    color: rgba(34, 193, 195, 0.8);
}

.sparkline-cell {
    min-width: 120px;
    text-align: center;
    vertical-align: middle;
}

.sparkline-chart {
    display: block;
    margin: 0 auto;
}

.sparkline-placeholder {
    font-size: 0.7rem;
    color: #6b7280;
    text-align: center;
    padding: 8px;
}

.comparison-cell {
    min-width: 250px;
}

.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comparison-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comparison-bar-label {
    font-size: 0.75rem;
    color: #9ca3af;
    min-width: 60px;
    text-align: right;
}

.comparison-bar {
    height: 20px;
    border-radius: 4px;
    min-width: 20px;
    transition: width 0.3s;
}

.comparison-bar-value {
    font-size: 0.8rem;
    color: #e5e7eb;
    min-width: 40px;
    text-align: right;
}

.type-cell {
    color: #9ca3af;
    font-size: 0.85rem;
}

.match-score-cell {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Summary Section */
.summary-section {
    margin-bottom: 24px;
}

.summary-section h4 {
    color: #e5e7eb;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.test-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.test-result-card {
    background: rgba(15, 23, 42, 0.5);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #6b7280;
}

.test-result-name {
    color: #e5e7eb;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.test-result-status {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(55, 65, 81, 0.9);
}

/* Results Highlight Animation */
.results-highlight {
    animation: highlightPulse 2s ease-in-out;
    border: 2px solid rgba(99, 102, 241, 0.6) !important;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
        border-color: rgba(99, 102, 241, 0.9);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(99, 102, 241, 0.4);
        border-color: rgba(99, 102, 241, 1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
        border-color: rgba(55, 65, 81, 0.9);
    }
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 18px;
    }

    .nav-list {
        flex-direction: row;
        gap: 6px;
    }

    .main {
        padding-inline: 18px;
    }

    .two-column {
        grid-template-columns: 1fr;
    }
}

/* Home Page Styles */
.home-hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 50%, rgba(236, 72, 153, 0.15) 100%);
    border-radius: 24px;
    padding: 20px 22px;
    margin-bottom: 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
}

/* Compact variant when hero is used in the header */
.header-hero {
    margin-bottom: 0;
    min-width: 0;
}

.header-hero .hero-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    text-align: left;
    min-width: 0;
}

.header-hero .hero-text-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.header-hero .hero-brand-logo {
    height: 36px;
    width: auto;
    margin-bottom: 0;
    flex-shrink: 0;
    object-fit: contain;
}

.header-hero .hero-title {
    font-size: 2rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.header-hero .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.header-hero .hero-badges {
    justify-content: flex-start;
    gap: 8px;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.hero-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
    display: inline-block;
}

.hero-brand-logo {
    height: 44px;
    width: auto;
    margin-bottom: 20px;
    display: inline-block;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #9ca3af;
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.badge {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    border: none;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.badge:nth-child(1) { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.badge:nth-child(2) { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.badge:nth-child(3) { background: linear-gradient(135deg, #34d399, #10b981); }
.badge:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.home-section {
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease;
}

.section-card {
    background: var(--surface-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    backdrop-filter: blur(16px);
    transition: all var(--transition);
}
.section-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
    transform: translateY(-6px);
}

.section-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-card > p {
    font-size: 1.1rem;
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 32px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateX(4px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.9rem;
    color: #9ca3af;
    margin: 0;
}

.purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.purpose-card {
    padding: 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.purpose-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transition: width var(--transition);
}

.purpose-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
}

.purpose-card:hover::before {
    width: 100%;
    opacity: 0.1;
}

.purpose-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1;
}

.purpose-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.purpose-card p {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.step-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.step-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 60px;
    bottom: -24px;
    width: 2px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.5) 0%, transparent 100%);
    z-index: 0;
}

.step-item:last-child::before {
    display: none;
}

.step-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateX(8px);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.step-content {
    flex: 1;
    padding-top: 4px;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 1rem;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

.step-content strong {
    color: #a5b4fc;
    font-weight: 600;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.cta-primary,
.cta-secondary {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.cta-secondary {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

.cta-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.benefit-card {
    padding: 28px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
    text-align: center;
}

.benefit-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.benefit-card:nth-child(2) .benefit-icon {
    animation-delay: 0.2s;
}

.benefit-card:nth-child(3) .benefit-icon {
    animation-delay: 0.4s;
}

.benefit-card:nth-child(4) .benefit-icon {
    animation-delay: 0.6s;
}

.benefit-card:nth-child(5) .benefit-icon {
    animation-delay: 0.8s;
}

.benefit-card:nth-child(6) .benefit-icon {
    animation-delay: 1s;
}

.benefit-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.benefit-card p {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

.stats-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.stat-showcase-item {
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-showcase-item:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Responsive Design for Home Page */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-card {
        padding: 24px;
    }
    
    .purpose-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-item::before {
        display: none;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Market Research Reverse Engineering */
.market-research-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .market-research-container {
        grid-template-columns: 1fr;
    }
}

.market-research-upload-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 16px;
}

.market-research-upload-row .field-label {
    flex: 1;
    min-width: 180px;
}

.market-research-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.market-research-status.loading {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.market-research-status.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.market-research-status.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Industry Surveys - S3 filter dropdown */
.industry-s3-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.industry-s3-filter-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #94a3b8;
}

.industry-s3-filter-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    font-size: 0.9rem;
    min-width: 180px;
}

.industry-s3-filter-select:hover,
.industry-s3-filter-select:focus {
    border-color: #3b82f6;
    outline: none;
}

/* Industry Surveys - S3 grouping, collapse, pagination */
.industry-s3-group {
    margin-bottom: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.4);
}

.industry-s3-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    color: #e2e8f0;
    transition: background 0.15s ease;
}

.industry-s3-group-header:hover {
    background: rgba(59, 130, 246, 0.08);
}

.industry-s3-group-chevron {
    font-size: 0.7rem;
    color: #93c5fd;
    transition: transform 0.2s ease;
}

.industry-s3-group-header h3 {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #93c5fd;
    margin: 0;
    text-transform: none;
    letter-spacing: 0.02em;
}

.industry-s3-group-count {
    font-size: 0.8rem;
    color: #94a3b8;
}

.industry-s3-group-body {
    padding: 0 16px 16px;
    transition: max-height 0.25s ease;
}

.industry-s3-group-body.collapsed {
    display: none;
}

.industry-s3-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.industry-s3-card {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(30, 41, 59, 0.5);
    transition: border-color 0.15s ease;
}

.industry-s3-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.industry-s3-card .industry-survey-title {
    font-size: 0.9rem;
    margin: 0 0 6px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.industry-s3-card .industry-survey-description {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0 0 10px 0;
}

.industry-s3-card .industry-s3-dl {
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #3b82f6;
    color: #93c5fd;
    text-decoration: none;
    display: inline-block;
}

.industry-s3-card .industry-s3-dl:hover {
    background: rgba(59, 130, 246, 0.15);
}

.industry-s3-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.industry-s3-page-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: transparent;
    color: #e2e8f0;
    font-size: 0.85rem;
    cursor: pointer;
}

.industry-s3-page-btn:hover:not(:disabled) {
    border-color: #3b82f6;
    color: #93c5fd;
}

.industry-s3-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.industry-s3-page-info {
    font-size: 0.85rem;
    color: #94a3b8;
}

.market-research-download-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.market-research-section-panel {
    margin-bottom: 24px;
}

.market-research-section-panel h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #a5b4fc;
    margin-bottom: 12px;
}

.market-research-output {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 8px;
}

.market-research-questionnaire-list .mre-q-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
}

.market-research-questionnaire-list .mre-q-num {
    flex-shrink: 0;
    font-weight: 700;
    color: #94a3b8;
}

.market-research-questionnaire-list .mre-q-body {
    flex: 1;
}

.market-research-questionnaire-list .mre-q-survey {
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 6px;
}

.market-research-questionnaire-list .mre-q-type {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.market-research-questionnaire-list .mre-q-options-list {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
    line-height: 1.6;
}

.mre-q-survey-only .mre-q-survey {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.mre-q-survey-only .mre-q-options-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.mre-q-survey-only .mre-q-options-list {
    margin-top: 4px;
}

.mre-q-opt-value {
    font-weight: 600;
    color: #67e8f9;
    margin-left: 6px;
}

.mre-raw-section {
    margin: 0;
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 0.9rem;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    max-height: 60vh;
    overflow-y: auto;
}

.mre-no-api-key-banner {
    padding: 16px;
    margin-bottom: 24px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 12px;
    color: #fcd34d;
    font-size: 0.95rem;
    line-height: 1.5;
}

.mre-block {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.mre-block:last-child {
    border-bottom: none;
}

.mre-block h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #a5b4fc;
    margin-bottom: 16px;
}

.mre-block ul {
    margin: 0;
    padding-left: 24px;
    color: #cbd5e1;
    line-height: 1.7;
}

.mre-section {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border-left: 4px solid rgba(99, 102, 241, 0.5);
}

.mre-section strong {
    color: #e5e7eb;
    display: block;
    margin-bottom: 6px;
}

.mre-section p {
    margin: 0;
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.5;
}

.mre-question {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
}

.mre-question > div {
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.mre-question > div:last-child {
    margin-bottom: 0;
}

.mre-question strong {
    color: #94a3b8;
    font-weight: 600;
    margin-right: 8px;
}

.mre-q-ref,
.mre-q-intent,
.mre-q-survey,
.mre-q-type,
.mre-q-options,
.mre-q-segment,
.mre-q-pattern {
    color: #cbd5e1;
}

.mre-q-options ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.market-research-raw {
    margin-top: 24px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.market-research-raw summary {
    cursor: pointer;
    color: #94a3b8;
    font-weight: 600;
}

.market-research-raw pre {
    margin-top: 12px;
    padding: 12px;
    overflow-x: auto;
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========== Mobile-first / small screen ========== */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0 12px 0 0;
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 10px;
    color: #e5e7eb;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}
.mobile-menu-btn:hover {
    background: rgba(99, 102, 241, 0.4);
}
.mobile-menu-btn:active {
    transform: scale(0.96);
}

.top-bar-content {
    flex: 1;
    min-width: 360px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
    }
    body {
        overflow-x: hidden;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-shell.mobile-menu-open .sidebar-overlay {
        display: block;
        opacity: 1;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 85vw);
        max-width: 320px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.25s ease-out, box-shadow 0.25s ease;
        flex-direction: column;
        align-items: stretch;
        padding: 20px 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .app-shell.mobile-menu-open .sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
    }
    .sidebar .nav-list {
        flex-direction: column;
    }
    .sidebar .nav-item {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        min-height: 44px;
    }
    .app-shell.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    .app-shell.mobile-menu-open.sidebar-collapsed .sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle {
        right: 12px;
        top: 20px;
    }

    .main {
        padding: 16px 14px 32px;
        min-width: 0;
    }

    .top-bar {
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    .top-bar h2 {
        font-size: 1.25rem;
        line-height: 1.3;
        word-break: break-word;
    }
    .subtitle {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .section {
        padding: 16px 14px 24px;
        border-radius: 14px;
    }
    .section-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .section-header-row .btn-primary {
        width: 100%;
    }

    .home-hero {
        padding: 32px 20px 40px;
    }
    .hero-brand-logo {
        max-width: 120px;
        height: auto;
    }
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .hero-badges {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    .hero-badges .badge {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .section-card {
        padding: 18px 14px;
    }
    .feature-grid,
    .purpose-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .feature-item {
        flex-direction: row;
        gap: 12px;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .reports-grid-2x2,
    .reports-grid-three {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }
    .stat-card {
        padding: 14px 16px;
    }

    .validation-tabs,
    .results-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    .validation-tabs .tab-btn,
    .results-tabs .results-tab {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .questions-table-container {
        -webkit-overflow-scrolling: touch;
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .questions-table th,
    .questions-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    .questions-table .question-cell .question-text {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .report-card-2x2,
    .report-card {
        padding: 14px 12px;
    }
    .report-card-seed-section,
    .report-card-synthetic-section {
        padding: 14px 12px;
    }
    .report-card-actions,
    .report-card-actions-2x2 {
        flex-wrap: wrap;
        gap: 8px;
    }
    .report-card-actions .btn-view,
    .report-card-actions .btn-download,
    .report-card-actions-2x2 button {
        min-height: 44px;
        flex: 1 1 auto;
        min-width: 120px;
    }

    .market-research-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .market-research-upload-row {
        flex-direction: column;
        align-items: stretch;
    }
    .market-research-upload-row .field-label {
        min-width: 0;
    }
    .market-research-upload-row input[type="file"],
    .market-research-upload-row button {
        min-height: 44px;
    }

    .industry-s3-group-items {
        grid-template-columns: 1fr;
    }
    .industry-s3-card {
        padding: 14px;
    }
    .industry-survey-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .industry-survey-stats {
        grid-template-columns: 1fr;
    }
    .industry-link-button {
        min-height: 44px;
    }

    .test-results-grid,
    .test-results-grid-simple {
        grid-template-columns: 1fr;
    }
    .test-item-simple,
    .test-result-card {
        padding: 12px 14px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-download {
        min-height: 44px;
        padding: 10px 18px;
    }
    .file-upload-zone {
        padding: 20px 16px;
        min-height: 80px;
    }
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        min-height: 44px;
        font-size: 16px; /* avoids zoom on focus on iOS */
    }

    .notification-toast {
        left: 12px;
        right: 12px;
        min-width: 0;
        max-width: none;
    }

    .methodology-note {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    .main-result-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }
    .download-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    .download-buttons .btn-download {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    .top-bar h2 {
        font-size: 1.1rem;
    }
    .section-card h2 {
        font-size: 1rem;
    }
    .nav-item {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
}

/* Omi narrator */
.omi-narrator {
    position: fixed;
    right: 20px;
    bottom: 18px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.omi-bubble {
    max-width: 320px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e5e7eb;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 0.86rem;
    line-height: 1.45;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.omi-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

.omi-character-shell {
    width: 220px;
    height: 220px;
    border-radius: 0;
    overflow: visible;
    border: none;
    background: transparent;
    box-shadow: none;
    position: relative;
    pointer-events: auto;
}

.omi-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
}

.omi-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 6px;
}

.omi-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.omi-narrator.collapsed .omi-character-shell {
    width: 76px;
    height: 76px;
    border-radius: 12px;
}

.omi-narrator.collapsed .omi-video {
    opacity: 0.75;
}

.omi-narrator.collapsed .omi-bubble {
    display: none;
}

@media (max-width: 768px) {
    .omi-narrator {
        right: 10px;
        bottom: 10px;
        z-index: 1050;
    }
    .omi-character-shell {
        width: 154px;
        height: 154px;
    }
    .omi-bubble {
        max-width: 230px;
        font-size: 0.78rem;
        padding: 8px 10px;
    }
}
