        /* Universal box-sizing for consistent layout */
        * {
            box-sizing: border-box;
        }

        /* Shared palette sourced from the dev theme */
        :root {
            --bg: #0b1020;
            --panel: #121a2c;
            --muted: #b7c0cf;
            --accent: #8fb4ff;
            --accent-2: #2dd4bf;
            --danger: #ff6b6b;
            --ok: #22c55e;
            --warn: #f59e0b;
            --card: #172033;
            --chip: #202b43;
            --border: rgba(214, 226, 255, 0.15);
            --text-primary: #f4f7fb;
            --text-secondary: #c3cad7;
            --focus-ring: rgba(143, 180, 255, 0.45);
        }

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

        /* Custom styles for rounded corners and Inter font */
body {
            font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            font-size: 15px;
            line-height: 1.55;
            min-height: 100vh;
            margin: 0;
            padding: 0;
            position: relative;
            z-index: 0;
            color: var(--text-primary);
            background:
                radial-gradient(1000px 520px at 80% -120px, rgba(56, 86, 154, 0.35) 0%, transparent 60%),
                linear-gradient(180deg, #0b1020 0%, #101827 100%);
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
        }

        .container {
            max-width: min(1280px, calc(100% - 2rem));
            margin: 1rem auto;
            padding: clamp(1.25rem, 2.5vw, 2.5rem);
            background: rgba(18, 26, 44, 0.94);
            backdrop-filter: blur(14px);
            border-radius: 18px;
            border: 1px solid rgba(214, 226, 255, 0.18);
            box-shadow: 0 22px 55px rgba(2, 6, 23, 0.55);
            position: relative;
            overflow: hidden;
            z-index: 0;
        }

.container::before {
            content: '';
            position: absolute;
            inset: -1px;
            border-radius: inherit;
            background: linear-gradient(135deg, rgba(143, 180, 255, 0.35), rgba(45, 212, 191, 0.16));
            opacity: 0.22;
            filter: blur(18px);
            z-index: -1;
            animation: none;
        }

@keyframes containerGlow {
            0% { transform: rotate(0deg) scale(1); opacity: 0.3; }
            50% { opacity: 0.55; }
            100% { transform: rotate(360deg) scale(1.05); opacity: 0.3; }
        }

@keyframes progressPulse {
            0% {
                background-position: 0% 50%;
                box-shadow: 0 6px 18px rgba(122, 162, 255, 0.35);
            }
            100% {
                background-position: 100% 50%;
                box-shadow: 0 10px 24px rgba(0, 211, 183, 0.35);
            }
        }
        
        /* Mobile container adjustments */
        @media (max-width: 768px) {
            .container {
                max-width: calc(100% - 1rem);
                margin: 0.5rem auto;
                padding: 1.25rem;
                border-radius: 16px;
                background: rgba(18, 26, 44, 0.96);
            }
        }
        
        @media (max-width: 480px) {
            .container {
                max-width: calc(100% - 0.5rem);
                margin: 0.25rem auto;
                padding: 0.9rem;
                border-radius: 12px;
                background: rgba(18, 26, 44, 0.98);
            }
        }
        .question-card {
            margin-bottom: 1rem;
            padding: 1.35rem 1.45rem 1.7rem;
            background: rgba(23, 32, 51, 0.98);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            border: 1px solid var(--border);
            box-shadow: 0 10px 26px rgba(2, 6, 23, 0.42);
            position: relative;
            overflow: hidden;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
            isolation: isolate;
        }

.question-card::before {
            content: '';
            position: absolute;
            inset: 1px;
            border-radius: inherit;
            border: 1px solid rgba(122, 162, 255, 0.3);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

.question-card::after {
            content: '';
            position: absolute;
            inset: 0;
            background: none;
            opacity: 0;
            pointer-events: none;
            transform: translateX(-40%);
            filter: blur(8px);
        }

@keyframes cardLightSweep {
            0% { transform: translateX(-60%); opacity: 0; }
            50% { opacity: 0.4; }
            100% { transform: translateX(120%); opacity: 0; }
        }
        
.question-card:hover {
            box-shadow: 0 14px 34px rgba(2, 6, 23, 0.5);
            border-color: rgba(143, 180, 255, 0.38);
            background: rgba(25, 35, 56, 0.98);
            transform: translateY(-1px);
        }

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

.question-card:hover::after {
            animation: none;
        }
        
        .question-card.answered-question {
            background: linear-gradient(135deg, rgba(22, 37, 49, 0.98) 0%, rgba(34, 197, 94, 0.13) 100%) !important;
            border-color: rgba(74, 222, 128, 0.55);
            box-shadow: 0 12px 30px rgba(7, 24, 14, 0.5);
        }
        
        .question-card.answered-question:hover {
            box-shadow: 0 30px 60px rgba(18, 53, 32, 0.8);
            border-color: rgba(34, 197, 94, 0.85);
        }

        .question-text {
            font-weight: 700;
            margin-bottom: 1.05rem;
            color: var(--text-primary);
            font-size: 0.88rem;
            line-height: 1.5;
            padding-bottom: 0.5rem;
        }
        .option-label {
            display: flex;
            align-items: flex-start;
            margin-bottom: 0.45rem;
            cursor: pointer;
            padding: 0.68rem 0.8rem;
            border-radius: 8px;
            transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
            font-size: 0.84rem;
            line-height: 1.42;
            background: rgba(255, 255, 255, 0.025);
            position: relative;
            color: var(--text-secondary);
            border: 1px solid transparent;
        }
        
        .option-label:hover {
            background: rgba(143, 180, 255, 0.1);
            color: var(--text-primary);
        }
        .option-label input[type="radio"] {
            margin: 0.25rem 0.65rem 0 0;
            accent-color: var(--accent);
            transform: scale(1.15);
            flex: 0 0 auto;
        }

.option-label span {
            flex: 1;
            display: inline-flex;
            align-items: center;
            position: relative;
            padding-right: 1rem;
            transition: color 0.2s ease, text-shadow 0.2s ease;
        }

.option-label span::after {
            content: '';
            position: absolute;
            right: 0;
            width: 36px;
            height: 2px;
            border-radius: 2px;
            background: linear-gradient(90deg, transparent, rgba(122, 162, 255, 0.8));
            opacity: 0;
            transform: scaleX(0.4);
            transform-origin: right;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

.option-label input[type="radio"]:checked + span {
            color: var(--text-primary);
            text-shadow: none;
        }

.option-label input[type="radio"]:checked + span::after {
            opacity: 1;
            transform: scaleX(1);
        }

        .option-label:has(input[type="radio"]:checked) {
            background: rgba(143, 180, 255, 0.16);
            border: 1px solid rgba(143, 180, 255, 0.42);
            box-shadow: inset 0 0 0 1px rgba(143, 180, 255, 0.12);
        }

        .option-label.is-selected {
            background: rgba(143, 180, 255, 0.16);
            border: 1px solid rgba(143, 180, 255, 0.42);
            box-shadow: inset 0 0 0 1px rgba(143, 180, 255, 0.12);
        }

        .option-label.is-best.is-selected {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(34, 197, 94, 0.15) 100%);
            border: 1px solid rgba(34, 197, 94, 0.6);
            box-shadow: 0 10px 22px rgba(34, 197, 94, 0.35);
        }

.option-label:focus-within {
            box-shadow: 0 0 0 3px var(--focus-ring);
            border-radius: 10px;
        }

        .action-button {
            padding: 0.68rem 1.05rem;
            color: white;
            border: 1px solid transparent;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 700;
            letter-spacing: 0;
            transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
            position: relative;
            overflow: hidden;
            background: linear-gradient(135deg, var(--accent) 0%, rgba(122, 162, 255, 0.75) 100%);
            box-shadow: 0 10px 22px rgba(66, 103, 178, 0.3);

            /* Added properties for robust clickable area */
            display: inline-flex; /* Use flexbox for internal alignment */
            align-items: center; /* Center content vertically */
            justify-content: center; /* Center content horizontally */
            min-width: 100px; /* Ensure a minimum width */
            min-height: 38px;
        }

        .action-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
            transition: left 0.6s ease;
        }

        .action-button:hover::before {
            left: 100%;
        }

        .secondary-button {
            background: linear-gradient(135deg, var(--muted) 0%, rgba(153, 163, 179, 0.8) 100%);
            box-shadow: 0 12px 24px rgba(153, 163, 179, 0.35);
        }
        .secondary-button:hover {
            background: linear-gradient(135deg, #8a96a8 0%, var(--muted) 100%);
            transform: translateY(-2px);
        }
        .secondary-button:active {
            transform: translateY(0);
            box-shadow: 0 8px 16px rgba(153, 163, 179, 0.3);
        }
        .clear-button {
            background: linear-gradient(135deg, var(--danger) 0%, rgba(255, 107, 107, 0.85) 100%);
            box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
        }
        .clear-button:hover {
            background: linear-gradient(135deg, #ff5252 0%, var(--danger) 100%);
            transform: translateY(-2px);
        }
        .clear-button:active {
            transform: translateY(0);
            box-shadow: 0 10px 18px rgba(255, 107, 107, 0.3);
        }
        /* New PDF button style */
        .pdf-button {
            background: linear-gradient(135deg, var(--ok) 0%, rgba(34, 197, 94, 0.85) 100%);
            background-size: 200% 200%;
            box-shadow: 0 16px 32px rgba(34, 197, 94, 0.4);
            animation: gradientShift 10s ease infinite;
        }
        .pdf-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 20px 40px rgba(34, 197, 94, 0.45);
        }
        .pdf-button:active {
            transform: translateY(0);
            box-shadow: 0 12px 24px rgba(34, 197, 94, 0.35);
        }
        /* CSV button style */
        .csv-button {
            background: linear-gradient(135deg, var(--accent-2) 0%, rgba(0, 211, 183, 0.85) 100%);
            box-shadow: 0 16px 32px rgba(0, 211, 183, 0.4);
        }
        .csv-button:hover {
            background: linear-gradient(135deg, #00c4a7 0%, var(--accent-2) 100%);
            transform: translateY(-2px);
        }
        .csv-button:active {
            transform: translateY(0);
            box-shadow: 0 12px 24px rgba(0, 211, 183, 0.35);
        }

        /* New style for the Data Management navigation button */
        .data-management-nav-button-color {
            background: linear-gradient(135deg, var(--warn) 0%, rgba(245, 158, 11, 0.8) 100%);
            box-shadow: 0 16px 32px rgba(245, 158, 11, 0.35);
        }
        .data-management-nav-button-color:hover {
            background: linear-gradient(135deg, #e2920a 0%, var(--warn) 100%);
            transform: translateY(-2px);
        }
        .data-management-nav-button-color:active {
            transform: translateY(0); /* Make it sink slightly */
            box-shadow: 0 12px 24px rgba(245, 158, 11, 0.3); /* Add a subtle inset shadow */
        }

        /* New style for encrypted export button */
        .encrypted-export-button {
            background: linear-gradient(135deg, #8b5cf6, #6366f1, #8b5cf6);
            background-size: 200% 200%;
            box-shadow: 0 20px 40px rgba(99, 102, 241, 0.45);
            animation: none;
        }
        .encrypted-export-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 24px 44px rgba(99, 102, 241, 0.5);
        }
        .encrypted-export-button:active {
            transform: translateY(0); /* Make it sink slightly */
            box-shadow: 0 16px 32px rgba(99, 102, 241, 0.4); /* Add a subtle inset shadow */
        }


        .results-container {
            margin-top: 1rem; /* Reduced margin */
            padding: 1.5rem; /* Reduced padding */
            border: 1px solid var(--border);
            border-radius: 12px; /* Smaller rounded corners */
            background-color: var(--card); /* Light purple background */
            display: flex; /* Use flexbox for layout */
            flex-direction: column; /* Stack children vertically */
            align-items: center; /* Center items horizontally */
            text-align: center;
            box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
            position: relative;
            overflow: hidden;
            z-index: 0;
            will-change: auto;
            contain: layout;
        }

.results-container::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 30% 20%, rgba(122, 162, 255, 0.2), transparent 55%);
            opacity: 0.6;
            pointer-events: none;
            z-index: -1;
            animation: resultsGlow 16s ease-in-out infinite;
        }
        .results-container h2 {
            font-size: 1.1rem; /* Increased font size for Results heading */
            color: var(--text-primary); /* Purple heading */
            margin-bottom: 0.6rem; /* Reduced margin */
            text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
        }
        /* Existing class for the numerical score, adjusted */
        .total-score-number { /* Renamed from .total-score for clarity and specific targeting */
            font-weight: bold;
            font-size: 1.5em; /* Slightly larger font for the number */
            color: var(--ok); /* Green color for the number */
            text-shadow: 0 4px 12px rgba(34, 197, 94, 0.5);
        }
        /* New wrapper for all questionnaire controls (action and pagination) */
        #main-controls-container {
            display: flex;
            flex-direction: column; /* Stack children vertically */
            align-items: center; /* Center content horizontally */
            gap: 0.8rem; /* Space between the two rows of buttons */
            margin-top: 1rem;
            margin-bottom: 1rem;
            width: 100%; /* Ensure it takes full width to allow centering */
        }
        /* Reverted style for the button group at the top left to center */
        .top-left-buttons-group {
            display: flex;
            flex-wrap: wrap;
            justify-content: center; /* Center buttons */
            gap: 0.6rem;
            width: 100%; /* Take full width to apply justify-content */
        }


      .pagination-controls {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}
        .pagination-button {
            padding: 0.65rem 1rem;
            background-color: var(--chip); /* Gray for pagination buttons */
            color: var(--text-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 650;
            transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
        }
        .pagination-button:hover:not(:disabled) {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
            box-shadow: 0 10px 20px rgba(122, 162, 255, 0.3);
            transform: translateY(-2px);
        }
        .pagination-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: var(--panel);
        }
        .page-info {
            font-size: 0.82rem;
            color: var(--text-secondary);
        }
        /* Progress Bar Styles */
        .progress-bar-container {
            width: 100%;
            background-color: var(--panel);
            border-radius: 8px;
            border: 1px solid var(--border);
            height: 18px; /* Reduced height of the bar */
            overflow: hidden; /* Ensures inner bar respects border-radius */
            margin-top: 0.8rem; /* Reduced margin */
        }
        .progress-bar-fill {
            height: 100%;
            width: 0%; /* Initial width */
            background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
            background-size: 200% 100%;
            border-radius: 8px;
            text-align: center;
            color: white;
            line-height: 18px; /* Center text vertically */
            transition: width 0.5s ease-in-out; /* Smooth transition for width changes */
            font-size: 0.75rem; /* Smaller font */
            font-weight: 600;
            box-shadow: 0 6px 18px rgba(122, 162, 255, 0.35);
            animation: none;
        }
        .message-box {
            position: fixed;
            top: 1rem; /* Changed from bottom to top */
            left: 50%;
            transform: translateX(-50%);
            background: var(--card);
            color: var(--text-primary);
            padding: 0.9rem 1.5rem;
            border-radius: 12px;
            font-size: 0.88rem;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease-in-out;
            border: 1px solid var(--accent); /* Added border */
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
        }
        .message-box.show {
            opacity: 1;
        }
        /* Section Heading Style */
        .section-heading,
        .chart-container h3,
        #total-score-chart-title {
            white-space: pre-line;
            line-height: 1.4;
        }

        .section-heading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            font-size: 1.08rem;
            font-weight: 750;
            color: var(--accent); /* Dark gray */
            margin-top: 1.5rem;
            margin-bottom: 1rem;
            text-align: center;
            padding: 1rem 1.2rem;
            background-color: var(--card);
            border-radius: 12px;
            border: 1px solid var(--border); /* Light purple border */
            box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
            position: relative;
            overflow: hidden;
            z-index: 0;
        }

        .section-heading-title {
            line-height: 1.3;
            display: block;
            width: 100%;
        }

        .section-score-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-basis: auto;
            min-height: 34px;
            padding: 0.35rem 0.9rem;
            border-radius: 999px;
            border: 1px solid rgba(122, 162, 255, 0.45);
            background: linear-gradient(135deg, rgba(18, 27, 52, 0.96), rgba(30, 42, 78, 0.9));
            color: #cfe0ff;
            font-size: 0.82rem;
            font-weight: 800;
            line-height: 1;
            white-space: nowrap;
            letter-spacing: 0;
            box-shadow:
                0 8px 20px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        .section-heading-title + .section-score-badge {
            margin-top: 0.1rem;
        }

.section-heading::before,
.section-heading::after {
            content: '';
            position: absolute;
            pointer-events: none;
        }

.section-heading::before {
            inset: 0;
            background: linear-gradient(120deg, rgba(122, 162, 255, 0.2), transparent 60%);
            opacity: 0;
            transition: opacity 0.4s ease;
            z-index: -1;
        }

.section-heading::after {
            width: 120px;
            height: 3px;
            left: 50%;
            bottom: 6px;
            transform: translateX(-50%);
            background: linear-gradient(90deg, transparent, rgba(122, 162, 255, 0.8), transparent);
            border-radius: 999px;
            opacity: 0.6;
            z-index: 1;
        }

.section-heading:hover::before {
            opacity: 1;
        }
        
        /* Grid layout for questions (responsive and mobile-friendly) */
        .questions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
            align-items: stretch;
        }
        @media (min-width: 1400px) {
            .questions-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.5rem;
            }
        }
        @media (min-width: 1000px) and (max-width: 1399px) {
            .questions-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 1.25rem;
            }
        }
        @media (min-width: 700px) and (max-width: 999px) {
            .questions-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1rem;
            }
        }
        @media (max-width: 699px) {
            .questions-grid {
                grid-template-columns: 1fr;
                gap: 0.75rem;
            }
        }

        /* Mobile-specific question card adjustments */
        @media (max-width: 768px) {
            .question-card {
                margin-bottom: 0.75rem;
                padding: 1.15rem 1rem 1.55rem;
                border-radius: 12px;
            }
            
            .question-text {
                font-size: 0.9rem;
                margin-bottom: 0.75rem;
            }
            
           .option-label {
                padding: 0.65rem 0.75rem;
                font-size: 0.84rem;
                margin-bottom: 0.4rem;
            }
            
            .question-points-display {
                bottom: 10px;
                right: 12px;
                font-size: 0.7em;
                padding: 4px 8px;
            }
        }
        
        @media (max-width: 480px) {
            .question-card {
                padding: 1rem 0.85rem 1.8rem;
                border-radius: 10px;
            }
            
            .question-text {
                font-size: 0.86rem;
            }
            
           .option-label {
                padding: 0.62rem 0.7rem;
                font-size: 0.82rem;
                margin-bottom: 0.36rem;
            }
        }
        /* Styles for the results page */
        /* Force override all text colors on results page - maximum specificity */
        #results-page.results-page h2.text-xl.font-bold.text-gray-800,
        #results-page h2.text-xl.font-bold.text-gray-800.mb-4,
        #results-page h2.text-xl.font-bold.text-gray-800.mb-4.text-center,
        #results-page h2.text-xl.font-bold.text-gray-800.mb-4.mt-8.underline,
        #total-score-chart-title.text-xl.font-bold.text-gray-800.mb-4.text-center,
        .results-page h2.text-gray-800,
        .results-page .text-gray-800,
        .chart-container h2.text-gray-800 {
            color: #f1f5f9 !important;
        }
        
        /* Override Tailwind-like utility classes */
        .text-gray-800 {
            color: #f1f5f9 !important;
        }
        
        /* Results page specific overrides - increased specificity */
        #results-page h2,
        #results-page .text-gray-800,
        #results-page .chart-container,
        #results-page .chart-container *,
        .chart-container h3,
        .chart-container h3 *,
        .chart-container span,
        div#results-page h2.text-xl,
        div#results-page h2.text-gray-800,
        div.chart-container h2#total-score-chart-title {
            color: #f1f5f9 !important;
        }
        
        /* Transparent button-style for suggestion links on results page */
        #results-page a,
        #results-page .suggestion-link,
        .chart-container a {
            color: var(--accent) !important;
            background: rgba(122, 162, 255, 0.1) !important;
            text-decoration: none !important;
            padding: 0.75rem 1.5rem !important;
            border-radius: 8px !important;
            font-weight: 600 !important;
            display: inline-block !important;
            text-align: center !important;
            transition: all 0.3s ease !important;
            box-shadow: 0 2px 8px rgba(122, 162, 255, 0.2) !important;
            border: 2px solid rgba(122, 162, 255, 0.5) !important;
            margin: 0.5rem 0 !important;
            backdrop-filter: blur(10px) !important;
        }
        
        #results-page a:hover,
        #results-page .suggestion-link:hover,
        .chart-container a:hover {
            background: rgba(122, 162, 255, 0.3) !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 4px 12px rgba(122, 162, 255, 0.4) !important;
            border-color: var(--accent) !important;
            color: white !important;
        }
        
        /* Additional specific targeting for results page elements */
        div.results-page h2,
        div.results-page .underline,
        #total-score-chart-title,
        .section-charts-grid h2 {
            color: #f1f5f9 !important;
        }
        
        /* Data management page specific overrides */
        #data-management-page h2,
        #data-management-page h3,
        #data-management-page .text-gray-700,
        #data-management-page ul,
        #data-management-page li,
        #data-management-page p {
            color: #e8eaed !important;
        }
        
        /* Override any inline styles on data management page */
        #data-management-page * {
            color: #e8eaed !important;
        }
        
        .results-page {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1.5rem;
            padding: clamp(1rem, 2vw, 1.5rem);
            background: rgba(18, 26, 44, 0.98);
            border-radius: 14px;
            border: 1px solid var(--border);
        }
        
        .chart-container {
            width: 100%;
            max-width: 300px;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
            padding: 1.1rem;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
            position: relative;
            overflow: hidden;
        }
        
        .chart-container::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(122, 162, 255, 0.1) 0%, transparent 70%);
            opacity: 0;
            transition: opacity 0.4s ease;
            pointer-events: none;
        }
        
        .chart-container:hover::before {
            opacity: 1;
        }
        
        .chart-container:hover {
            border-color: var(--accent);
            box-shadow: 0 16px 36px rgba(122, 162, 255, 0.16), 0 10px 20px rgba(0, 0, 0, 0.3);
            transform: translateY(-2px);
        }
        
        .chart-container h3 {
            font-size: 0.84rem;
            font-weight: 600;
            text-align: center;
            margin-bottom: 0.8rem;
            color: #f1f5f9;
        }

        .section-charts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 1.5rem;
            width: 100%;
            justify-items: center;
        }
        /* Hide the "Overall Results" title */
        .results-page .hidden-title {
            display: none;
        }
        /* New styles for risk level display */
        .risk-level-display {
            font-size: 1.2rem;
            font-weight: 700;
            margin-top: 0.6rem;
            padding: 0.8rem 1.2rem;
            border-radius: 12px;
            color: white;
            text-align: center;
            margin-left: auto;
            margin-right: auto;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        }
        .risk-low { 
            background: linear-gradient(135deg, var(--accent) 0%, rgba(122, 162, 255, 0.8) 100%);
        }
        .risk-medium { 
            background: linear-gradient(135deg, var(--ok) 0%, rgba(34, 197, 94, 0.8) 100%);
        }
        .risk-high { 
            background: linear-gradient(135deg, var(--warn) 0%, rgba(245, 158, 11, 0.8) 100%);
        }
        .risk-critical { 
            background: linear-gradient(135deg, var(--danger) 0%, rgba(255, 107, 107, 0.8) 100%);
        }

        /* New style for the data management page */
        #data-management-page {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1.4rem;
            padding: clamp(1rem, 2vw, 1.6rem);
            border: 1px solid var(--border);
            border-radius: 14px;
            background-color: rgba(18, 26, 44, 0.98);
            margin-top: 1rem;
            box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
            color: var(--text-primary);
        }
        #data-management-page,
        #data-management-page * {
            color: var(--text-primary) !important;
        }
        #data-management-page h2 {
            font-size: 1.4rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.8rem;
            text-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
        }
        #data-management-page .button-group {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.6rem;
            width: 100%;
        }
        /* New style for section groups within data management */
        .section-group {
            padding: 1.35rem;
            border: 1px solid var(--border);
            border-radius: 12px;
            background-color: var(--card);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
            width: 100%;
            max-width: 520px;
            margin-bottom: 0.8rem;
            backdrop-filter: blur(6px);
            position: relative;
            overflow: hidden;
            transition: box-shadow 0.3s ease, border-color 0.3s ease;
        }
        .section-group::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(122, 162, 255, 0.08), rgba(0, 211, 183, 0.08));
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .section-group:hover::after {
            opacity: 1;
        }
        .section-group > * {
            position: relative;
            z-index: 1;
        }
        .section-group h3 {
            font-size: 0.98rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.8rem;
            text-align: center;
        }
        .section-group.priority-action-section {
            border: 1px solid rgba(122, 162, 255, 0.45);
            background: linear-gradient(135deg, rgba(29, 35, 70, 0.95), rgba(0, 211, 183, 0.15));
            box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
        }
        .hcaa-only-file-note {
            display: inline-block;
            margin: 0 0 0 0.35rem;
            font-weight: 700;
            color: var(--danger);
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(5, 7, 20, 0.85);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1001;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }
        .modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }
        .modal-content {
            background-color: var(--card);
            padding: 2rem;
            border-radius: 16px;
            box-shadow: 0 35px 80px rgba(0, 0, 0, 0.6);
            text-align: center;
            max-width: 400px;
            width: 90%;
            transform: translateY(-20px);
            transition: transform 0.3s ease;
            border: 1px solid var(--border);
        }
        .modal-overlay.show .modal-content {
            transform: translateY(0);
        }
        .modal-content h3 {
            font-size: 1.2rem;
            font-weight: bold;
            color: var(--text-primary);
            margin-bottom: 1rem;
        }
        .modal-content p {
            margin-bottom: 1.5rem;
            color: var(--text-secondary);
        }
        .modal-buttons {
            display: flex;
            justify-content: center;
            gap: 1rem;
        }
        .suggestions-button {
            border: none;
            cursor: pointer;
            font: inherit;
            appearance: none;
        }
        .suggestions-slot {
            display: flex;
            justify-content: center;
            margin-bottom: 0.35rem;
        }
        .suggestions-modal-content {
            max-width: 980px;
            width: min(94vw, 980px);
            text-align: left;
            padding: 1.75rem 2rem;
            background: linear-gradient(135deg, rgba(22, 27, 49, 0.98) 0%, rgba(16, 20, 37, 0.95) 100%);
        }
        .suggestions-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }
        .suggestions-modal-kicker {
            margin: 0 0 0.35rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            font-size: 0.62rem;
            color: var(--accent);
        }
        .suggestions-modal-body {
            display: grid;
            gap: 1.5rem;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            max-height: 70vh;
            overflow: auto;
            padding-right: 0.4rem;
        }
        .suggestions-disclaimer {
            margin: 0 0 1.2rem;
            font-size: 0.78rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }
        .suggestions-disclaimer-label {
            font-weight: 700;
        }
        .suggestions-disclaimer-label.basic {
            color: var(--accent);
        }
        .suggestions-disclaimer-label.enhanced {
            color: var(--danger);
        }
        .suggestions-disclaimer-symbol {
            margin-right: 0.35rem;
            font-size: 0.8rem;
        }
        .suggestions-group {
            background: var(--card);
            border-radius: 14px;
            border: 1px solid var(--border);
            padding: 1.25rem;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
        }
        .suggestions-group-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        .suggestions-chip {
            padding: 0.35rem 0.85rem;
            border-radius: 999px;
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            background: rgba(122, 162, 255, 0.12);
            color: var(--accent);
        }
        .suggestions-chip.enhanced {
            background: rgba(255, 107, 107, 0.2);
            color: var(--danger);
        }
        .suggestions-count {
            font-size: 0.7rem;
            color: var(--muted);
        }
        .suggestions-list {
            display: grid;
            gap: 0.9rem;
        }
        .suggestion-item {
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 0.75rem;
            padding: 0.85rem 1rem;
            border-radius: 12px;
            background: rgba(19, 23, 42, 0.85);
            border: 1px solid rgba(122, 162, 255, 0.15);
            box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
        }
        .suggestion-id {
            font-weight: 700;
            color: var(--accent);
            min-width: 2.8rem;
        }
        .suggestion-text {
            white-space: pre-line;
            color: var(--text-primary);
            font-size: 0.78rem;
            line-height: 1.35;
        }
        .suggestion-text a {
            color: var(--accent);
            text-decoration: underline;
            font-weight: 600;
        }
        .suggestion-text a:hover {
            color: #ffffff;
        }
        .suggestions-empty {
            color: var(--text-secondary);
            font-style: italic;
            margin: 0;
            font-size: 0.78rem;
        }
        .suggestions-close {
            min-width: 110px;
        }
        .question-points-display {
            position: absolute;
            bottom: 16px;
            right: 20px;
            font-size: 0.75em;
            color: var(--accent);
            font-weight: 600;
            background: linear-gradient(135deg, rgba(22, 27, 49, 0.9) 0%, rgba(13, 16, 32, 0.8) 100%);
            padding: 6px 12px;
            border-radius: 16px;
            border: 1px solid rgba(122, 162, 255, 0.3);
            box-shadow: 
                0 10px 24px rgba(0, 0, 0, 0.35);
            backdrop-filter: blur(8px);
            transition: all 0.2s ease;
            z-index: 2;
        }
        /* Styles for the intro page */
        #intro-page {
            position: relative;
            padding: 2.5rem 2rem 3rem;
            display: flex;
            justify-content: center;
        }

        .intro-shell {
            width: 100%;
            max-width: 1120px;
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

        .intro-header {
            display: flex;
            flex-direction: column;
            gap: 1.2rem;
            align-items: center;
            padding: 1.6rem;
            border-radius: 18px;
            background: rgba(20, 30, 49, 0.96);
            border: 1px solid rgba(214, 226, 255, 0.16);
            box-shadow: 0 18px 42px rgba(5, 8, 20, 0.46);
            position: relative;
            overflow: hidden;
        }

        .intro-header::after {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 10% 20%, rgba(122, 162, 255, 0.22), transparent 55%),
                radial-gradient(circle at 70% 10%, rgba(0, 211, 183, 0.16), transparent 45%);
            pointer-events: none;
        }

        .intro-logo-wrap img {
            display: block;
            height: auto;
            width: auto;
            max-width: min(70vw, 430px);
        }

        .intro-headline {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            gap: 0.7rem;
            align-items: center;
            text-align: center;
        }

        .intro-headline h1 {
            margin: 0;
            font-size: clamp(1.45rem, 2.4vw, 2rem);
            letter-spacing: 0;
            color: var(--text-primary);
            line-height: 1.2;
        }

        .intro-headline .version-badge {
            display: inline-flex;
            align-items: center;
            margin-left: 0.6rem;
            padding: 0.12rem 0.34rem;
            font-size: 0.35em;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(255, 255, 255, 0.75);
            background: linear-gradient(135deg, rgba(90, 108, 155, 0.7) 0%, rgba(24, 60, 70, 0.8) 100%);
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 6px 14px rgba(6, 10, 22, 0.6);
            vertical-align: middle;
        }

        .intro-lede {
            margin: 0;
            font-size: 0.88rem;
            line-height: 1.6;
            color: var(--text-secondary);
            max-width: 680px;
        }

        .intro-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            font-size: 0.66rem;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            color: rgba(255, 255, 255, 0.6);
        }

        .intro-meta span {
            padding: 0.35rem 0.85rem;
            border-radius: 999px;
            background: rgba(122, 162, 255, 0.12);
            border: 1px solid rgba(122, 162, 255, 0.3);
        }

        #intro-page .start-button {
            margin-top: 0.4rem;
            align-self: flex-start;
            padding: 1rem 2.1rem;
            font-size: 0.94rem;
            font-weight: 600;
            background: linear-gradient(135deg, #8bb1ff 0%, #19e4c6 100%);
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 16px 38px rgba(25, 228, 198, 0.28);
            letter-spacing: 0;
            position: relative;
            animation: none;
            overflow: hidden;
            transform-origin: center;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .intro-start-cta {
            display: flex;
            justify-content: center;
            margin-top: -0.2rem;
        }

        #intro-page .start-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -120%;
            width: 120%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
            opacity: 0.4;
            animation: startButtonShine 4.8s ease-in-out infinite;
            pointer-events: none;
        }

        #intro-page .start-button::after {
            content: '';
            position: absolute;
            inset: -8px;
            border-radius: 18px;
            border: 1px solid rgba(25, 228, 198, 0.45);
            opacity: 0.65;
            animation: startButtonHalo 2.4s ease-in-out infinite;
            pointer-events: none;
        }

        #intro-page .start-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 34px 70px rgba(25, 228, 198, 0.5);
        }

        @keyframes startButtonShake {
            0%, 100% { transform: translateX(0) rotate(0deg); }
            10% { transform: translateX(-3px) rotate(-0.6deg); }
            20% { transform: translateX(3px) rotate(0.6deg); }
            30% { transform: translateX(-3px) rotate(-0.6deg); }
            40% { transform: translateX(3px) rotate(0.6deg); }
            50% { transform: translateX(0) rotate(0deg); }
        }

        @keyframes startButtonShine {
            0% { transform: translateX(0); }
            60% { transform: translateX(140%); }
            100% { transform: translateX(140%); }
        }

        @keyframes startButtonHalo {
            0% { opacity: 0.2; transform: scale(0.96); }
            50% { opacity: 0.7; transform: scale(1.03); }
            100% { opacity: 0.2; transform: scale(0.96); }
        }

        .intro-section {
            padding: 0.25rem 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .intro-section:last-of-type {
            border-bottom: none;
        }

        .intro-section-split {
            display: flex;
            flex-direction: column;
            gap: 1.2rem;
            max-width: 760px;
            margin-left: auto;
            margin-right: auto;
        }

        .intro-content p {
            margin: 0 0 0.9rem 0;
            font-size: 0.88rem;
            line-height: 1.7;
            color: var(--text-secondary);
        }

        .intro-content-small p {
            font-size: 0.84rem;
            line-height: 1.7;
        }

        .intro-content a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 600;
        }

        .intro-content a:hover {
            color: #ffffff;
        }

        .intro-content h2 {
            margin: 0 0 0.8rem 0;
            font-size: 1.02rem;
            text-transform: uppercase;
            letter-spacing: 0.18em;
            color: rgba(255, 255, 255, 0.7);
        }

        .intro-content ul {
            margin: 0;
            padding-left: 1.1rem;
            font-size: 0.9rem;
            line-height: 1.65;
            color: var(--text-secondary);
        }

        .intro-content li {
            margin-bottom: 0.5rem;
        }

        .intro-callout {
            padding: 1rem 1.1rem;
            border-radius: 12px;
            background: rgba(12, 15, 28, 0.75);
            border: 1px solid rgba(0, 211, 183, 0.22);
            color: var(--text-secondary);
            font-size: 0.84rem;
            line-height: 1.65;
        }

        .intro-callout.subtle {
            background: rgba(12, 15, 28, 0.55);
            border-color: rgba(122, 162, 255, 0.2);
        }

        .intro-callout strong {
            color: var(--text-primary);
        }

        .intro-callout a {
            color: var(--accent-2);
            text-decoration: none;
            font-weight: 600;
        }

        .objectives-card h2 {
            margin: 0 0 0.7rem 0;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.16em;
            color: rgba(255, 255, 255, 0.75);
        }

        .objectives-card ul {
            margin: 0;
            padding-left: 1.1rem;
            font-size: 0.84rem;
            line-height: 1.65;
            color: var(--text-secondary);
        }

        .objectives-card li {
            margin-bottom: 0.25rem;
        }

@keyframes resultsGlow {
            0% { transform: translate3d(0, 0, 0); opacity: 0.45; }
            50% { transform: translate3d(15px, -10px, 0); opacity: 0.7; }
            100% { transform: translate3d(-10px, 5px, 0); opacity: 0.45; }
        }
        /* Styles for the new thematic units lists */
        #thematic-units-container {
            margin-top: 0.15rem;
            margin-bottom: 0.05rem;
            width: 100%;
            max-width: 760px;
            margin-left: auto;
            margin-right: auto;
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
            background: var(--card);
            padding: 0;
            position: relative;
            z-index: 0;
            animation: fadeInSection 0.8s ease;
        }

#thematic-units-container::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(122, 162, 255, 0.15), rgba(0, 211, 183, 0.1));
            opacity: 0.5;
            pointer-events: none;
            z-index: -1;
        }
        .thematic-units-heading {
            font-size: 0.94rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0;
            padding: 0.7rem 1rem;
            background: linear-gradient(135deg, rgba(20, 25, 46, 0.96) 0%, rgba(10, 13, 28, 0.98) 100%);
            border-bottom: 1px solid rgba(122, 162, 255, 0.2);
            text-align: center;
            border-radius: 16px 16px 0 0;
            letter-spacing: 0.04em;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 6px rgba(0, 0, 0, 0.5), 0 8px 18px rgba(5, 8, 20, 0.45);
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        }
        .thematic-units-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.75rem;
            padding: 0.75rem;
        }
        .thematic-list {
            list-style: none;
            padding-left: 0;
            margin: 0;
        }
        .thematic-list li {
            font-size: 0.82rem !important;
            color: var(--text-secondary) !important;
            margin-bottom: 0.2rem !important;
            line-height: 1.42 !important;
            padding: 0.28rem 0.2rem !important;
            border-bottom: 1px solid var(--border);
            transition: all 0.2s ease;
            list-style: none !important;
        }
        .thematic-list li:before {
            display: none !important;
        }
        .thematic-list li:hover {
            color: var(--text-primary);
            background-color: rgba(122, 162, 255, 0.12);
            padding-left: 0.3rem;
            border-color: rgba(122, 162, 255, 0.3);
            border-radius: 6px;
        }
        .thematic-list li:last-child {
            border-bottom: none;
        }
        #section-select {
            background: var(--chip);
            color: var(--text-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0.5rem 1rem;
            font-size: 0.85rem;
            min-width: 200px;
        }

        #section-select option {
            background: var(--panel);
            color: var(--text-primary);
        }

@media (max-width: 980px) {
    .intro-header {
        text-align: left;
    }

    .intro-section-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .thematic-units-grid {
        grid-template-columns: 1fr; /* Switch to one column */
    }
}

@media (max-width: 600px) {
    #section-select {
        width: 100%;
        max-width: 300px;
    }
    #intro-page {
        padding: 2rem 1.2rem 2.5rem;
    }

    .intro-header {
        padding: 1.5rem;
        gap: 1.2rem;
    }

    .intro-headline h1 {
        font-size: 1.6rem;
    }

    .intro-header {
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
        display: block;
    }

    .intro-logo-wrap {
        display: flex;
        justify-content: center;
        width: 100%;
        padding-bottom: 0.75rem;
        margin-bottom: 0.6rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .intro-logo-wrap img {
        max-width: min(70vw, 240px);
        height: auto;
    }

    .intro-headline {
        align-items: center;
        text-align: center;
        width: 100%;
        background: rgba(18, 22, 40, 0.95);
        border: 1px solid rgba(122, 162, 255, 0.2);
        border-radius: 18px;
        padding: 1.2rem 1.1rem;
        box-shadow: 0 18px 40px rgba(5, 8, 20, 0.55);
    }

    #intro-page .start-button {
        align-self: center;
    }
}

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

@media (prefers-reduced-motion: reduce) {
        #intro-page .start-button {
            animation: startButtonShake 2.2s ease-in-out infinite !important;
        }
        #intro-page .start-button::before {
            animation: startButtonShine 4.8s ease-in-out infinite !important;
        }
        #intro-page .start-button::after {
            animation: startButtonHalo 2.4s ease-in-out infinite !important;
        }
}

.result-stats-panel {
    width: min(780px, 100%);
    margin: 0.9rem auto 1.15rem;
    padding: 0.8rem;
    border: 1px solid rgba(122, 162, 255, 0.24);
    border-radius: 12px;
    background: rgba(18, 22, 40, 0.92);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.result-stats-panel h4 {
    margin: 0 0 0.65rem;
    color: var(--text-primary);
    font-size: 0.92rem;
    text-align: center;
}

.results-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.results-summary-card {
    min-height: 76px;
    padding: 0.65rem;
    border: 1px solid rgba(122, 162, 255, 0.18);
    border-radius: 10px;
    background: rgba(11, 15, 30, 0.62);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.results-summary-card span {
    color: #9fb1d8;
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.results-summary-card strong {
    color: #e5edff;
    font-size: 0.84rem;
    font-weight: 760;
    line-height: 1.3;
}

.results-summary-card.result-best {
    border-color: rgba(52, 211, 153, 0.42);
    background: rgba(6, 78, 59, 0.22);
}

.results-summary-card.result-best strong {
    color: #34d399;
}

.results-summary-card.result-worst {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(127, 29, 29, 0.2);
}

.results-summary-card.result-worst strong {
    color: #f87171;
}

@media (max-width: 760px) {
    .results-summary-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .modal-overlay {
        align-items: center; /* Center it instead of stretching to edges */
        padding: 1rem;
    }

    .suggestions-modal-content {
        width: 100%;
        max-height: 90vh; /* Leave 10% space to see the background */
        margin: auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 14px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    }

    .suggestions-modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
        margin: 0;
        padding: 1rem;
        background: #1a203c; /* Solid background to prevent overlap transparency issues */
        border-bottom: 1px solid var(--border);
        display: flex;
        flex-direction: row; /* Keep close button and title side-by-side */
        justify-content: space-between;
        align-items: center;
        gap: 0.8rem;
    }

    .suggestions-modal-header h3 {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.25;
        max-width: 60%; /* Prevent title from pushing button out */
        text-align: left;
    }

    .suggestions-close {
        min-width: auto;
        width: auto;
        flex: 0 0 auto;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .suggestions-modal-body {
        padding: 1rem;
        overflow-y: auto;
    }

    .suggestions-group {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .suggestion-item {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        padding: 0.8rem;
    }
}
rem;
    }
}

