        /* General Styles */
        body {
            background-color: #1e1e1e;
            color: white;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            display: grid;
            grid-template-columns: 240px 1fr;
            /* Wider sidebar for Research Library panel */
            grid-template-rows: auto 1fr;
            min-height: 100vh;
        }

        /* Header */
        header {
            grid-column: 1 / -1;
            background-color: #2c2c2c;
            padding: 20px;
            display: flex;
            align-items: center;
            border-bottom: 2px solid #404040;
        }

        .logo {
            font-family: 'Orbitron', sans-serif;
            font-size: 24px;
            color: limegreen;
            /* Reduced blur to make the logo appear crisper */
            text-shadow: 0 0 2px limegreen, 0 0 4px limegreen;
            margin-right: 40px;
            /* Space between logo and buttons */
        }

        .logo .blurb {
            font-size: 14px;
            color: #aaa;
            margin-top: 5px;
        }

        /* Navigation Menu */
        nav {
            display: flex;
            gap: 10px;
        }

        nav button {
            padding: 8px 16px;
            /* Smaller buttons */
            font-size: 14px;
            /* Smaller font size */
            color: white;
            background-color: #3b3b3b;
            border: 2px solid limegreen;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s;
        }

        nav button:hover {
            background-color: #505050;
            border-color: #00ff99;
        }

        /* Highlighted login button */
        nav .login-btn {
            border-color: #00aaff;
        }

        nav .login-btn:hover {
            border-color: #33bbff;
        }

        /* Hamburger Menu */
        .hamburger {
            display: none;
            flex-direction: column;
            cursor: pointer;
        }

        .hamburger div {
            width: 25px;
            height: 3px;
            background-color: limegreen;
            margin: 4px 0;
            transition: all 0.3s;
        }

        /* Aside Column */
        aside {
            background-color: #2c2c2c;
            padding: 15px;
            border-right: 2px solid #404040;
            overflow-y: auto;
        }

        aside a {
            display: block;
            color: #00ffcc;
            text-decoration: none;
            margin-bottom: 10px;
            font-size: 16px;
            transition: color 0.3s;
        }

        aside a:hover {
            color: #00ff99;
        }

        /* Guest Research Library Panel */
        .research-library-panel {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border: 1px solid rgba(124, 58, 237, 0.3);
            border-radius: 12px;
            padding: 18px;
            margin-bottom: 15px;
            min-height: 400px;
        }

        .research-library-panel.expired {
            border-color: rgba(255, 107, 107, 0.5);
            opacity: 0.8;
        }

        .research-library-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .research-library-header i {
            color: #a855f7;
            font-size: 18px;
        }

        .research-library-header h4 {
            margin: 0;
            font-size: 15px;
            font-weight: 600;
            color: #e2e8f0;
        }

        .research-library-header .trial-badge {
            background: rgba(168, 85, 247, 0.2);
            color: #c4b5fd;
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 10px;
            margin-left: auto;
        }

        .research-library-stats {
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
            font-size: 12px;
        }

        .research-library-stats .stat {
            text-align: center;
            flex: 1;
        }

        .research-library-stats .stat-value {
            display: block;
            font-size: 22px;
            font-weight: 700;
            color: #00ff88;
        }

        .research-library-stats .stat-label {
            color: #94a3b8;
            font-size: 11px;
        }

        /* Mode Distribution for Research Library */
        .rl-mode-counts {
            display: flex;
            justify-content: center;
            gap: 12px;
            margin-bottom: 16px;
            padding: 8px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
        }

        .rl-mode-counts .mode-badge {
            font-size: 11px;
            padding: 4px 8px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .rl-mode-counts .mode-badge.compare {
            background: rgba(13, 110, 253, 0.2);
            color: #6ea8fe;
        }

        .rl-mode-counts .mode-badge.critique {
            background: rgba(255, 193, 7, 0.2);
            color: #ffda6a;
        }

        .rl-mode-counts .mode-badge.debate {
            background: rgba(220, 53, 69, 0.2);
            color: #ea868f;
        }

        .research-library-sessions {
            max-height: 280px;
            overflow-y: auto;
            margin-bottom: 16px;
        }

        .research-library-sessions::-webkit-scrollbar {
            width: 5px;
        }

        .research-library-sessions::-webkit-scrollbar-thumb {
            background: rgba(168, 85, 247, 0.4);
            border-radius: 3px;
        }

        .session-item {
            background: rgba(255, 255, 255, 0.04);
            border-radius: 8px;
            padding: 12px 14px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            border-left: 3px solid transparent;
        }

        .session-item:hover {
            background: rgba(168, 85, 247, 0.15);
            border-left: 3px solid #a855f7;
        }

        .session-item:hover::after {
            content: '↻ Reuse';
            position: absolute;
            right: 8px;
            top: 12px;
            font-size: 10px;
            color: #a855f7;
            background: rgba(168, 85, 247, 0.25);
            padding: 3px 8px;
            border-radius: 6px;
            font-weight: 500;
        }

        .session-item .session-title {
            font-size: 13px;
            font-weight: 500;
            color: #e2e8f0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 6px;
            padding-right: 55px;
            line-height: 1.3;
        }

        .session-item .session-meta {
            font-size: 11px;
            color: #94a3b8;
            display: flex;
            gap: 12px;
        }

        .session-item .session-meta i {
            font-size: 10px;
            margin-right: 3px;
        }

        .session-item.expanded {
            background: rgba(168, 85, 247, 0.12);
            border-left: 3px solid #a855f7;
        }

        .session-prompts {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            display: none;
            max-height: 200px;
            overflow-y: auto;
            padding-right: 10px;
        }

        /* Neon glow scrollbar for session prompts (like model dropdowns) */
        .session-prompts::-webkit-scrollbar {
            width: 8px;
        }

        .session-prompts::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 4px;
            box-shadow: inset 0 0 3px rgba(0, 255, 136, 0.1);
        }

        .session-prompts::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00ff88, #00ccff);
            border-radius: 4px;
            box-shadow: 0 0 6px #00ff88, 0 0 12px #00ccff, 0 0 18px #00ff88;
        }

        .session-prompts::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #00ffaa, #00eeff);
            box-shadow: 0 0 10px #00ffaa, 0 0 20px #00eeff, 0 0 30px #00ffaa;
        }

        .session-item.expanded .session-prompts {
            display: block;
        }

        .session-prompt-item {
            font-size: 12px;
            color: #cbd5e1;
            padding: 8px 10px;
            margin-bottom: 6px;
            background: rgba(0, 0, 0, 0.25);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.4;
        }

        .session-prompt-item:hover {
            background: rgba(168, 85, 247, 0.35);
            color: #f1f5f9;
        }

        .session-prompt-item::before {
            content: '→ ';
            color: #a855f7;
            font-weight: 600;
        }

        .research-library-expiry {
            background: rgba(255, 170, 68, 0.1);
            border: 1px solid rgba(255, 170, 68, 0.3);
            border-radius: 8px;
            padding: 10px 12px;
            text-align: center;
            margin-bottom: 16px;
        }

        .research-library-expiry.urgent {
            background: rgba(255, 107, 107, 0.1);
            border-color: rgba(255, 107, 107, 0.5);
        }

        .research-library-expiry i {
            margin-right: 6px;
        }

        .research-library-expiry .expiry-text {
            font-size: 12px;
            color: #ffaa44;
        }

        .research-library-expiry.urgent .expiry-text {
            color: #ff6b6b;
        }

        .research-library-cta {
            background: linear-gradient(90deg, #7c3aed, #ec4899);
            color: white;
            border: none;
            border-radius: 10px;
            padding: 14px 16px;
            font-size: 13px;
            font-weight: 600;
            width: 100%;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .research-library-cta:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
        }

        .research-library-locked {
            background: rgba(255, 255, 255, 0.03);
            border: 1px dashed rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            padding: 14px;
            margin-top: 14px;
        }

        .research-library-locked h5 {
            font-size: 12px;
            color: #94a3b8;
            margin: 0 0 10px 0;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .research-library-locked ul {
            margin: 0;
            padding-left: 18px;
            font-size: 11px;
            color: #64748b;
        }

        .research-library-locked li {
            margin-bottom: 5px;
            line-height: 1.4;
        }

        .research-library-empty {
            text-align: center;
            padding: 30px 15px;
            color: #64748b;
            font-size: 13px;
        }

        .research-library-empty i {
            font-size: 32px;
            margin-bottom: 12px;
            display: block;
            color: #94a3b8;
        }

        /* ILM Vision Research Panel Styles (Sidebar) */
        .ilm-research-panel {
            background: linear-gradient(135deg, #1a2e1a 0%, #162e16 100%);
            border: 1px solid rgba(77, 182, 172, 0.3);
            border-radius: 12px;
            padding: 18px;
            margin-bottom: 15px;
            min-height: 300px;
        }

        .ilm-research-panel.expired {
            border-color: rgba(255, 107, 107, 0.5);
            opacity: 0.8;
        }

        .ilm-research-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(77, 182, 172, 0.2);
        }

        .ilm-research-header i {
            color: #4db6ac;
            font-size: 18px;
        }

        .ilm-research-header h4 {
            margin: 0;
            font-size: 15px;
            font-weight: 600;
            color: #e2e8f0;
        }

        .ilm-research-header .trial-badge {
            background: rgba(77, 182, 172, 0.2);
            color: #81c784;
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 10px;
            margin-left: auto;
        }

        .ilm-research-stats {
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
            font-size: 12px;
        }

        .ilm-research-stats .stat {
            text-align: center;
            flex: 1;
        }

        .ilm-research-stats .stat-value {
            display: block;
            font-size: 22px;
            font-weight: 700;
            color: #4db6ac;
        }

        .ilm-research-stats .stat-label {
            color: #94a3b8;
            font-size: 11px;
        }

        .ilm-mode-counts {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 16px;
            padding: 10px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
        }

        .ilm-mode-counts .mode-badge {
            font-size: 12px;
            padding: 4px 10px;
            border-radius: 15px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .ilm-mode-counts .mode-badge.compare {
            background: rgba(13, 110, 253, 0.2);
            color: #6ea8fe;
        }

        .ilm-mode-counts .mode-badge.critique {
            background: rgba(255, 193, 7, 0.2);
            color: #ffda6a;
        }

        .ilm-mode-counts .mode-badge.debate {
            background: rgba(220, 53, 69, 0.2);
            color: #ea868f;
        }

        .ilm-expiry-notice {
            background: rgba(255, 170, 68, 0.1);
            border: 1px solid rgba(255, 170, 68, 0.3);
            border-radius: 8px;
            padding: 8px 12px;
            text-align: center;
            margin-bottom: 16px;
            font-size: 12px;
            color: #ffaa44;
        }

        .ilm-expiry-notice i {
            margin-right: 6px;
        }

        .ilm-sessions-list {
            max-height: 250px;
            overflow-y: auto;
            margin-bottom: 16px;
        }

        .ilm-sessions-list::-webkit-scrollbar {
            width: 6px;
        }

        .ilm-sessions-list::-webkit-scrollbar-thumb {
            background: rgba(77, 182, 172, 0.4);
            border-radius: 3px;
        }

        .ilm-session-item {
            background: rgba(255, 255, 255, 0.04);
            border-radius: 8px;
            padding: 12px 14px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.2s;
            border-left: 3px solid transparent;
        }

        .ilm-session-item:hover {
            background: rgba(77, 182, 172, 0.15);
            border-left: 3px solid #4db6ac;
        }

        .ilm-session-item .session-title {
            font-size: 13px;
            font-weight: 500;
            color: #e2e8f0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 6px;
        }

        .ilm-session-item .session-meta {
            font-size: 11px;
            color: #94a3b8;
            display: flex;
            gap: 12px;
        }

        .ilm-session-item .session-mode {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            text-transform: uppercase;
        }

        .ilm-session-item .session-mode.compare { background: rgba(13, 110, 253, 0.2); color: #6ea8fe; }
        .ilm-session-item .session-mode.critique { background: rgba(255, 193, 7, 0.2); color: #ffda6a; }
        .ilm-session-item .session-mode.debate { background: rgba(220, 53, 69, 0.2); color: #ea868f; }

        .ilm-empty-state {
            text-align: center;
            padding: 30px 15px;
            color: #64748b;
            font-size: 13px;
        }

        .ilm-empty-state i {
            font-size: 32px;
            margin-bottom: 12px;
            display: block;
            color: #4db6ac;
            opacity: 0.5;
        }

        .ilm-signup-cta {
            background: linear-gradient(90deg, #2d6a4f, #40916c);
            color: white;
            border-radius: 10px;
            padding: 14px 16px;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .ilm-signup-cta i {
            color: #81c784;
        }

        .ilm-signup-cta .signup-btn {
            margin-left: auto;
            background: #4db6ac;
            color: #1a1a1a;
            padding: 6px 14px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 600;
            font-size: 11px;
            transition: all 0.2s;
        }

        .ilm-signup-cta .signup-btn:hover {
            background: #81c784;
            transform: scale(1.05);
        }

        /* Milestone notification styles */
        .milestone-notification {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border: 2px solid #7c3aed;
            border-radius: 12px;
            padding: 15px 20px;
            max-width: 320px;
            z-index: 9999;
            animation: slideInRight 0.3s ease-out;
            box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
        }

        .milestone-notification.warning {
            border-color: #ffaa44;
        }

        .milestone-notification.urgent {
            border-color: #ff6b6b;
            animation: slideInRight 0.3s ease-out, pulse 1s infinite;
        }

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

        @keyframes slideOutRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        .milestone-notification .close-btn {
            position: absolute;
            top: 8px;
            right: 10px;
            background: none;
            border: none;
            color: #718096;
            cursor: pointer;
            font-size: 14px;
        }

        .milestone-notification .message {
            font-size: 13px;
            color: #e2e8f0;
            margin-bottom: 10px;
        }

        .milestone-notification .action-btn {
            background: linear-gradient(90deg, #7c3aed, #ec4899);
            color: white;
            border: none;
            border-radius: 6px;
            padding: 8px 16px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }

        /* Main Content */
        main {
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            /* Allow children to fill width */
        }

        h1 {
            margin-top: 0;
            margin-bottom: 20px;
            font-size: 28px;
            text-align: center;
        }

        form {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 100%;
            /* Changed from 800px to allow forms to expand */
            margin: 0 auto;
        }

        #model {
            width: 100%;
            padding: 15px 20px;
            margin-bottom: 15px;
            font-size: 16px;
            border: none;
            border-radius: 25px;
            background-color: #2c2c2c;
            color: white;
            outline: none;
        }

        #message {
            width: 100%;
            padding: 15px 20px;
            font-size: 16px;
            border: none;
            border-radius: 25px;
            /* Keep rounded corners */
            background-color: #2c2c2c;
            color: white;
            outline: none;
            margin-bottom: 15px;
            resize: vertical;
            /* Allow vertical resizing */
            overflow-y: auto;
            /* Ensure scrollbar appears when needed */
            min-height: calc(1.5em * 4 + 30px);
            /* Approx height for 4 rows + padding */
            line-height: 1.5;
            /* Match general text */
        }

        /* Added .message class with same styles as #message */
        .message {
            width: 100%;
            padding: 15px 20px;
            font-size: 16px;
            border: none;
            border-radius: 25px;
            background-color: #2c2c2c;
            color: white;
            outline: none;
            margin-bottom: 15px;
            resize: vertical;
            overflow-y: auto;
            min-height: calc(1.5em * 4 + 30px);
            line-height: 1.5;
        }

        .button-container {
            display: flex;
            gap: 10px;
            /* Space between buttons */
            width: 100%;
            max-width: 750px;
            /* Adjusted to fit all buttons on larger screens */
            justify-content: flex-start;
            flex-wrap: nowrap;
        }

        input[type="submit"],
        button[type="submit"],
        .summarize-button,
        .debate-button,
        .critique-button {
            padding: 10px 20px;
            background-color: #333;
            color: white;
            border: 2px solid #0077cc;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.3s;
        }

        input[type="submit"]:hover,
        button[type="submit"]:hover,
        .summarize-button:hover,
        .debate-button:hover,
        .critique-button:hover {
            background-color: #505050;
        }
        
        /* Neon glow blinking animation for summarize button */
        @keyframes neonBlinkBorder {
            0% { 
                border-color: #32cd32;
                box-shadow: 0 0 5px #32cd32, 0 0 10px #32cd32;
            }
            50% { 
                border-color: #00ff00;
                box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
            }
            100% { 
                border-color: #32cd32;
                box-shadow: 0 0 5px #32cd32, 0 0 10px #32cd32;
            }
        }
        
        .summarize-button.blink-border {
            animation: neonBlinkBorder 1s infinite;
            border-width: 3px;
            border-color: #32cd32 !important;
        }

        .response-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
            width: 100%;
            max-width: 100%;
            /* Allow full width */
            margin-top: 30px;
        }

        /* Compare: expand one pane to use full grid — follow-up chat targets that model only until collapsed */
        #response-container.compare-pane-expanded .response-box.compare-pane-hidden {
            display: none !important;
        }

        #response-container.compare-pane-expanded .response-box.compare-pane-focus {
            grid-column: 1 / -1;
            height: min(78vh, 920px);
            max-height: none;
        }

        #response-container #web-search-panel-response.compare-pane-collateral-hidden {
            display: none !important;
        }

        button.compare-pane-toggle {
            width: 22px;
            height: 22px;
            min-width: 22px;
            padding: 0;
            margin-left: 10px;
            flex-shrink: 0;
            border: 1px solid #555;
            border-radius: 4px;
            background: #363636;
            color: #bbb;
            font-size: 13px;
            line-height: 1;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            vertical-align: middle;
        }

        button.compare-pane-toggle:hover {
            border-color: #4db6ac;
            color: #e0e0e0;
            background: #404040;
        }

        button.compare-pane-toggle .compare-pane-toggle-glyph {
            pointer-events: none;
            font-weight: 600;
        }

        .response-box {
            height: 500px;
            /* Base height for larger screens */
            overflow-y: auto;
            /* Enable vertical scrolling */
            position: relative;
            border: 1px solid #404040;
            border-radius: 8px;
            background-color: #2a2a2a;
            padding: 15px;
            margin-bottom: 20px;
        }

        @media (max-width: 768px) {
            .response-box {
                height: 400px;
                /* Adjust height for medium screens */
            }
        }

        @media (max-width: 576px) {
            .response-box {
                height: 300px;
                /* Adjust height for small screens */
            }
        }

        /* Neon glow scrollbar for response boxes (debate/critique/compare) */
        .response-box::-webkit-scrollbar {
            width: 10px;
        }

        .response-box::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 5px;
            box-shadow: inset 0 0 5px rgba(0, 255, 136, 0.1);
        }

        .response-box::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00ff88, #00ccff);
            border-radius: 5px;
            box-shadow: 0 0 10px #00ff88, 0 0 20px #00ccff, 0 0 30px #00ff88;
        }

        .response-box::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #00ffaa, #00eeff);
            box-shadow: 0 0 15px #00ffaa, 0 0 30px #00eeff, 0 0 45px #00ffaa;
        }

        /* Firefox scrollbar styling for response boxes */
        .response-box {
            scrollbar-width: thin;
            scrollbar-color: #00ff88 #1a1a2e;
        }

        .response-content {
            padding-right: 10px;
            margin-bottom: 20px;
        }

        .model-name {
            color: #ffcc00;
            margin: 0 0 15px 0;
            font-size: 1.2em;
            padding-left: 15px;
        }

        .response-content {
            font-size: 16px;
            line-height: 1.5;
            color: #f0f0f0;
            /* white-space: pre-wrap; removed for proper markdown HTML rendering */
        }

        /* Add proper heading styles for response content */
        .response-content h1 {
            font-size: 2.15em;
            margin: 0.9em 0 0.55em 0;
            line-height: 1.12;
            font-weight: 800;
            color: #ffffff;
            letter-spacing: -0.02em;
        }
        
        .response-content h2 {
            font-size: 1.75em;
            margin: 0.85em 0 0.45em 0;
            line-height: 1.16;
            font-weight: 750;
            color: #e9fbff;
        }
        
        .response-content h3 {
            font-size: 1.42em;
            margin: 0.8em 0 0.4em 0;
            line-height: 1.2;
            color: #00ffcc; /* Cyan - site primary accent */
        }
        
        .response-content h4 {
            font-size: 1.1em;
            margin: 0.6em 0 0.3em 0;
            padding-bottom: 0.2em;
            border-bottom: 1px solid #444;
            color: #00aaff; /* Blue accent */
            line-height: 1.2;
        }
        
        .response-content h5 {
            font-size: 1em;
            margin: 0.5em 0 0.25em 0;
            font-weight: bold;
            line-height: 1.2;
            color: #66ddaa; /* Muted green-cyan */
        }
        
        .response-content h6 {
            font-size: 0.95em;
            margin: 0.4em 0 0.2em 0;
            font-weight: bold;
            color: #99ccbb; /* Soft sage */
        }

        /* Fix spacing after headings */
        .response-content h1+br,
        .response-content h2+br,
        .response-content h3+br,
        .response-content h4+br,
        .response-content h5+br,
        .response-content h6+br {
            display: none;
        }

        /* Markdown-specific styling for lists */
        .response-content ul,
        .response-content ol {
            margin: 1em 0;
            padding-left: 2em;
            line-height: 1.6;
        }
        
        .response-content li {
            margin: 0.5em 0;
        }
        
        .response-content ul ul,
        .response-content ol ul,
        .response-content ul ol,
        .response-content ol ol {
            margin: 0.3em 0;
        }

        /* Markdown code blocks */
        .response-content code {
            background-color: #2d2d2d;
            border: 1px solid #404040;
            border-radius: 3px;
            padding: 2px 6px;
            font-family: 'Courier New', Courier, monospace;
            font-size: 0.9em;
            color: #f8f8f2;
        }
        
        .response-content pre {
            background-color: #2d2d2d;
            border: 1px solid #404040;
            border-radius: 5px;
            padding: 12px;
            overflow-x: auto;
            margin: 1em 0;
        }
        
        .response-content pre code {
            background: none;
            border: none;
            padding: 0;
            font-size: 0.95em;
        }

        /* Markdown blockquotes */
        .response-content blockquote {
            border-left: 4px solid #0077cc;
            margin: 1em 0;
            padding: 0.5em 1em;
            background-color: #2a2a2a;
            color: #ddd;
        }

        /* Markdown tables */
        .response-content table {
            border-collapse: collapse;
            width: 100%;
            margin: 1em 0;
            background-color: #2d2d2d;
        }
        
        .response-content th,
        .response-content td {
            border: 1px solid #404040;
            padding: 8px 12px;
            text-align: left;
        }
        
        .response-content th {
            background-color: #3a3a3a;
            font-weight: bold;
            color: #00ccff;
        }

        /* Markdown horizontal rules */
        .response-content hr {
            border: none;
            border-top: 2px solid #404040;
            margin: 2em 0;
        }

        /* Markdown links */
        .response-content a {
            color: #0077cc;
            text-decoration: none;
        }
        
        .response-content a:hover {
            color: #00aaff;
            text-decoration: underline;
        }

        /* Markdown strong/bold */
        .response-content strong {
            font-weight: bold;
            color: #fff;
        }

        /* Markdown emphasis/italic */
        .response-content em {
            font-style: italic;
            color: #e0e0e0;
        }

        /* Paragraphs in markdown */
        .response-content p {
            margin: 0.8em 0;
            line-height: 1.6;
        }

        /* Readability treatment for critique/debate output panes */
        .critique-box .content,
        .critique-model-content,
        .review-content,
        .response-box .response-content,
        .model-argument .content,
        .model-rebuttal .content,
        .debate-summary .content {
            line-height: 1.68;
            letter-spacing: 0.01em;
            padding-right: 12px;
            scrollbar-width: thin;
            scrollbar-color: #44aa99 #1a1f24;
        }

        .critique-box .content::-webkit-scrollbar,
        .critique-model-content::-webkit-scrollbar,
        .review-content::-webkit-scrollbar,
        .response-box .response-content::-webkit-scrollbar,
        .model-argument .content::-webkit-scrollbar,
        .model-rebuttal .content::-webkit-scrollbar,
        .debate-summary .content::-webkit-scrollbar {
            width: 9px;
            height: 9px;
        }

        .critique-box .content::-webkit-scrollbar-track,
        .critique-model-content::-webkit-scrollbar-track,
        .review-content::-webkit-scrollbar-track,
        .response-box .response-content::-webkit-scrollbar-track,
        .model-argument .content::-webkit-scrollbar-track,
        .model-rebuttal .content::-webkit-scrollbar-track,
        .debate-summary .content::-webkit-scrollbar-track {
            background: #1a1f24;
            border-radius: 8px;
            box-shadow: inset 0 0 4px rgba(68, 170, 153, 0.12);
        }

        .critique-box .content::-webkit-scrollbar-thumb,
        .critique-model-content::-webkit-scrollbar-thumb,
        .review-content::-webkit-scrollbar-thumb,
        .response-box .response-content::-webkit-scrollbar-thumb,
        .model-argument .content::-webkit-scrollbar-thumb,
        .model-rebuttal .content::-webkit-scrollbar-thumb,
        .debate-summary .content::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #44aa99, #00ccff);
            border: 2px solid #1a1f24;
            border-radius: 8px;
        }

        .critique-box .content::-webkit-scrollbar-thumb:hover,
        .critique-model-content::-webkit-scrollbar-thumb:hover,
        .review-content::-webkit-scrollbar-thumb:hover,
        .response-box .response-content::-webkit-scrollbar-thumb:hover,
        .model-argument .content::-webkit-scrollbar-thumb:hover,
        .model-rebuttal .content::-webkit-scrollbar-thumb:hover,
        .debate-summary .content::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #66d6c7, #44ddff);
        }

        .critique-reference-label {
            display: inline-block;
            margin-top: 0.65em;
            padding: 2px 7px;
            border-radius: 5px;
            background: rgba(68, 170, 153, 0.16);
            color: #7ee6d6;
            font-weight: 700;
            letter-spacing: 0.02em;
        }

        .critique-quoted-ref {
            display: inline;
            padding: 1px 5px;
            border-radius: 4px;
            background: rgba(255, 193, 7, 0.12);
            color: #ffe08a;
            box-decoration-break: clone;
            -webkit-box-decoration-break: clone;
        }

        .critique-paragraph-gap {
            display: block;
            height: 1em;
            line-height: 1em;
        }

        /* Also adjust mobile heading styles */
        @media (max-width: 768px) {

            /* Adjust heading sizes for mobile */
            .response-content h1 {
                font-size: 1.6em;
                margin: 0.7em 0 0.4em 0;
            }
            
            .response-content h2 {
                font-size: 1.4em;
                margin: 0.6em 0 0.3em 0;
            }
            
            .response-content h3 {
                font-size: 1.2em;
                margin: 0.5em 0 0.3em 0;
            }
            
            .response-content h4 {
                font-size: 1.05em;
                margin: 0.4em 0 0.2em 0;
            }
            
            .response-content h5 {
                font-size: 0.95em;
                margin: 0.3em 0 0.2em 0;
            }
            
            /* Responsive critique modal for tablets */
            #critique-modal .modal-content {
                width: 98% !important;
                max-width: 98% !important;
                margin: 2% auto !important;
                padding: 20px !important;
                max-height: 94vh !important;
            }
            
            #critique-modal .scrollable-models {
                max-height: 45vh !important;
                min-height: 200px !important;
            }
            
            /* Stack template buttons on smaller screens */
            .critique-templates > div {
                flex-direction: column !important;
            }
            
            .critique-template-btn {
                width: 100% !important;
            }
        }
        
        /* Mobile phone responsive styles */
        @media (max-width: 576px) {
            #critique-modal .modal-content {
                width: 99% !important;
                max-width: 99% !important;
                margin: 1% auto !important;
                padding: 12px !important;
                max-height: 96vh !important;
            }
            
            #critique-modal .scrollable-models {
                max-height: 45vh !important;
                min-height: 200px !important;
            }
            
            /* Smaller template buttons on mobile - make them inline to save space */
            .critique-template-btn, .vision-template-btn {
                font-size: 10px !important;
                padding: 4px 6px !important;
            }
            
            /* Smaller Start Critique button on mobile */
            #start-critique-button {
                padding: 8px 16px !important;
                font-size: 13px !important;
            }
            
            /* Hide template section header text on small screens */
            #critique-templates-section > div:first-child p {
                font-size: 11px !important;
            }
            
            /* Adjust critique icon and close button for mobile */
            #critique-modal .critique-icon {
                font-size: 20px !important;
                top: 20px !important;
                left: 15px !important;
            }
            
            #critique-modal .close-button {
                font-size: 24px !important;
                right: 10px !important;
                top: 10px !important;
            }
            
            /* Smaller heading on mobile */
            #critique-modal h3 {
                font-size: 1.2em !important;
                margin-top: 5px !important;
            }
            
            /* Compact template section on mobile */
            .critique-templates {
                padding: 6px !important;
                margin: 8px 0 !important;
            }
            
            .critique-templates p {
                font-size: 10px !important;
                margin-bottom: 4px !important;
            }
            
            /* Make template buttons wrap in a grid on mobile */
            .critique-templates > div:last-child {
                gap: 3px !important;
            }
            
            /* Reduce critique modal description text */
            #critique-modal ol {
                margin: 8px 0 !important;
                padding-left: 20px !important;
                font-size: 11px !important;
            }
            
            #critique-modal ol li {
                margin-bottom: 3px !important;
            }
            
            /* Smaller topic textarea */
            #critique-topic {
                font-size: 12px !important;
                padding: 6px !important;
            }
            
            /* Reduce spacing around model selection */
            #critique-modal p[style*="margin-top"] {
                margin-top: 6px !important;
                margin-bottom: 4px !important;
                font-size: 11px !important;
            }
            
            /* Stack help link on mobile */
            .critique-templates > div:first-child {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 8px !important;
            }
            
            .critique-templates a {
                font-size: 11px !important;
                padding: 4px 8px !important;
            }
        }

        .model-name {
            position: sticky;
            top: 0;
            background: #2c2c2c;
            z-index: 1;
            padding: 10px 0;
            border-bottom: 2px solid #404040;
            margin-bottom: 15px;
        }

        .response-content {
            padding-top: 10px;
        }

        .error {
            color: #ff4444;
            padding: 15px;
            margin: 20px 0;
            background: #3a1e1e;
            border-radius: 8px;
            width: 100%;
            max-width: 800px;
        }

        pre {
            background-color: #333;
            color: #f8f8f2;
            padding: 15px;
            border-radius: 8px;
            overflow-x: auto;
            margin: 15px 0;
        }

        code {
            font-family: 'Courier New', Courier, monospace;
        }

        .hyphen-block {
            margin-bottom: 10px;
            padding: 10px;
            background-color: #2c2c2c;
            border-radius: 8px;
            display: block;
            white-space: pre-wrap;
        }

        .helper-text {
            color: #fff;
            font-size: 0.9em;
            margin-top: 5px;
        }

        /* Fix for ordered and unordered lists */
        .response-content ol,
        .response-content ul {
            margin-top: 0.5em;
            margin-bottom: 0.5em;
            padding-left: 2em;
        }
        
        .response-content li {
            margin-bottom: 0.5em;
            padding: 0;
        }
        
        /* More specific styling for ordered and unordered lists */
        .response-content ol li,
        .response-content ul li {
            margin-bottom: 0.3em;
            line-height: 1.4;
            position: relative;
        }
        
        /* Remove excessive spacing between list items */
        .response-content ol li+li,
        .response-content ul li+li {
            margin-top: 0.2em;
        }
        
        /* Special handling for auto-numbered lists where all items had the same number */
        .response-content ol.auto-numbered {
            counter-reset: list-item;
            list-style-type: none;
        }
        
        .response-content ol.auto-numbered>li {
            counter-increment: list-item;
            position: relative;
            padding-left: 2em;
        }
        
        .response-content ol.auto-numbered>li:before {
            content: counter(list-item) ".";
            position: absolute;
            left: 0.5em;
            font-weight: bold;
        }

        /* Media Queries for Responsive Design */
        @media (max-width: 768px) {
            body {
                grid-template-columns: 1fr;
            }

            aside {
                display: none;
                /* Hide aside column by default on small screens */
            }

            .hamburger {
                display: flex;
                /* Show hamburger menu */
            }

            nav {
                display: none;
                /* Hide navigation menu by default on small screens */
                flex-direction: column;
                position: absolute;
                top: 80px;
                left: 20px;
                background-color: #2c2c2c;
                border: 2px solid limegreen;
                border-radius: 10px;
                padding: 10px;
            }

            nav.active {
                display: flex;
                /* Show navigation menu when active */
            }

            aside.active {
                display: block;
                /* Show aside column when active */
            }
            
            .response-container {
                grid-template-columns: 1fr;
            }
            
            .model-select-container {
                flex-direction: column;
                gap: 10px;
            }
            
            .model-group {
                width: 100%;
            }
            
            /* Reduce size of main heading */
            h1 {
                font-size: 24px;
                margin-bottom: 15px;
            }
        }
        
        /* Specific adjustments for phone-sized screens */
        @media (max-width: 480px) {
            .scrollable-models {
                max-height: 40vh !important;
                min-height: 200px !important;
            }
            
            .modal-content h3 {
                font-size: 1.2em;
            }
            
            .modal-content p,
            .modal-content li {
                font-size: 0.9em;
            }
            
            /* Adjust header for smaller screens */
            header {
                padding: 10px;
            }
            
            .logo {
                font-size: 20px;
                margin-right: 15px;
            }
            
            .logo .blurb {
                font-size: 12px;
            }
            
            /* Adjust input fields for mobile */
            #message {
                padding: 12px 15px;
                font-size: 14px;
            }
            
            /* Adjust buttons for mobile */
            .button-container {
                flex-wrap: wrap;
                gap: 8px;
            }
            
            input[type="submit"],
            button[type="submit"],
            .summarize-button,
            .debate-button,
            .critique-button {
                padding: 8px 15px;
                font-size: 14px;
                min-width: 90px;
            }
            
            /* Adjust form padding */
            form {
                padding: 0 5px;
            }
            
            /* Reduce response box height to fit more content on screen */
            .response-box {
                height: 400px;
            }
            
            /* Adjust model selection for mobile */
            .model-select {
                font-size: 14px;
                padding: 10px 15px;
            }
            
            .model-label {
                font-size: 14px;
            }
            
            /* Improve response content readability on mobile */
            .response-content {
                font-size: 14px;
                padding-right: 5px;
                padding-left: 8px;
            }
            
            /* Adjust code blocks for mobile */
            .response-content .model-response-code-block {
                padding: 8px;
                margin: 8px 0;
                font-size: 12px;
                overflow-x: auto;
            }
            
            .response-content .model-response-inline-code {
                font-size: 12px;
                padding: 1px 3px;
            }
            
            /* Adjust list spacing for mobile */
            .response-content ol,
            .response-content ul {
                padding-left: 20px;
                margin-top: 0.3em;
                margin-bottom: 0.3em;
            }
            
            /* Summary helper message adjustments */
            .summary-helper-message {
                font-size: 0.8em !important;
                padding: 8px !important;
            }
            
            /* User help message adjustment */
            .user-help-message {
                font-size: 0.8em !important;
                padding: 8px !important;
            }
            
            /* Improve debate modal for mobile */
            #debate-modal .modal-content {
                padding: 20px 15px;
                margin: 2% auto;
                width: 98%;
                max-height: 94vh;
            }
            
            #debate-modal .debate-icon {
                display: none;
                /* Hide icon on very small screens */
            }
            
            #debate-topic {
                font-size: 14px;
                padding: 10px;
            }
            
            #debate-modal h3 {
                margin-top: 0;
            }
            
            #start-debate-button {
                padding: 10px 15px;
                font-size: 14px;
                width: 100%;
            }
            
            /* Adjust heading sizes for mobile */
            .response-content h1 {
                font-size: 1.6em;
                margin: 0.7em 0 0.4em 0;
            }
            
            .response-content h2 {
                font-size: 1.4em;
                margin: 0.6em 0 0.3em 0;
            }
            
            .response-content h3 {
                font-size: 1.2em;
                margin: 0.5em 0 0.3em 0;
            }
            
            .response-content h4 {
                font-size: 1.05em;
                margin: 0.4em 0 0.2em 0;
            }
            
            .response-content h5 {
                font-size: 0.95em;
                margin: 0.3em 0 0.2em 0;
            }
        }
        
        /* Extra small phone screens */
        @media (max-width: 375px) {
            .logo {
                font-size: 18px;
            }
            
            .logo .blurb {
                font-size: 10px;
            }
            
            h1 {
                font-size: 20px;
            }
            
            /* Make buttons stack on extra small screens */
            .button-container {
                flex-direction: column;
                width: 100%;
                align-items: center;
            }
            
            input[type="submit"],
            button[type="submit"],
            .summarize-button,
            .debate-button,
            .critique-button {
                width: 100%;
                max-width: 200px;
                margin-bottom: 5px;
            }
            
            /* Further reduce response box height */
            .response-box {
                height: 350px;
            }
            
            /* More compact layout */
            main {
                padding: 15px 10px;
            }
            
            /* Adjust model name container for very small screens */
            .model-name-container {
                padding: 8px 0 8px 8px;
            }
            
            .model-name {
                font-size: 1.1em;
                padding-left: 10px;
            }
            
            /* Ensure response boxes have proper spacing */
            .response-container {
                gap: 15px;
                margin-top: 20px;
            }
            
            /* Further adjustments for debate modal on very small screens */
            #debate-modal .modal-content {
                padding: 15px 12px;
                margin: 1% auto;
                max-height: 96vh;
            }
            
            #debate-modal ol {
                padding-left: 20px;
            }
            
            #debate-modal p,
            #debate-modal li {
                font-size: 13px;
                margin-bottom: 8px;
            }
        }

        /* =============================================================================
           WEB SEARCH STYLES
           Styling for search buttons, collapsible panels, and loading states
           ============================================================================= */
        
        /* Search button base styles */
        .web-search-trigger {
            position: relative;
            transition: all 0.2s ease;
        }
        
        .web-search-trigger:hover {
            color: #a5d6a7 !important;
            transform: scale(1.1);
        }
        
        .web-search-trigger:active {
            transform: scale(0.95);
        }
        
        /* Search button loading state */
        .web-search-trigger.searching {
            pointer-events: none;
            opacity: 0.7;
        }
        
        .web-search-trigger.searching i {
            animation: none !important; /* Remove pulsating animation */
        }
        
        /* Search button with results indicator */
        .web-search-trigger.has-results::after {
            content: '';
            position: absolute;
            top: 2px;
            right: 2px;
            width: 8px;
            height: 8px;
            background-color: #4caf50;
            border-radius: 50%;
            border: 2px solid #1e1e1e;
        }
        
        /* Web search panel (collapsible) */
        .web-search-panel {
            margin-top: 15px;
            animation: slideIn 0.3s ease-out;
        }

        /* Web search results wrapper (for text-only critiques) */
        .web-search-results-wrapper {
            max-width: 28%; /* Further reduce from 35% to 28% for less screen space */
            margin-bottom: 15px;
            float: right; /* Position on the right side */
            margin-left: 15px;
        }

        .web-search-results-wrapper .web-search-details {
            background: #1e1e1e !important; /* Solid opaque background instead of gradient */
            animation: none !important; /* Remove any pulsating effects */
        }

        /* Remove slide-in animation for web search panel */
        .web-search-panel {
            margin-top: 15px;
            animation: none !important; /* Disable slide-in animation */
        }
        
        .web-search-details {
            background: #1e1e1e !important; /* Solid opaque background instead of gradient */
            border-radius: 8px;
            border: 1px solid #2d4a2d;
            overflow: hidden;
        }

        /* Override for text-only critiques - solid opaque background */
        .web-search-results-wrapper .web-search-details {
            background: #1e1e1e !important;
            border: 1px solid #444 !important;
        }

        .web-search-results-wrapper .web-search-details .search-content {
            background: #1e1e1e !important;
            border-top: 1px solid #444 !important;
        }

        .web-search-results-wrapper .search-source-item {
            background: #2a2a2a !important;
        }

        .web-search-results-wrapper .search-source-item:hover {
            background: #333 !important;
        }
        
        .web-search-details summary {
            padding: 12px 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #81c784;
            font-weight: 600;
            user-select: none;
            list-style: none;
        }
        
        .web-search-details summary::-webkit-details-marker {
            display: none;
        }
        
        .web-search-details summary:hover {
            background: rgba(129, 199, 132, 0.1);
        }
        
        .web-search-details[open] .search-chevron {
            transform: rotate(180deg);
        }
        
        .web-search-details .search-content {
            padding: 15px;
            border-top: 1px solid #2d4a2d;
        }
        
        /* Search source items */
        .search-source-item {
            padding: 8px 12px;
            background: #2a2a2a;
            border-radius: 6px;
            margin-bottom: 6px;
            transition: all 0.2s ease;
        }
        
        .search-source-item:hover {
            background: #333;
            transform: translateX(4px);
        }
        
        .search-source-item a {
            color: #64b5f6;
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
        }
        
        .search-source-item a:hover {
            text-decoration: underline;
        }
        
        /* Search summary box */
        .search-summary {
            padding: 12px;
            background: #1e3a2f;
            border-radius: 6px;
            margin-bottom: 12px;
            border-left: 3px solid #4caf50;
        }
        
        /* Error state */
        .web-search-error {
            background: linear-gradient(135deg, #2a1a1a 0%, #1e1e1e 100%);
            border-left: 4px solid #f44336;
        }
        
        /* Search loading indicator in response area */
        .search-loading-indicator {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px;
            background: #1a2f1a;
            border-radius: 6px;
            margin-bottom: 10px;
            border: 1px dashed #4caf50;
        }
        
        .search-loading-indicator .spinner {
            width: 18px;
            height: 18px;
            border: 2px solid #2d4a2d;
            border-top-color: #81c784;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* Responsive adjustments for search panel */
        @media (max-width: 768px) {
            .web-search-details summary {
                padding: 10px 12px;
                font-size: 13px;
            }
            
            .web-search-details .search-content {
                padding: 12px;
            }
            
            .search-source-item {
                padding: 6px 10px;
            }
            
            .search-source-item a {
                font-size: 12px;
            }
        }
        
        /* Textarea with action buttons */
        .textarea-action-buttons {
            position: absolute;
            bottom: 12px;
            right: 12px;
            display: flex;
            gap: 8px;
            z-index: 10;
        }
        
        .textarea-action-buttons button {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 18px;
            padding: 5px;
            transition: all 0.2s;
            border-radius: 4px;
        }
        
        .textarea-action-buttons button:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        /* End Web Search Styles */

        /* Native selects: readable closed state + option list where the engine honors it */
        select {
            color-scheme: dark;
        }

        select option,
        select optgroup {
            background-color: #0f172a;
            color: #f1f5f9;
        }

        select option:checked,
        select option:focus {
            background-color: #334155;
            color: #ffffff;
        }

        /* Additional styles for the new dropdown layout */
        .model-select-container {
            display: flex;
            gap: 20px;
            width: 100%;
            max-width: 100%;
            /* Allow full width */
            margin-bottom: 15px;
            /* Default: no wrapping */
        }

        .model-group {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .model-label {
            color: #00ffcc;
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 8px;
            text-align: center;
            text-shadow: 0 0 3px rgba(0, 255, 204, 0.4);
        }

        .model-select {
            flex: 1;
            padding: 15px 20px;
            font-size: 16px;
            border: 1px solid #64748b;
            border-radius: 25px;
            background-color: #1e293b;
            color: #f8fafc;
            color-scheme: dark;
            outline: none;
            overflow-y: auto;
            /* Add vertical scrollbar if needed */
        }

        .model-select option {
            padding: 10px;
            background-color: #0f172a;
            color: #f1f5f9;
        }

        .model-select option:checked,
        .model-select option:hover {
            background-color: #334155;
            color: #ffffff;
        }

        .helper-text {
            color: #fff;
            font-size: 0.9em;
            margin-top: 5px;
            text-align: center;
        }

        .debate-button {
            padding: 10px 20px;
            background-color: #333;
            color: white;
            border: 2px solid #0077cc;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.3s;
        }
        
        .debate-button:hover {
            background-color: #444;
        }
        
        /* Fix the spacing between model headings and argument text */
        .argument-text {
            margin-top: 5px;
            margin-bottom: 20px;
            padding-left: 15px;
            border-left: 3px solid #444;
        }
        
        /* Style specifically for model names in debate view */
        .response-content>h4 {
            color: #00ccff;
            border-bottom: 1px solid #444;
            padding-bottom: 0.3em;
            margin-top: 1.2em;
        }

        /* Make tab content panes wider */
        #llms-pane.tab-pane,
        #ilms-pane.tab-pane,
        #tlms-tab-content.tab-pane {
            max-width: 95%;
            /* Make it take more of the screen width */
            width: 100%;
            /* Ensure it tries to use all available space up to max-width */
            margin-left: auto;
            /* Center the container if it's narrower than full screen */
            margin-right: auto;
            /* Center the container */
        }

        /* Ensure the forms within tabs also expand */
        #llms-pane #query-form,
        #ilms-pane #ilms-form,
        #tlms-tab-content #tlmsForm {
            max-width: 100%;
            width: 100%;
        }

        /* Ensure form groups and specific input containers within tabs expand */
        #llms-pane .form-group,
        #ilms-pane .form-group,
        #tlms-tab-content .form-group,
        #llms-pane .model-select-container,
        #ilms-pane .model-select-container,
        #llms-pane #selected-models-display,
        #llms-pane #model-search,
        #llms-pane #message,
        #ilms-pane #vision-prompt,
        #ilms-pane #vision-responses,
        #ilms-pane #vision-responses-grid,
        #ilms-pane .custom-file-upload,
        #ilms-pane #vision-templates-section > div,
        #ilms-pane .button-container,
        #tlms-tab-content #tlmsMessage {
            width: 100% !important;
            max-width: 100% !important;
        }

        /* Center VLM tab buttons like LLMs tab */
        #ilms-pane .button-container {
            justify-content: center;
        }

        /* Ensure the response containers and boxes themselves fill the available space */
        .response-container {
            width: 100%;
            /* Make response container take full width of its parent (the tab pane) */
            max-width: 100%;
        }

        .response-container .response-box {
            width: 100%;
            min-width: 350px;
            /* Prevent boxes from becoming too narrow */
        }

        /* Style for the model search box */
        #model-search {
            width: 100%;
            max-width: 800px;
            padding: 10px 15px 10px 40px;
            /* Adjusted left padding for icon */
            margin-bottom: 20px;
            font-size: 16px;
            border: 1px solid #404040;
            border-radius: 25px;
            background-color: #2c2c2c;
            color: white;
            outline: none;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23808080" width="18px" height="18px"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
            background-repeat: no-repeat;
            background-position: 15px center;
            /* Position icon on the left */
            background-size: 18px 18px;
        }

        /* Style for debate model headings */
        .model-debate-heading {
            color: #00ccff !important;
            font-size: 1.15em !important;
            margin: 1.2em 0 0.3em 0 !important;
            padding-bottom: 0.3em !important;
            border-bottom: 1px solid #444 !important;
        }
        
        /* New styles for the debate model selection with Bootstrap */
        .scrollable-models {
            max-height: 450px;
            min-height: 150px;
            overflow-y: auto;
            padding-right: 15px;
            margin-bottom: 15px;
            background-color: #2a2a2a;
            border-radius: 8px;
            padding: 12px;
        }

        /* Neon glow scrollbar for model selection containers */
        .scrollable-models::-webkit-scrollbar {
            width: 10px;
        }

        .scrollable-models::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 5px;
            box-shadow: inset 0 0 5px rgba(0, 255, 136, 0.1);
        }

        .scrollable-models::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00ff88, #00ccff);
            border-radius: 5px;
            box-shadow: 0 0 8px #00ff88, 0 0 16px #00ccff, 0 0 24px #00ff88;
        }

        .scrollable-models::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #00ffaa, #00eeff);
            box-shadow: 0 0 12px #00ffaa, 0 0 24px #00eeff, 0 0 36px #00ffaa;
        }

        /* =============================================================================
           Critique & Debate dialogs — themed scrollbars (overlay, panel, lists, inputs)
           ============================================================================= */

        /* ----- Debate modal (#0077cc) ----- */
        #debate-modal.modal {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 153, 255, 0.85) rgba(15, 18, 28, 0.92);
        }

        #debate-modal.modal::-webkit-scrollbar {
            width: 11px;
            height: 11px;
        }

        #debate-modal.modal::-webkit-scrollbar-track {
            background: rgba(12, 16, 26, 0.9);
            border-radius: 8px;
        }

        #debate-modal.modal::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(51, 187, 255, 0.95), rgba(0, 85, 170, 0.92));
            border-radius: 8px;
            border: 2px solid rgba(12, 16, 26, 0.95);
            box-shadow: 0 0 10px rgba(0, 153, 255, 0.35);
        }

        #debate-modal.modal::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #4dc3ff, #0077cc);
            box-shadow: 0 0 14px rgba(77, 195, 255, 0.5);
        }

        #debate-modal .modal-content {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 153, 255, 0.88) #1a2030;
        }

        #debate-modal .modal-content::-webkit-scrollbar {
            width: 11px;
        }

        #debate-modal .modal-content::-webkit-scrollbar-track {
            background: linear-gradient(180deg, #161b28 0%, #121624 100%);
            border-radius: 10px;
            margin: 8px 0;
        }

        #debate-modal .modal-content::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #1aa3ff 0%, #0055aa 100%);
            border-radius: 10px;
            border: 2px solid #1a2030;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 12px rgba(0, 153, 255, 0.22);
        }

        #debate-modal .modal-content::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #4dc3ff 0%, #0088dd 100%);
        }

        #debate-modal textarea {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 153, 255, 0.75) #2c323f;
        }

        #debate-modal textarea::-webkit-scrollbar {
            width: 9px;
        }

        #debate-modal textarea::-webkit-scrollbar-track {
            background: #2a3040;
            border-radius: 6px;
        }

        #debate-modal textarea::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #33aaff, #0066bb);
            border-radius: 6px;
            border: 1px solid #1f2636;
        }

        #debate-modal textarea::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #55bbff, #0077cc);
        }

        #debate-modal .scrollable-models {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 191, 255, 0.8) #1a1f2e;
        }

        #debate-modal .scrollable-models::-webkit-scrollbar-track {
            background: #151a28;
            box-shadow: inset 0 0 6px rgba(0, 153, 255, 0.08);
        }

        #debate-modal .scrollable-models::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00bfff, #0066cc);
            box-shadow: 0 0 8px rgba(0, 191, 255, 0.35), 0 0 14px rgba(0, 119, 204, 0.2);
        }

        #debate-modal .scrollable-models::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #33ccff, #0088ee);
            box-shadow: 0 0 12px rgba(51, 204, 255, 0.45);
        }

        /* ----- Critique modal (#44aa99) ----- */
        #critique-modal.modal {
            scrollbar-width: thin;
            scrollbar-color: rgba(68, 200, 175, 0.88) rgba(15, 22, 24, 0.92);
        }

        #critique-modal.modal::-webkit-scrollbar {
            width: 11px;
            height: 11px;
        }

        #critique-modal.modal::-webkit-scrollbar-track {
            background: rgba(12, 20, 22, 0.92);
            border-radius: 8px;
        }

        #critique-modal.modal::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(95, 212, 190, 0.95), rgba(34, 130, 115, 0.92));
            border-radius: 8px;
            border: 2px solid rgba(12, 20, 22, 0.95);
            box-shadow: 0 0 10px rgba(68, 200, 175, 0.35);
        }

        #critique-modal.modal::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #6ee8d4, #44aa99);
            box-shadow: 0 0 14px rgba(110, 232, 212, 0.45);
        }

        #critique-modal .modal-content {
            scrollbar-width: thin;
            scrollbar-color: rgba(68, 200, 175, 0.88) #1a2426;
        }

        #critique-modal .modal-content::-webkit-scrollbar {
            width: 11px;
        }

        #critique-modal .modal-content::-webkit-scrollbar-track {
            background: linear-gradient(180deg, #141d20 0%, #10181a 100%);
            border-radius: 10px;
            margin: 8px 0;
        }

        #critique-modal .modal-content::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #4dccbb 0%, #2a8878 100%);
            border-radius: 10px;
            border: 2px solid #1a2426;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 12px rgba(68, 200, 175, 0.22);
        }

        #critique-modal .modal-content::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #6ee8d4 0%, #44aa99 100%);
        }

        #critique-modal textarea {
            scrollbar-width: thin;
            scrollbar-color: rgba(68, 200, 175, 0.75) #2c383a;
        }

        #critique-modal textarea::-webkit-scrollbar {
            width: 9px;
        }

        #critique-modal textarea::-webkit-scrollbar-track {
            background: #2a3436;
            border-radius: 6px;
        }

        #critique-modal textarea::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #5fd4be, #338877);
            border-radius: 6px;
            border: 1px solid #243032;
        }

        #critique-modal textarea::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #7ee8d8, #44aa99);
        }

        #critique-modal .scrollable-models {
            scrollbar-width: thin;
            scrollbar-color: rgba(95, 212, 190, 0.82) #151f22;
        }

        #critique-modal .scrollable-models::-webkit-scrollbar-track {
            background: #121c1f;
            box-shadow: inset 0 0 6px rgba(68, 200, 175, 0.08);
        }

        #critique-modal .scrollable-models::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #5fd4be, #2a8878);
            box-shadow: 0 0 8px rgba(95, 212, 190, 0.35), 0 0 14px rgba(68, 170, 153, 0.2);
        }

        #critique-modal .scrollable-models::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #7ee8d8, #44aa99);
            box-shadow: 0 0 12px rgba(126, 232, 216, 0.45);
        }
        
        /* Custom file upload styles for ILMs */
        .custom-file-upload {
            margin-top: 10px;
        }

        .custom-file-upload input[type="file"] {
            display: none;
        }

        .file-upload-label {
            display: inline-block;
            padding: 12px 20px;
            background-color: #3b3b3b;
            color: white;
            border: 2px solid #4db6ac;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-size: 14px;
            min-width: 200px;
        }

        .file-upload-label:hover {
            background-color: #505050;
            border-color: #66d9c4;
        }

        .file-upload-label i {
            margin-right: 8px;
        }

        .image-preview-container {
            margin-top: 15px;
            text-align: center;
            padding: 15px;
            background-color: #2c2c2c;
            border-radius: 8px;
            border: 1px solid #404040;
        }

        /* Vision models specific styles */
        #selected-vision-models-display {
            background-color: #2c2c2c;
            border: 1px solid #404040;
            border-radius: 8px;
            padding: 12px 15px;
            margin: 15px 0;
            min-height: 45px;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }

        .selected-models-placeholder {
            color: #888;
            font-style: italic;
        }

        .selected-model-tag {
            background-color: #4db6ac;
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 13px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin: 2px;
        }

        .selected-model-tag button {
            background: none;
            border: none;
            color: white;
            font-size: 16px;
            cursor: pointer;
            padding: 0;
            margin-left: 4px;
            line-height: 1;
            opacity: 0.8;
            transition: opacity 0.2s;
        }

        .selected-model-tag button:hover {
            opacity: 1;
        }

        .vision-model-tag {
            background-color: #4db6ac;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            display: inline-block;
        }
        
        /* Virtualized content styles */
        .content-chunk {
            position: relative;
            min-height: 20px;
        }
        
        .content-chunk:not(.content-rendered) {
            opacity: 0.7;
        }
        
        .lazy-placeholder {
            padding: 10px;
            background-color: #2a2a2a;
            color: #888;
            font-style: italic;
            text-align: center;
            border-radius: 4px;
        }
        
        .checkbox-label {
            display: flex;
            align-items: center;
            color: white;
            margin-bottom: 8px;
            font-size: 15px;
        }
        
        .form-check-input {
            margin-right: 10px;
        }
        
        /* Improved responsive styles for debate modal */
        .modal-content {
            transition: all 0.3s ease;
        }
        
        #debate-topic {
            box-sizing: border-box;
            min-height: 80px;
        }
        
        /* Responsive adjustments */
        @media (max-width: 768px) {
            .modal-content {
                margin: 2% auto !important;
                width: 98% !important;
                padding: 15px !important;
                max-height: 94vh !important;
            }
            
            .scrollable-models {
                max-height: 45vh;
            }
            
            #start-debate-button {
                width: 100%;
                margin-top: 10px;
            }
            
            ol li {
                margin-bottom: 8px;
            }
            
            .checkbox-label {
                flex-direction: row;
                align-items: center;
            }
        }
        
        @media (max-width: 480px) {
            .scrollable-models {
                max-height: 40vh;
            }
            
            .modal-content {
                margin: 1% auto !important;
                max-height: 96vh !important;
            }
            
            .modal-content h3 {
                font-size: 1.1em;
            }
            
            .modal-content p,
            .modal-content li {
                font-size: 0.85em;
            }
        }

        /* Add the stop button styles */
        .stop-button {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 24px;
            height: 24px;
            background-color: #ff4444;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            opacity: 0.8;
            transition: all 0.2s ease;
            border: none;
            z-index: 10;
        }
        
        .stop-button:hover {
            opacity: 1;
            transform: scale(1.1);
        }
        
        .stop-button::before {
            content: '';
            width: 12px;
            height: 12px;
            background-color: white;
            display: block;
        }
        
        .stop-button.disabled {
            background-color: #666;
            cursor: not-allowed;
            opacity: 0.5;
        }
        
        .stop-button.disabled:hover {
            transform: none;
        }

        /* Modified styles for better header positioning */
        .model-name-container {
            position: sticky;
            top: -15px;  /* Offset for parent padding */
            background: #2c2c2c;
            z-index: 5;
            padding: 15px 0 10px 10px;  /* Extra top padding to cover the gap */
            margin: -15px -15px 15px -15px;  /* Negative margin to extend to edges */
            width: calc(100% + 30px);  /* Extend width to cover negative margins */
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #404040;
        }

        .model-name {
            color: #ffcc00;
            margin: 0;
            font-size: 1.2em;
            flex-grow: 1;
        }

        /* Adjust position of stop button when in the header */
        .model-name-container .stop-button {
            position: relative;
            top: auto;
            right: auto;
            margin-left: 10px;
            /* Add space between name and button */
            margin-right: 5px;
            /* Space before like button */
        }

        /* Style for the new like button */
        .model-name-container .like-button {
            color: #ccc;
            /* Default color */
            cursor: pointer;
            font-size: 20px;
            /* Match size roughly */
            opacity: 0.7;
            transition: all 0.2s ease;
            margin-right: 10px;
            /* Space at the end */
        }
        
        .model-name-container .like-button:hover {
            color: #00ccff;
            /* Highlight color on hover */
            opacity: 1;
            transform: scale(1.1);
        }
        
        /* Style for the like count display */
        .model-name-container .like-count {
            color: #aaa;
            font-size: 14px;
            margin-right: 5px;
            /* Space before like button */
            min-width: 20px;
            /* Ensure space for count */
            text-align: right;
        }
        
        /* Persistent liked state */
        .model-name-container .like-button.liked {
            color: #00aaff;
            /* Brighter blue for liked */
             opacity: 1;
        }
        
        /* Style for the expand button */
        .model-name-container .expand-button {
            color: #4db6ac;
            cursor: pointer;
            font-size: 18px;
            opacity: 0.7;
            transition: all 0.3s ease;
            margin-right: 10px;
        }
        
        .model-name-container .expand-button:hover {
            opacity: 1;
            transform: scale(1.15);
            color: #81c784;
        }

        /* Style for the download button */
        .model-name-container .download-button {
            color: #ffd54f;
            cursor: pointer;
            font-size: 18px;
            opacity: 0.7;
            transition: all 0.3s ease;
            margin-right: 10px;
        }
        
        .model-name-container .download-button:hover {
            opacity: 1;
            transform: scale(1.15);
            color: #ffeb3b;
        }

        /* Style for the copy button */
        .model-name-container .copy-button {
            color: #ccc;
            cursor: pointer;
            font-size: 18px;
            /* Slightly smaller than like */
            opacity: 0.7;
            transition: all 0.2s ease;
            margin-right: 10px;
            /* Space before like count */
        }

        .model-name-container .copy-button:hover {
            color: #00ff99;
            /* Green highlight */
            opacity: 1;
            transform: scale(1.1);
        }
        
        .model-name-container .copy-button.copied {
            color: #00ff99;
            /* Green feedback */
        }

        /* Style for the humanize button - text button style */
        .model-name-container .humanize-button {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            background: transparent;
            border: 1px solid #555;
            border-radius: 6px;
            padding: 4px 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-right: 10px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        
        .model-name-container .humanize-button .humanize-icon {
            font-size: 14px;
            color: #ccc;
            transition: color 0.2s ease;
        }
        
        .model-name-container .humanize-button .humanize-label {
            font-size: 9px;
            font-weight: 600;
            color: #999;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            transition: color 0.2s ease;
        }

        .model-name-container .humanize-button:hover {
            border-color: #ff9f43;
            background: rgba(255, 159, 67, 0.1);
        }
        
        .model-name-container .humanize-button:hover .humanize-icon,
        .model-name-container .humanize-button:hover .humanize-label {
            color: #ff9f43;
        }
        
        /* Processing state - blinking text */
        .model-name-container .humanize-button.processing {
            border-color: #ff9f43;
            background: rgba(255, 159, 67, 0.15);
        }
        
        .model-name-container .humanize-button.processing .humanize-icon {
            color: #ff9f43;
            animation: iconSpin 1s linear infinite;
        }
        
        .model-name-container .humanize-button.processing .humanize-label {
            color: #ff9f43;
            animation: labelBlink 0.6s ease-in-out infinite;
        }
        
        /* Done state */
        .model-name-container .humanize-button.humanized {
            border-color: #00e676;
            background: rgba(0, 230, 118, 0.15);
        }
        
        .model-name-container .humanize-button.humanized .humanize-icon,
        .model-name-container .humanize-button.humanized .humanize-label {
            color: #00e676;
        }
        
        /* Has humanized content state */
        .model-name-container .humanize-button.has-humanized {
            border-color: #ff9f43;
            background: rgba(255, 159, 67, 0.1);
        }
        
        .model-name-container .humanize-button.has-humanized .humanize-icon,
        .model-name-container .humanize-button.has-humanized .humanize-label {
            color: #ff9f43;
        }
        
        /* Disabled state - waiting for streaming to complete */
        .model-name-container .humanize-button:disabled,
        .model-name-container .humanize-button.disabled {
            opacity: 0.4;
            cursor: not-allowed;
            border-color: #444;
            background: transparent;
        }
        
        .model-name-container .humanize-button:disabled .humanize-icon,
        .model-name-container .humanize-button:disabled .humanize-label,
        .model-name-container .humanize-button.disabled .humanize-icon,
        .model-name-container .humanize-button.disabled .humanize-label {
            color: #666;
        }
        
        .model-name-container .humanize-button:disabled:hover,
        .model-name-container .humanize-button.disabled:hover {
            border-color: #444;
            background: transparent;
            transform: none;
        }
        
        @keyframes labelBlink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }
        
        @keyframes iconSpin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Humanized content panel */
        .humanized-panel {
            background: linear-gradient(135deg, #2a2a2a 0%, #1a1a2e 100%);
            border: 1px solid #ff9f43;
            border-radius: 8px;
            margin-top: 15px;
            padding: 15px;
            position: relative;
        }
        
        .humanized-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid #444;
        }
        
        .humanized-panel-title {
            color: #ff9f43;
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .humanized-panel-actions {
            display: flex;
            gap: 10px;
        }
        
        .humanized-panel-actions i {
            color: #888;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .humanized-panel-actions i:hover {
            color: #fff;
        }
        
        .humanized-content {
            color: #e0e0e0;
            line-height: 1.6;
            font-size: 14px;
            white-space: pre-wrap;
        }
        
        .humanized-badge {
            background: #ff9f43;
            color: #1a1a2e;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 3px;
            font-weight: 600;
            text-transform: uppercase;
        }

        /* Responsive adjustments for dropdowns */
        @media (max-width: 991.98px) {

            /* Apply wrapping only below large screen breakpoint (Bootstrap lg) */
            .model-select-container {
                flex-wrap: wrap;
                justify-content: center;
            }
        }

        /* Remove styles for old select, style new checkbox list */
        .model-checkbox-list {
            flex: 1;
            max-height: 150px;
            /* Control height */
            overflow-y: auto;
            /* Add scrollbar */
            background-color: #2c2c2c;
            border: 1px solid #404040;
            /* Subtle border */
            border-radius: 8px;
            /* Rounded corners */
            padding: 10px 15px;
            margin-top: 5px;
            /* Space below label */
            min-width: 280px;
            /* Wider to fit longer model names */
        }

        /* Neon glow scrollbar for model checkbox lists */
        .model-checkbox-list::-webkit-scrollbar {
            width: 10px;
        }

        .model-checkbox-list::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 5px;
            box-shadow: inset 0 0 5px rgba(0, 255, 136, 0.1);
        }

        .model-checkbox-list::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00ff88, #00ccff);
            border-radius: 5px;
            box-shadow: 0 0 10px #00ff88, 0 0 20px #00ccff, 0 0 30px #00ff88;
        }

        .model-checkbox-list::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #00ffaa, #00eeff);
            box-shadow: 0 0 15px #00ffaa, 0 0 30px #00eeff, 0 0 45px #00ffaa;
        }

        /* Firefox scrollbar styling */
        .model-checkbox-list {
            scrollbar-width: thin;
            scrollbar-color: #00ff88 #1a1a2e;
        }

        /* Enhanced disabled button states */
        .btn:disabled, .btn[disabled], button:disabled, button[disabled] {
            opacity: 0.6 !important;
            cursor: not-allowed !important;
            pointer-events: none !important;
            filter: grayscale(50%) !important;
            transition: all 0.2s ease !important;
        }

        /* Loading state styling */
        .btn-loading {
            position: relative;
            color: transparent !important;
        }

        .btn-loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 16px;
            height: 16px;
            margin: -8px 0 0 -8px;
            border: 2px solid #ffffff;
            border-top: 2px solid transparent;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        /* Document reminder animation */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Better focus states for accessibility */
        .btn:focus, button:focus, input:focus, textarea:focus, select:focus {
            outline: 2px solid #4db6ac !important;
            outline-offset: 2px !important;
            box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.3) !important;
        }

        .model-checkbox-list label {
            display: block;
            /* Each checkbox on its own line */
            margin-bottom: 8px;
            color: #eee;
            cursor: pointer;
            font-size: 14px;
            /* Slightly smaller font */
        }

        /* Specialized model styling */
        .model-checkbox-list label:has(input[value="AceMath-Nemotron-7B"]),
        .model-checkbox-list label:has(input[value="BioMistral-7B-Medical"]),
        .model-checkbox-list label:has(input[value="Finance-Chat-7B"]),
        .model-checkbox-list label:has(input[value="Mistral-7B-Instruct"]) {
            background: linear-gradient(90deg, rgba(0,119,204,0.15) 0%, transparent 100%);
            padding: 4px 8px;
            border-radius: 4px;
            border-left: 3px solid;
            margin-left: -8px;
        }
        
        .model-checkbox-list label:has(input[value="AceMath-Nemotron-7B"]) {
            border-left-color: #ff9800; /* Orange for Math */
            background: linear-gradient(90deg, rgba(255,152,0,0.15) 0%, transparent 100%);
        }
        
        .model-checkbox-list label:has(input[value="BioMistral-7B-Medical"]) {
            border-left-color: #4caf50; /* Green for Medical */
            background: linear-gradient(90deg, rgba(76,175,80,0.15) 0%, transparent 100%);
        }
        
        .model-checkbox-list label:has(input[value="Finance-Chat-7B"]) {
            border-left-color: #ffc107; /* Gold for Finance */
            background: linear-gradient(90deg, rgba(255,193,7,0.15) 0%, transparent 100%);
        }
        
        .model-checkbox-list label:has(input[value="Mistral-7B-Instruct"]) {
            border-left-color: #ff6b35; /* Orange-red for Mistral */
            background: linear-gradient(90deg, rgba(255,107,53,0.15) 0%, transparent 100%);
        }
        
        /* Vision Model Styling */
        .model-checkbox-list label:has(input[value="Moondream2"]) {
            border-left-color: #7c4dff; /* Purple for Moondream2 */
            background: linear-gradient(90deg, rgba(124,77,255,0.15) 0%, transparent 100%);
        }
        
        .model-checkbox-list label:has(input[value="InternVL3-1B"]) {
            border-left-color: #9c27b0; /* Purple for InternVL */
            background: linear-gradient(90deg, rgba(156,39,176,0.15) 0%, transparent 100%);
        }
        
        /* Specialty keyword highlighting in model names */
        .specialty-medical {
            color: #00e676;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
        }
        
        .specialty-math {
            color: #00e5ff;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
        }
        
        .specialty-finance {
            color: #ffd740;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(255, 215, 64, 0.4);
        }
        
        .specialty-code {
            color: #ff80ab;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(255, 128, 171, 0.4);
        }
        
        .model-checkbox-list label:has(input[value="Qwen2-VL-2B"]) {
            border-left-color: #2196f3; /* Blue for Qwen2-VL */
            background: linear-gradient(90deg, rgba(33,150,243,0.15) 0%, transparent 100%);
        }

        .model-checkbox-list input[type="checkbox"] {
            margin-right: 8px;
            vertical-align: middle;
        }
        
        /* Style for the search input */
        #model-search {
            width: 100%;
            max-width: 800px;
            padding: 10px 15px 10px 40px;
            /* Increased left padding to make room for the icon */
            margin-bottom: 20px;
            font-size: 16px;
            border: 1px solid #404040;
            border-radius: 25px;
            background-color: #2c2c2c;
            color: white;
            outline: none;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23808080" width="18px" height="18px"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
            background-repeat: no-repeat;
            background-position: 15px center;
            background-size: 18px 18px;
        }
        
        /* Style for selected models display */
        #selected-models-display {
            margin-top: 15px;
            margin-bottom: 15px;
            width: 100%;
            max-width: 100%;
            /* Allow full width */
            padding: 10px 15px;
            background-color: #2c2c2c;
            border: 1px solid #404040;
            border-radius: 8px;
            min-height: 40px;
            /* Ensure it's visible even when empty */
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }
        
        .selected-model-tag {
            background-color: #0077cc;
            color: white;
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 13px;
            display: inline-flex;
            align-items: center;
        }
        
        .selected-model-tag button {
            background: none;
            border: none;
            color: white;
            margin-left: 8px;
            cursor: pointer;
            font-size: 14px;
            padding: 0;
            line-height: 1;
        }
        
        .selected-models-placeholder {
            color: #888;
            font-style: italic;
            font-size: 14px;
        }

        /* Make TLMs response boxes wider */
        #tlms-tab-content.tab-pane,
        #tlm-response-container {
            max-width: 95%;
            /* Make it take more of the screen width */
            width: 100%;
            /* Ensure it tries to use all available space up to max-width */
            margin-left: auto;
            /* Center the container if it's narrower than full screen */
            margin-right: auto;
            /* Center the container */
        }

        /* Ensure the form within TLMs tab also expands */
        #tlms-tab-content #tlmsForm {
            max-width: 100%;
            /* Allow form to use the full width of its parent */
        }

        /* Ensure the response boxes themselves fill the available space */
        #tlm-response-container .response-box {
            width: 100%;
            min-width: 350px;
            /* Set a minimum width to prevent too-narrow boxes */
        }

        /* Gentle horizontal padding for tab content to avoid flush edges */
        .tab-content {
            padding-left: 12px;
            padding-right: 12px;
        }

        @media (min-width: 768px) {
            .tab-content {
                padding-left: 20px;
                padding-right: 20px;
            }
        }

        /* Add slight left padding for debate and section titles within response boxes */
        .response-box h2,
        .response-box h3.model-name {
            padding-left: 10px;
        }

        /* Add the stop button styles */
        .stop-button {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 24px;
            height: 24px;
            background-color: #ff4444;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            opacity: 0.8;
            transition: all 0.2s ease;
            border: none;
            z-index: 10;
        }

        .stop-button:hover {
            opacity: 1;
            transform: scale(1.1);
        }

        .stop-button::before {
            content: '';
            width: 12px;
            height: 12px;
            background-color: white;
            display: block;
        }

        .stop-button.disabled {
            background-color: #666;
            cursor: not-allowed;
            opacity: 0.5;
        }

        .stop-button.disabled:hover {
            transform: none;
        }

        /* === New UX Enhancements === */
        /* Removing flash animations as requested by user */
        /* @keyframes flashNewToken {
            0% {
                background-color: rgba(255, 255, 0, 0.45);
            }

            50% {
                background-color: rgba(255, 255, 0, 0.25);
            }

            100% {
                background-color: transparent;
            }
        } */

        /* .flash-update {
            animation: flashNewToken 2s ease-out;
        } */

        /* Icon-only Continue button that is always rendered but disabled while streaming */
        .continue-button {
            color: #00bb00;
            cursor: pointer;
            font-size: 18px;
            opacity: 0.6;
            transition: opacity 0.2s ease;
            margin-right: 10px;
        }

        .continue-button:hover {
            opacity: 1;
        }

        .continue-button.disabled {
            color: #555;
            cursor: not-allowed;
            opacity: 0.3;
        }

        /* Styles for debate output sections */
        .debate-section-content {
            height: 350px;
            /* Base height for larger screens */
            overflow-y: auto;
            /* Add vertical scrollbar when content exceeds height */
            border: 1px solid #404040;
            /* Subtle border */
            padding: 15px;
            margin-bottom: 20px;
            /* Space between sections */
            background-color: #2a2a2a;
            /* Slightly different background to distinguish */
            border-radius: 6px;
            color: #f0f0f0;
            /* Ensure text inside is light */
        }

        /* Debate text: block-justified paragraphs (matches critique) */
        .debate-section-content,
        .debate-section-content p,
        .debate-section-content li,
        .debate-model-content,
        .debate-model-content p,
        .debate-model-content .response-content {
            text-align: justify;
        }

        /* OPTIMIZED: Styles for parallel streaming debate containers */
        .active-update {
            border-color: #00bb00 !important;
            box-shadow: 0 0 10px rgba(0, 187, 0, 0.3);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .active-update .content {
            position: relative;
        }

        .active-update .content::after {
            content: '⚡ Streaming...';
            position: absolute;
            top: 5px;
            right: 10px;
            background: rgba(0, 187, 0, 0.8);
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 10px;
            font-weight: bold;
            z-index: 10;
        }

        /* Smooth transitions for debate containers */
        .response-box {
            transition: all 0.3s ease;
        }

        .response-box[data-complete="true"] {
            border-color: #666;
            opacity: 0.95;
        }

        /* Fullscreen mode for audio analysis reports */
        .response-box.fullscreen-mode {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw !important;
            height: 100vh !important;
            max-width: 100vw !important;
            max-height: 100vh !important;
            z-index: 10000;
            margin: 0;
            border-radius: 0;
            background-color: #1e1e1e;
            overflow-y: auto;
            animation: expandToFullscreen 0.3s ease-out;
            display: flex;
            flex-direction: column;
        }

        @keyframes expandToFullscreen {
            from {
                transform: scale(0.95);
                opacity: 0.9;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* Ensure content fills full height in fullscreen */
        .response-box.fullscreen-mode .response-content {
            flex: 1;
            max-width: 1400px;
            width: 100%;
            margin: 0 auto;
            padding: 20px;
            min-height: 100%;
            box-sizing: border-box;
        }
        
        /* Generic fullscreen mode for summary/judgement panels */
        .panel-fullscreen {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            max-width: 100vw !important;
            max-height: 100vh !important;
            z-index: 10000 !important;
            margin: 0 !important;
            border-radius: 0 !important;
            background-color: #1a1a1a !important;
            overflow-y: auto !important;
            animation: expandToFullscreen 0.3s ease-out;
            padding: 30px !important;
            box-sizing: border-box !important;
        }
        
        .panel-fullscreen .panel-content,
        .panel-fullscreen .content,
        .panel-fullscreen .card-body,
        .panel-fullscreen .phase-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            font-size: 16px;
            line-height: 1.8;
        }
        
        /* Panel expand button style */
        .panel-expand-btn {
            background: transparent;
            border: none;
            color: #4db6ac;
            cursor: pointer;
            font-size: 18px;
            padding: 5px 10px;
            transition: all 0.2s ease;
            opacity: 0.7;
        }
        
        .panel-expand-btn:hover {
            opacity: 1;
            transform: scale(1.15);
            color: #81c784;
        }
        
        .panel-expand-btn:focus {
            outline: none;
        }

        /* Make model header sticky in fullscreen */
        .response-box.fullscreen-mode .model-name-container {
            position: sticky;
            top: 0;
            z-index: 100;
            background: linear-gradient(to bottom, #2a2a2a 0%, #2a2a2a 90%, rgba(42, 42, 42, 0) 100%);
            padding: 15px 20px;
            margin: 0 0 10px 0;
            flex-shrink: 0;
        }

        /* Responsive fullscreen adjustments */
        @media (max-width: 768px) {
            .response-box.fullscreen-mode .response-content {
                max-width: 100%;
                padding: 15px;
            }
        }

        .debate-section-content h4.model-debate-heading {
            margin-top: 0;
            /* Adjust heading margin within the box */
            padding-top: 0;
        }

        /* Responsive adjustments for debate section heights */
        @media (max-width: 992px) {

            /* Medium devices (tablets, less than 992px) */
            .debate-section-content {
                height: 300px;
            }
        }

        @media (max-width: 768px) {

            /* Small devices (landscape phones, less than 768px) */
            .debate-section-content {
                height: 280px;
            }
        }

        @media (max-width: 576px) {

            /* Extra small devices (portrait phones, less than 576px) */
            .debate-section-content {
                height: 250px;
                padding: 10px;
            }
        }

        /* Style for debate stage titles */
        .debate-section h3 {
            color: #00ffcc;
            /* Vibrant cyan/turquoise */
            text-align: center;
            /* Center the titles */
            margin-bottom: 15px;
            /* Add some space below the title */
            font-size: 1.5em;
            /* Slightly larger font size */
            text-shadow: 0 0 4px rgba(0, 255, 204, 0.5);
            /* Subtle text shadow */
        }

        /* Vision Debate Container Styles - matches LLM debate styling */
        .vision-debate-container {
            background-color: #2a2a2a;
            border: 1px solid #404040;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .vision-debate-container > h4 {
            color: #dc3545;
            font-size: 1.4em;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #dc3545;
            text-shadow: 0 0 4px rgba(220, 53, 69, 0.4);
        }

        .vision-debate-container .debate-phase {
            margin-bottom: 20px;
            padding: 15px;
            background-color: #1e1e1e;
            border-radius: 6px;
            border-left: 3px solid #dc3545;
        }

        .vision-debate-container .debate-phase h5 {
            color: #dc3545 !important;
            font-size: 1.15em;
            margin: 0 0 15px 0 !important;
            padding-bottom: 8px !important;
            border-bottom: 1px solid #444 !important;
        }

        .vision-debate-container .response-box {
            background-color: #2c2c2c;
            border: 1px solid #444;
            border-radius: 6px;
            margin-bottom: 12px;
            padding: 12px;
        }

        .vision-debate-container .response-box .model-name-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid #3a3a3a;
        }

        .vision-debate-container .response-box .model-name {
            color: #00ccff;
            font-weight: bold;
            font-size: 1.05em;
        }

        .vision-debate-container .response-box .response-status {
            color: #888;
            font-size: 0.9em;
        }

        .vision-debate-container .response-box .response-content {
            color: #e0e0e0;
            line-height: 1.6;
            font-size: 0.95em;
        }

        /* Neon scrollbars for vision debate container */
        .vision-debate-container::-webkit-scrollbar,
        .vision-debate-container .response-box::-webkit-scrollbar {
            width: 10px;
        }

        .vision-debate-container::-webkit-scrollbar-track,
        .vision-debate-container .response-box::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 5px;
            box-shadow: inset 0 0 5px rgba(0, 255, 136, 0.1);
        }

        .vision-debate-container::-webkit-scrollbar-thumb,
        .vision-debate-container .response-box::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00ff88, #00ccff);
            border-radius: 5px;
            box-shadow: 0 0 8px #00ff88, 0 0 16px #00ccff, 0 0 24px #00ff88;
        }

        .vision-debate-container::-webkit-scrollbar-thumb:hover,
        .vision-debate-container .response-box::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #00ffaa, #00eeff);
            box-shadow: 0 0 12px #00ffaa, 0 0 24px #00eeff, 0 0 36px #00ffaa;
        }

        /* Debate Summary specific scrollbar (neon glow for consensus) */
        .debate-summary::-webkit-scrollbar,
        #summary_container::-webkit-scrollbar {
            width: 10px;
        }

        .debate-summary::-webkit-scrollbar-track,
        #summary_container::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 5px;
            box-shadow: inset 0 0 5px rgba(0, 255, 136, 0.1);
        }

        .debate-summary::-webkit-scrollbar-thumb,
        #summary_container::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00ff88, #00ccff);
            border-radius: 5px;
            box-shadow: 0 0 8px #00ff88, 0 0 16px #00ccff, 0 0 24px #00ff88;
        }

        .debate-summary::-webkit-scrollbar-thumb:hover,
        #summary_container::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #00ffaa, #00eeff);
            box-shadow: 0 0 12px #00ffaa, 0 0 24px #00eeff, 0 0 36px #00ffaa;
        }

        /* Critique-specific scrollbar (teal/cyan for analysis) */
        .critique-response::-webkit-scrollbar,
        .vision-critique-container::-webkit-scrollbar {
            width: 10px;
        }

        .critique-response::-webkit-scrollbar-track,
        .vision-critique-container::-webkit-scrollbar-track {
            background: #1a1a2e;
            border-radius: 5px;
            box-shadow: inset 0 0 5px rgba(0, 255, 136, 0.1);
        }

        .critique-response::-webkit-scrollbar-thumb,
        .vision-critique-container::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #00ff88, #00ccff);
            border-radius: 5px;
            box-shadow: 0 0 8px #00ff88, 0 0 16px #00ccff, 0 0 24px #00ff88;
        }

        .critique-response::-webkit-scrollbar-thumb:hover,
        .vision-critique-container::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #00ffaa, #00eeff);
            box-shadow: 0 0 12px #00ffaa, 0 0 24px #00eeff, 0 0 36px #00ffaa;
        }

        /* Critique text: block-justified paragraphs, normalized spacing */
        .critique-text,
        .critique-text p,
        .critique-text li,
        .critique-text div,
        .critique-model-content .critique-text {
            text-align: justify;
        }
        .critique-text p {
            margin: 0 0 0.75em 0;
        }
        .critique-text p:last-child {
            margin-bottom: 0;
        }

        @keyframes highlight-update {
            0% {
                background-color: rgba(255, 255, 0, 0.2);
            }

            100% {
                background-color: transparent;
            }
        }

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
            }
            50% {
                transform: scale(1.02);
                box-shadow: 0 0 20px 5px rgba(255, 68, 68, 0.3);
            }
        }

        @keyframes progress-pulse {
            0% {
                opacity: 1;
            }

            50% {
                opacity: 0.9;
            }

            /* Reduced intensity */
            100% {
                opacity: 1;
            }
        }

        /* Soft pulse animation for document-attached attach buttons */
        @keyframes soft-pulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
            }
            50% {
                transform: scale(1.02);
                box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.2);
            }
        }

        .document-attached-pulse {
            animation: soft-pulse 2s ease-in-out infinite;
            animation-delay: 1s; /* Start pulsing after a brief delay */
        }

        /* Continuous highlight effect for active updates */
        @keyframes continuous-highlight {
            0% {
                background-color: rgba(255, 255, 100, 0.15);
            }

            50% {
                background-color: rgba(255, 255, 100, 0.25);
            }

            100% {
                background-color: rgba(255, 255, 100, 0.15);
            }
        }

        /* Flash update animation (quick flash) */
        /* .flash-update {
            animation: highlight-update 2s ease-out;
        } */

        /* Continuous highlighting for active updates */
        .active-update {
            border-left: 4px solid #ffcc00 !important;
            /* Remove any animation or box-shadow that might cause UI lag */
            box-shadow: none !important;
            /* No animation for cleaner look */
        }

        .debate-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 100%;
        }

        .model-argument,
        .model-rebuttal,
        .debate-summary {
            padding: 10px;
            border-radius: 5px;
            border: 1px solid #444;
            /* Remove transition that might cause delay */
            transition: none;
            margin-bottom: 15px;
        }
        
        /* ============================================================
           Themed scrollbars for Debate & Critique sections
        ============================================================ */
        .debate-container,
        .critique-container,
        .debate-frame,
        .debate-box,
        .model-argument,
        .model-rebuttal,
        .debate-summary,
        .debate-summary-content,
        .debate-summary-readable,
        .brief-judge-matrix-scroll,
        .debate-artifact-panel,
        .debate-artifact-panel .content,
        .claim-tracker-card-wrapper,
        .claim-tracker-list,
        .claim-tracker-grid,
        .critique-results,
        .critique-model-container,
        .model-critique,
        .model-peer-review,
        .critique-summary,
        .critique-text,
        #critique-response-container,
        #critique-container,
        #debate-container,
        .summary-section {
            scrollbar-width: thin;
            scrollbar-color: rgba(77, 182, 172, 0.55) rgba(255, 255, 255, 0.04);
        }

        .debate-container *::-webkit-scrollbar,
        .critique-container *::-webkit-scrollbar,
        #debate-container *::-webkit-scrollbar,
        #critique-container *::-webkit-scrollbar,
        .debate-summary::-webkit-scrollbar,
        .debate-artifact-panel ::-webkit-scrollbar,
        .brief-judge-matrix-scroll::-webkit-scrollbar,
        .claim-tracker-card-wrapper ::-webkit-scrollbar,
        .critique-results ::-webkit-scrollbar,
        .critique-model-container ::-webkit-scrollbar,
        .model-argument::-webkit-scrollbar,
        .model-rebuttal::-webkit-scrollbar,
        .model-critique::-webkit-scrollbar,
        .model-peer-review::-webkit-scrollbar,
        .critique-summary::-webkit-scrollbar,
        .critique-text::-webkit-scrollbar {
            width: 10px;
            height: 10px;
            background: transparent;
        }

        .debate-container *::-webkit-scrollbar-track,
        .critique-container *::-webkit-scrollbar-track,
        #debate-container *::-webkit-scrollbar-track,
        #critique-container *::-webkit-scrollbar-track,
        .debate-summary::-webkit-scrollbar-track,
        .debate-artifact-panel ::-webkit-scrollbar-track,
        .brief-judge-matrix-scroll::-webkit-scrollbar-track,
        .claim-tracker-card-wrapper ::-webkit-scrollbar-track,
        .critique-results ::-webkit-scrollbar-track,
        .critique-model-container ::-webkit-scrollbar-track,
        .model-argument::-webkit-scrollbar-track,
        .model-rebuttal::-webkit-scrollbar-track,
        .model-critique::-webkit-scrollbar-track,
        .model-peer-review::-webkit-scrollbar-track,
        .critique-summary::-webkit-scrollbar-track,
        .critique-text::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.04);
            border-radius: 999px;
            margin: 4px;
        }

        .debate-container *::-webkit-scrollbar-thumb,
        .critique-container *::-webkit-scrollbar-thumb,
        #debate-container *::-webkit-scrollbar-thumb,
        #critique-container *::-webkit-scrollbar-thumb,
        .debate-summary::-webkit-scrollbar-thumb,
        .debate-artifact-panel ::-webkit-scrollbar-thumb,
        .brief-judge-matrix-scroll::-webkit-scrollbar-thumb,
        .claim-tracker-card-wrapper ::-webkit-scrollbar-thumb,
        .critique-results ::-webkit-scrollbar-thumb,
        .critique-model-container ::-webkit-scrollbar-thumb,
        .model-argument::-webkit-scrollbar-thumb,
        .model-rebuttal::-webkit-scrollbar-thumb,
        .model-critique::-webkit-scrollbar-thumb,
        .model-peer-review::-webkit-scrollbar-thumb,
        .critique-summary::-webkit-scrollbar-thumb,
        .critique-text::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(77, 182, 172, 0.85), rgba(77, 182, 172, 0.55));
            border-radius: 999px;
            border: 2px solid rgba(0, 0, 0, 0.18);
            box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1);
        }

        .debate-container *::-webkit-scrollbar-thumb:hover,
        .critique-container *::-webkit-scrollbar-thumb:hover,
        #debate-container *::-webkit-scrollbar-thumb:hover,
        #critique-container *::-webkit-scrollbar-thumb:hover,
        .debate-summary::-webkit-scrollbar-thumb:hover,
        .debate-artifact-panel ::-webkit-scrollbar-thumb:hover,
        .brief-judge-matrix-scroll::-webkit-scrollbar-thumb:hover,
        .claim-tracker-card-wrapper ::-webkit-scrollbar-thumb:hover,
        .critique-results ::-webkit-scrollbar-thumb:hover,
        .critique-model-container ::-webkit-scrollbar-thumb:hover,
        .model-argument::-webkit-scrollbar-thumb:hover,
        .model-rebuttal::-webkit-scrollbar-thumb:hover,
        .model-critique::-webkit-scrollbar-thumb:hover,
        .model-peer-review::-webkit-scrollbar-thumb:hover,
        .critique-summary::-webkit-scrollbar-thumb:hover,
        .critique-text::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #66e6d3, #4db6ac);
        }

        .debate-container *::-webkit-scrollbar-corner,
        .critique-container *::-webkit-scrollbar-corner,
        #debate-container *::-webkit-scrollbar-corner,
        #critique-container *::-webkit-scrollbar-corner {
            background: transparent;
        }

        /* Critique-specific accent (warmer green) for primary critique surfaces */
        .critique-container,
        .critique-results,
        .model-critique,
        .model-peer-review,
        .critique-summary,
        .critique-text,
        #critique-response-container,
        #critique-container {
            scrollbar-color: rgba(68, 170, 153, 0.7) rgba(255, 255, 255, 0.05);
        }

        .critique-container *::-webkit-scrollbar-thumb,
        #critique-container *::-webkit-scrollbar-thumb,
        .critique-results ::-webkit-scrollbar-thumb,
        .critique-model-container ::-webkit-scrollbar-thumb,
        .model-critique::-webkit-scrollbar-thumb,
        .model-peer-review::-webkit-scrollbar-thumb,
        .critique-summary::-webkit-scrollbar-thumb,
        .critique-text::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(68, 170, 153, 0.95), rgba(34, 110, 99, 0.7));
        }

        .critique-container *::-webkit-scrollbar-thumb:hover,
        #critique-container *::-webkit-scrollbar-thumb:hover,
        .critique-results ::-webkit-scrollbar-thumb:hover,
        .critique-model-container ::-webkit-scrollbar-thumb:hover,
        .model-critique::-webkit-scrollbar-thumb:hover,
        .model-peer-review::-webkit-scrollbar-thumb:hover,
        .critique-summary::-webkit-scrollbar-thumb:hover,
        .critique-text::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #6cd2c1, #38a092);
        }

        /* Enhanced Debate Summary Styling */
        .debate-summary {
            background: radial-gradient(circle at top left, rgba(68, 204, 119, 0.16), transparent 34%),
                linear-gradient(135deg, #142218 0%, #202429 100%) !important;
            border: 1px solid rgba(98, 190, 128, 0.45) !important;
            border-left: 6px solid #44cc77 !important;
            margin-top: 25px;
            padding: 22px;
            border-radius: 12px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
        }

        .debate-summary-content,
        .debate-summary-readable {
            color: #edf7ef;
            font-size: 1rem;
            line-height: 1.8;
            letter-spacing: 0.01em;
        }

        .debate-summary-readable p,
        .debate-summary-readable div {
            margin-bottom: 0.65rem;
        }

        .debate-summary-section-title,
        .debate-summary-section-banner {
            margin: 18px 0 10px 0;
            padding: 10px 14px;
            color: #b8ffcb;
            font-weight: 750;
            letter-spacing: 0.02em;
            background: linear-gradient(90deg, rgba(68,204,119,0.18), rgba(68,204,119,0.04));
            border-left: 4px solid #44cc77;
            border-radius: 6px 8px 8px 6px;
            display: flex;
            align-items: center;
            gap: 10px;
            text-transform: uppercase;
            font-size: 0.92rem;
        }

        .debate-summary-section-num {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 26px;
            height: 26px;
            padding: 0 8px;
            border-radius: 999px;
            background: rgba(68,204,119,0.32);
            color: #04230f;
            font-weight: 800;
            font-size: 0.85rem;
        }

        .debate-summary-gap {
            height: 10px;
        }

        .debate-summary-bullet {
            color: #8dffb2;
            font-weight: 800;
            margin-right: 5px;
        }

        .debate-summary-side {
            margin: 14px 0 4px 0;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #d8f5e2;
            font-weight: 700;
            letter-spacing: 0.02em;
        }

        .debate-summary-role {
            display: inline-block;
            padding: 4px 10px;
            background: rgba(120, 220, 150, 0.16);
            color: #a8f5c2;
            border: 1px solid rgba(120, 220, 150, 0.32);
            border-radius: 999px;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .debate-summary-model {
            font-weight: 600;
            color: #f2fff5;
            font-size: 0.92rem;
        }

        .debate-summary-label {
            display: inline-block;
            margin-top: 6px;
            color: #ffe7b3;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            font-size: 0.78rem;
            padding: 1px 6px;
            background: rgba(255, 213, 95, 0.12);
            border-radius: 4px;
        }

        /* ============================================================
           Debate Brief panel structured rendering
        ============================================================ */
        .debate-brief-card {
            display: flex;
            flex-direction: column;
            gap: 22px;
            color: #eaf2f6;
            position: relative;
        }

        .debate-brief-card::before {
            content: '';
            position: absolute;
            inset: -4px;
            border-radius: 16px;
            background: radial-gradient(circle at top right, rgba(100,181,246,0.10), transparent 55%),
                        radial-gradient(circle at bottom left, rgba(77,182,172,0.10), transparent 55%);
            pointer-events: none;
            z-index: -1;
        }

        .brief-section {
            background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            padding: 18px 20px 16px 20px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.18);
            position: relative;
            overflow: hidden;
        }

        .brief-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, currentColor, transparent);
            opacity: 0.35;
        }

        .brief-section-banner {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: -18px -20px 16px -20px;
            padding: 12px 18px;
            border-radius: 12px 12px 0 0;
            text-transform: uppercase;
            letter-spacing: 0.07em;
            font-size: 0.78rem;
            font-weight: 800;
            color: #f1f7ff;
            backdrop-filter: blur(6px);
        }

        .brief-section-banner-roles {
            background: linear-gradient(90deg, rgba(100,181,246,0.32), rgba(100,181,246,0.04));
            border-bottom: 2px solid #64b5f6;
        }

        .brief-section-banner-quotes {
            background: linear-gradient(90deg, rgba(255,209,102,0.30), rgba(255,209,102,0.04));
            border-bottom: 2px solid #ffd166;
            color: #fff7e0;
        }

        .brief-section-banner-moderator {
            background: linear-gradient(90deg, rgba(77,182,172,0.32), rgba(77,182,172,0.04));
            border-bottom: 2px solid #4db6ac;
        }

        .brief-section-icon {
            font-size: 1.18rem;
            filter: drop-shadow(0 0 6px rgba(255,255,255,0.18));
        }

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

        .brief-role-card {
            position: relative;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            padding: 14px 16px;
            background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02) 70%);
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
            box-shadow: 0 4px 14px rgba(0,0,0,0.22);
            overflow: hidden;
        }

        .brief-role-card::before {
            content: '';
            position: absolute;
            top: -1px;
            left: -1px;
            right: -1px;
            height: 4px;
            background: currentColor;
            opacity: 0.7;
            border-radius: 12px 12px 0 0;
        }

        .brief-role-card:hover {
            transform: translateY(-2px);
            border-color: rgba(255,255,255,0.18);
            box-shadow: 0 10px 24px rgba(0,0,0,0.32);
        }

        .brief-role-card-head {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .brief-role-tag {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid;
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.07em;
            font-weight: 800;
            text-shadow: 0 1px 1px rgba(0,0,0,0.25);
        }

        .brief-role-model {
            font-weight: 800;
            color: #ffffff;
            font-size: 0.96rem;
            letter-spacing: 0.01em;
        }

        .brief-role-stance {
            color: #cdd6dc;
            margin: 8px 0 12px 0;
            font-size: 0.9rem;
            line-height: 1.5;
            font-style: italic;
            border-left: 2px solid rgba(255,255,255,0.12);
            padding-left: 10px;
        }

        .brief-score-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 6px;
        }

        .brief-score-label {
            font-size: 0.74rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #b8c7cf;
            min-width: 64px;
            font-weight: 700;
        }

        .brief-score-track {
            flex: 1;
            height: 8px;
            background: rgba(255,255,255,0.08);
            border-radius: 999px;
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
        }

        .brief-score-fill {
            height: 100%;
            border-radius: 999px;
            position: relative;
            box-shadow: 0 0 12px currentColor;
            background-image: linear-gradient(90deg, currentColor, color-mix(in srgb, currentColor 70%, white));
        }

        .brief-score-value {
            font-weight: 800;
            min-width: 60px;
            text-align: right;
            font-size: 1.05rem;
            text-shadow: 0 1px 1px rgba(0,0,0,0.3);
        }

        .brief-score-max {
            color: rgba(255,255,255,0.38);
            font-weight: 600;
            margin-left: 2px;
            font-size: 0.78rem;
        }

        .brief-score-meta {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px dashed rgba(255,255,255,0.10);
            color: #b8c7cf;
            font-size: 0.84rem;
        }

        .brief-score-meta span {
            display: inline-flex;
            align-items: baseline;
            gap: 4px;
        }

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

        .brief-quote-card {
            border-left: 4px solid;
            border-radius: 0 10px 10px 0;
            padding: 14px 16px;
            background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
            box-shadow: 0 3px 10px rgba(0,0,0,0.18);
            position: relative;
            transition: transform 0.18s ease, box-shadow 0.18s ease;
        }

        .brief-quote-card::before {
            content: '\201C';
            position: absolute;
            top: 6px;
            right: 14px;
            font-size: 2.6rem;
            line-height: 1;
            color: rgba(255,255,255,0.08);
            font-family: Georgia, serif;
        }

        .brief-quote-card:hover {
            transform: translateX(2px);
            box-shadow: 0 6px 18px rgba(0,0,0,0.28);
        }

        .brief-quote-source {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }

        .brief-quote-model {
            font-weight: 800;
            color: #ffffff;
            font-size: 0.96rem;
        }

        .brief-quote-text {
            color: #f4faff;
            line-height: 1.6;
            font-size: 0.97rem;
        }

        .brief-best-card {
            border: 1px solid;
            border-radius: 14px;
            padding: 18px 20px;
            box-shadow: 0 12px 30px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
            position: relative;
            overflow: hidden;
        }

        .brief-best-card::before {
            content: '';
            position: absolute;
            top: -40px;
            right: -40px;
            width: 140px;
            height: 140px;
            background: radial-gradient(circle, currentColor 0%, transparent 60%);
            opacity: 0.12;
            pointer-events: none;
        }

        .brief-best-head {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }

        .brief-best-trophy {
            font-size: 1.6rem;
            filter: drop-shadow(0 0 10px rgba(255,215,0,0.45));
        }

        .brief-best-title {
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-size: 0.85rem;
            color: #fff;
        }

        .brief-best-model {
            margin-left: auto;
            padding: 5px 12px;
            border-radius: 999px;
            border: 1px solid;
            font-weight: 800;
            font-size: 0.82rem;
            text-shadow: 0 1px 1px rgba(0,0,0,0.3);
        }

        .brief-best-text {
            color: #ffffff;
            font-size: 1.02rem;
            line-height: 1.65;
            position: relative;
        }

        .brief-moderator-card {
            background: rgba(77,182,172,0.06);
            border: 1px solid rgba(77,182,172,0.25);
            border-radius: 8px;
            padding: 12px 14px;
        }

        .brief-moderator-text {
            color: #e6f7f4;
            line-height: 1.7;
            font-size: 0.97rem;
        }

        .brief-moderator-banner {
            margin: 28px 0 14px 0;
            padding: 10px 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(77,182,172,0.16);
            border-left: 3px solid #4db6ac;
            border-radius: 6px;
            color: #d6fff7;
            font-weight: 700;
            text-transform: uppercase;
            font-size: 0.82rem;
            letter-spacing: 0.05em;
            white-space: normal;
            word-break: keep-all;
            overflow-wrap: anywhere;
            line-height: 1.35;
        }

        .brief-moderator-banner:first-child {
            margin-top: 4px;
        }

        .brief-moderator-banner-num {
            background: rgba(77,182,172,0.32);
            color: #06241f;
            border-radius: 999px;
            min-width: 24px;
            padding: 0 8px;
            text-align: center;
            font-weight: 800;
            flex: 0 0 auto;
        }

        .brief-moderator-side {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 26px 0 10px 0;
            padding: 16px 12px 6px 12px;
            border-top: 1px dashed rgba(77,182,172,0.32);
            background: linear-gradient(180deg, rgba(77,182,172,0.10), transparent 70%);
            border-radius: 8px 8px 0 0;
            color: #d6e9e4;
            font-weight: 700;
        }

        .brief-moderator-side:first-child {
            margin-top: 6px;
            padding-top: 0;
            border-top: none;
            background: none;
        }

        .brief-moderator-text > *:not(.brief-moderator-banner):not(.brief-moderator-side) {
            margin-bottom: 14px;
        }

        .brief-moderator-text ul,
        .brief-moderator-text ol {
            margin: 0 0 18px 0;
            padding-left: 24px;
        }

        .brief-moderator-text li {
            margin-bottom: 6px;
            line-height: 1.6;
        }

        .brief-moderator-role {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(77,182,172,0.18);
            color: #a4f7e8;
            font-size: 0.74rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .brief-moderator-model {
            color: #f4faff;
            font-size: 0.92rem;
        }

        .brief-moderator-label {
            display: inline-block;
            margin-top: 4px;
            margin-right: 6px;
            color: #ffe082;
            font-weight: 700;
            text-transform: uppercase;
            font-size: 0.72rem;
            letter-spacing: 0.05em;
            padding: 1px 6px;
            background: rgba(255,209,102,0.12);
            border-radius: 4px;
        }

        .brief-moderator-gap {
            height: 8px;
        }

        .brief-action-card {
            display: flex;
            gap: 16px;
            align-items: center;
            padding: 16px 20px;
            background: linear-gradient(135deg, rgba(76,175,80,0.20), rgba(46,125,50,0.06));
            border: 1px solid rgba(76,175,80,0.35);
            border-left: 5px solid #66bb6a;
            border-radius: 12px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.22);
            position: relative;
            overflow: hidden;
        }

        .brief-action-card::before {
            content: '';
            position: absolute;
            top: -30px;
            right: -30px;
            width: 110px;
            height: 110px;
            background: radial-gradient(circle, rgba(102,187,106,0.32), transparent 65%);
            pointer-events: none;
        }

        .brief-action-icon {
            font-size: 1.8rem;
            line-height: 1;
            filter: drop-shadow(0 0 10px rgba(102,187,106,0.6));
        }

        .brief-action-body {
            flex: 1;
        }

        .brief-action-title {
            font-weight: 800;
            text-transform: uppercase;
            color: #c4f5cb;
            font-size: 0.78rem;
            letter-spacing: 0.08em;
            margin-bottom: 5px;
        }

        .brief-action-text {
            color: #f4faff;
            line-height: 1.6;
            font-size: 0.97rem;
        }

        /* ============================================================
           Debate Brief judge-assessment responsive matrix
        ============================================================ */
        .brief-judge-matrix-wrapper {
            margin: 18px 0 4px 0;
        }

        .brief-judge-matrix-scroll {
            overflow-x: auto;
            border-radius: 10px;
            border: 1px solid rgba(77,182,172,0.32);
            background: rgba(77,182,172,0.04);
        }

        .brief-judge-matrix {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            color: #f4faff;
            font-size: 0.92rem;
            min-width: 520px;
        }

        .brief-judge-matrix thead th {
            background: rgba(77,182,172,0.20);
            color: #c4f7ec;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-size: 0.74rem;
            padding: 10px 14px;
            text-align: left;
            border-bottom: 1px solid rgba(77,182,172,0.4);
            vertical-align: top;
        }

        .brief-judge-col-name {
            display: block;
            color: #f5fffa;
            font-size: 0.78rem;
        }

        .brief-judge-col-model {
            display: block;
            margin-top: 4px;
            font-size: 0.7rem;
            font-weight: 600;
            color: #a4f7e8;
            text-transform: none;
            letter-spacing: 0.02em;
        }

        .brief-judge-matrix tbody td,
        .brief-judge-matrix tbody th {
            padding: 11px 14px;
            line-height: 1.55;
            vertical-align: top;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }

        .brief-judge-matrix tbody tr:last-child td,
        .brief-judge-matrix tbody tr:last-child th {
            border-bottom: none;
        }

        .brief-judge-row {
            background: rgba(77,182,172,0.10);
            color: #d6fff7;
            text-align: left;
            min-width: 160px;
        }

        .brief-judge-empty {
            color: rgba(255,255,255,0.3);
        }

        .brief-judge-cards {
            display: none;
            flex-direction: column;
            gap: 12px;
        }

        .brief-judge-card {
            background: rgba(77,182,172,0.08);
            border-left: 3px solid #4db6ac;
            border-radius: 8px;
            padding: 12px 14px;
        }

        .brief-judge-card-title {
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-size: 0.82rem;
            color: #d6fff7;
            margin-bottom: 8px;
        }

        .brief-judge-card-row {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 8px 10px;
            margin-bottom: 6px;
            background: rgba(255,255,255,0.04);
            border-radius: 6px;
        }

        .brief-judge-card-row:last-child {
            margin-bottom: 0;
        }

        .brief-judge-card-side {
            font-weight: 700;
            color: #a4f7e8;
            font-size: 0.82rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .brief-judge-card-model {
            color: #cfd8dc;
            text-transform: none;
            letter-spacing: 0.02em;
            font-weight: 500;
            font-size: 0.78rem;
        }

        .brief-judge-card-text {
            color: #f4faff;
            line-height: 1.55;
        }

        @media (max-width: 760px) {
            .brief-judge-matrix-scroll {
                display: none;
            }
            .brief-judge-cards {
                display: flex;
            }
        }

        /* ============================================================
           Debate Claim Tracker structured rendering
        ============================================================ */
        .claim-tracker-card-wrapper {
            display: flex;
            flex-direction: column;
            gap: 18px;
            color: #eaf2f6;
        }

        .claim-tracker-section {
            background: rgba(255,255,255,0.025);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            overflow: hidden;
        }

        .claim-tracker-banner {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            border-bottom: 2px solid;
            font-size: 0.82rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-weight: 800;
            color: #f5fbff;
        }

        .claim-tracker-banner-icon {
            font-size: 1.1rem;
        }

        .claim-tracker-banner-title {
            flex: 1;
        }

        .claim-tracker-banner-meta {
            font-size: 0.72rem;
            font-weight: 700;
            color: rgba(255,255,255,0.7);
            background: rgba(255,255,255,0.08);
            padding: 3px 8px;
            border-radius: 999px;
        }

        .claim-tracker-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 12px;
            padding: 14px 16px;
        }

        .claim-tracker-card {
            border: 1px solid;
            border-radius: 10px;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.18);
        }

        .claim-tracker-card-head {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .claim-tracker-model {
            font-weight: 800;
            font-size: 0.92rem;
        }

        .claim-tracker-role {
            display: inline-block;
            border: 1px solid;
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 700;
        }

        .claim-tracker-count {
            margin-left: auto;
            background: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.68);
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            font-weight: 700;
        }

        .claim-tracker-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .claim-tracker-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            background: rgba(255,255,255,0.04);
            border-radius: 6px;
            padding: 8px 10px;
            line-height: 1.55;
            color: #f5faff;
        }

        .claim-tracker-bullet {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 999px;
            margin-top: 7px;
            flex-shrink: 0;
            box-shadow: 0 0 0 2px rgba(0,0,0,0.18);
        }

        .claim-tracker-text {
            color: #f5faff;
        }
        
        /* Highlighted terms in summary */
        .summary-agreement {
            color: #44ff77;
            font-weight: 600;
            background: rgba(68, 255, 119, 0.15);
            padding: 2px 6px;
            border-radius: 3px;
        }
        
        .summary-disagreement {
            color: #ff6b6b;
            font-weight: 600;
            background: rgba(255, 107, 107, 0.15);
            padding: 2px 6px;
            border-radius: 3px;
        }
        
        .summary-strongest {
            color: #ffd700;
            font-weight: 600;
            background: rgba(255, 215, 0, 0.15);
            padding: 2px 6px;
            border-radius: 3px;
        }
        
        .summary-conclusion {
            color: #64b5f6;
            font-weight: 600;
            background: rgba(100, 181, 246, 0.15);
            padding: 2px 6px;
            border-radius: 3px;
        }
        
        .summary-section {
            margin: 15px 0;
            padding: 12px 15px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 6px;
            border-left: 3px solid #555;
        }
        
        .summary-section.agreement-section {
            border-left-color: #44ff77;
        }
        
        .summary-section.disagreement-section {
            border-left-color: #ff6b6b;
        }
        
        .summary-section.conclusion-section {
            border-left-color: #64b5f6;
            background: rgba(100, 181, 246, 0.05);
        }

        .model-argument h4,
        .model-rebuttal h4,
        .debate-summary h4 {
            margin-top: 0;
            padding-bottom: 5px;
            border-bottom: 1px solid #555;
            font-weight: bold;
        }

        #debate_status {
            margin: 10px 0 20px 0;
            padding: 10px;
            text-align: center;
            font-weight: bold;
            font-size: 1.1em;
            /* Remove any animations */
            animation: none;
        }

        .content {
            margin-top: 10px;
            line-height: 1.5;
            min-height: calc(1.5em * 5);
            /* Ensure at least 5 lines visible */
            /* Removed max-height and overflow-y to prevent double scrollbars */
            /* Parent container handles scrolling */
        }

        /* Debug panel - DISABLED FOR PRODUCTION
        #debug-panel {
            position: fixed;
            bottom: 0;
            right: 0;
            width: 350px;
            max-height: 300px;
            background-color: rgba(0, 0, 0, 0.8);
            color: #00ff00;
            font-family: monospace;
            padding: 10px;
            overflow-y: auto;
            z-index: 1000;
            border-top-left-radius: 5px;
            display: none;
        }

        #debug-toggle {
            position: fixed;
            bottom: 5px;
            right: 5px;
            z-index: 1001;
            background-color: #333;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 5px 10px;
            cursor: pointer;
        }

        .debug-entry {
            border-bottom: 1px dashed #555;
            padding: 5px 0;
            font-size: 0.85em;
        }

        .debug-entry .timestamp {
            color: #999;
            font-size: 0.8em;
        }

        .debug-entry .message {
            color: white;
        }

        .debug-entry .data {
            color: #aaffaa;
            margin-left: 10px;
            white-space: pre-wrap;
            font-size: 0.8em;
        }

        .debug-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            border-bottom: 1px solid #555;
            padding-bottom: 5px;
        }

        .debug-header h4 {
            margin: 0;
            color: white;
        }

        .debug-header button {
            background-color: #444;
            color: white;
            border: none;
            border-radius: 3px;
            padding: 3px 6px;
            font-size: 0.8em;
            cursor: pointer;
        }

        .debug-header button:hover {
            background-color: #555;
        }

        .event-type {
            color: #ffaa00;
            margin-right: 8px;
        }

        .time-diff {
            color: #aaa;
            font-size: 0.8em;
            margin-left: 5px;
        }

        .counter {
            color: #888;
            font-size: 0.8em;
            margin-left: 5px;
        }
        END Debug panel - DISABLED FOR PRODUCTION */

        /* Removed flash animations as requested by user */
        /* @keyframes flash-update {
            0% {
                background-color: rgba(255, 255, 0, 0.25);
            }

            50% {
                background-color: rgba(255, 255, 0, 0.1);
            }

            100% {
                background-color: transparent;
            }
        }

        /* Removed flash-update animation as requested */
        /* .flash-update {
            animation: flash-update 2s ease-out;
        } */

        @keyframes progress-pulse {
            0% {
                opacity: 1;
            }

            50% {
                opacity: 0.9;
            }

            /* Reduced intensity */
            100% {
                opacity: 1;
            }
        }

        .progress-pulse {
            animation: progress-pulse 1.5s infinite ease-in-out;
        }

        /* Set a maximum height for response containers and enable auto-scrolling */
        .response-content {
            /* Let parent .response-box handle scrolling to avoid double scrollbars */
            overflow-y: visible;
        }

        /* Ensure responsiveness */
        @media (max-width: 768px) {
            .response-content {
                max-height: 200px;
                /* Adjust for smaller screens */
            }
        }

        /* Add streaming status indicators */
        .response-content.connecting {
            color: #aaa;
            position: relative;
        }
        
        .response-content.waiting {
            color: #aaa;
            position: relative;
        }
        
        .response-content.receiving {
            color: #fff;
        }
        
        .response-content.connecting::after,
        .response-content.waiting::after {
            content: "";
            display: inline-block;
            width: 8px;
            height: 8px;
            margin-left: 5px;
            background-color: #00aaff;
            border-radius: 50%;
            animation: blink 1s infinite;
            vertical-align: middle;
        }
        
        @keyframes blink {
            0% { opacity: 0.3; }
            50% { opacity: 1; }
            100% { opacity: 0.3; }
        }
        
        /* Better error styling */
        .tensor-error {
            border-left: 3px solid #ff9900;
            padding-left: 10px;
            margin-top: 10px;
            color: #ff9900;
        }
        
        .general-error {
            border-left: 3px solid #ff4444;
            padding-left: 10px;
            margin-top: 10px;
            color: #ff4444;
        }

        /* PowerPoint Modal Fix - FORCE VISIBILITY */
        #ppt-agent-modal {
            z-index: 99999 !important;
        }
        
        #ppt-agent-modal.show {
            display: block !important;
        }
        
        #ppt-agent-modal .modal-dialog {
            z-index: 100000 !important;
            margin: 50px auto !important;
            max-width: 1140px !important;
            position: relative !important;
        }
        
        #ppt-agent-modal .modal-content {
            background: #1a1a2e !important;
            color: white !important;
            border: 5px solid #00ff00 !important; /* BRIGHT GREEN BORDER FOR DEBUGGING */
            position: relative !important;
            display: flex !important;
            flex-direction: column !important;
            width: 100% !important;
            min-width: 600px !important;
            max-width: 1200px !important;
            min-height: 400px !important;
            height: auto !important;
            pointer-events: auto !important;
            opacity: 1 !important;
            visibility: visible !important;
            box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3) !important;
            transform: none !important;
            overflow: visible !important;
        }
        
        #ppt-agent-modal .modal-content * {
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        /* Exception: Allow custom-file-input to remain hidden (Bootstrap uses label as proxy) */
        #ppt-agent-modal .custom-file-input {
            opacity: 0 !important;
            position: absolute !important;
            z-index: -1 !important;
        }
        
        #ppt-agent-modal .custom-file-label {
            cursor: pointer !important;
            pointer-events: auto !important;
            position: relative !important;
            z-index: 2 !important;
        }
        
        /* FORCE MODAL FOOTER AND BUTTON VISIBILITY */
        #ppt-agent-modal .modal-footer {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            border-top: 2px solid #3a3a5a !important;
            padding: 15px !important;
            background: #1a1a2e !important;
            justify-content: flex-end !important;
            gap: 10px !important;
        }
        
        #ppt-generate-btn {
            display: inline-block !important;
            visibility: visible !important;
            opacity: 1 !important;
            cursor: pointer !important;
            position: relative !important;
            z-index: 1 !important;
        }
        
        /* BRUTE FORCE VISIBILITY CLASS */
        .brute-force-visible {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            position: relative !important;
            width: 100% !important;
            height: auto !important;
            min-height: 400px !important;
            background: #1a1a2e !important;
            color: white !important;
            border: 5px solid #ff0000 !important;
            padding: 20px !important;
            z-index: 100001 !important;
        }
        
        #ppt-agent-modal .modal-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            border-bottom: 2px solid #667eea !important;
            display: block !important;
        }
        
        #ppt-agent-modal .modal-body {
            background: #1a1a2e !important;
            color: white !important;
            padding: 30px !important;
            display: block !important;
        }
        
        /* Ensure modal backdrop doesn't interfere */
        #ppt-agent-modal.show {
            display: block !important;
        }
        
        /* Fix for modal-xl sizing issues */
        .modal-xl {
            max-width: 1140px !important;
        }
        
            @media (max-width: 1200px) {
            .modal-xl {
                max-width: 90vw !important;
                margin: 15px auto !important;
            }
        }

        /* PowerPoint Outline Textarea - Enhanced Width */
        #ppt-outline-text {
            width: 100% !important;
            min-width: 600px !important;
            max-width: 100% !important;
            resize: both !important;
            font-family: 'Courier New', Monaco, monospace !important;
            font-size: 14px !important;
            line-height: 1.5 !important;
        }

        /* Responsive adjustments for smaller screens */
        @media (max-width: 768px) {
            #ppt-outline-text {
                min-width: 100% !important;
                font-size: 16px !important; /* Prevent zoom on mobile */
            }
        }

        /* ----------------------------------------------------------- */
        /* Follow-Up Action Cards (Critique + Debate artifact panels)  */
        /* ----------------------------------------------------------- */
        .aimp-followup-intro {
            color: #cfd8dc;
            margin: 0 0 12px 0;
            font-size: 13px;
            line-height: 1.5;
        }

        .aimp-followup-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 12px;
            width: 100%;
        }

        .aimp-followup-card {
            display: flex;
            flex-direction: column;
            background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
            border: 1px solid rgba(255,255,255,0.10);
            border-left-width: 3px;
            border-radius: 8px;
            padding: 10px 12px;
            transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
        }

        .aimp-followup-card:hover {
            transform: translateY(-1px);
            border-color: rgba(255,255,255,0.22);
            box-shadow: 0 4px 14px rgba(0,0,0,0.30);
        }

        .aimp-followup-primary {
            background: transparent;
            color: #f5f5f5;
            border: none;
            text-align: left;
            font-size: 13.5px;
            font-weight: 600;
            line-height: 1.35;
            padding: 4px 2px 8px 2px;
            margin: 0 0 8px 0;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            width: 100%;
        }

        .aimp-followup-primary:hover {
            color: #ffffff;
        }

        .aimp-followup-toolbar {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: auto;
        }

        .aimp-followup-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11.5px;
            font-weight: 500;
            padding: 5px 9px;
            border-radius: 5px;
            cursor: pointer;
            border: 1px solid transparent;
            line-height: 1;
            white-space: nowrap;
            transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
        }

        .aimp-followup-btn-run {
            background: rgba(77, 163, 255, 0.10);
            color: #cfe6ff;
            border-color: rgba(77, 163, 255, 0.45);
        }

        .aimp-followup-btn-run:hover {
            background: rgba(77, 163, 255, 0.22);
            color: #ffffff;
            border-color: #4da3ff;
        }

        .aimp-followup-btn-copy {
            background: rgba(255,255,255,0.04);
            color: #cfd8dc;
            border-color: rgba(255,255,255,0.16);
        }

        .aimp-followup-btn-copy:hover {
            background: rgba(255,255,255,0.10);
            color: #ffffff;
            border-color: rgba(255,255,255,0.32);
        }

        /* Debate accent (blue) */
        .aimp-followup-card.aimp-followup-card--debate {
            border-left-color: #4da3ff;
        }

        /* Critique accent (green) */
        .aimp-followup-card.aimp-followup-card--critique {
            border-left-color: #44aa77;
        }

        .aimp-followup-card.aimp-followup-card--critique .aimp-followup-btn-run {
            background: rgba(68, 170, 119, 0.10);
            color: #d9ffe8;
            border-color: rgba(68, 170, 119, 0.50);
        }

        .aimp-followup-card.aimp-followup-card--critique .aimp-followup-btn-run:hover {
            background: rgba(68, 170, 119, 0.24);
            color: #ffffff;
            border-color: #44aa77;
        }

        @media (max-width: 600px) {
            .aimp-followup-grid {
                grid-template-columns: 1fr;
            }
            .aimp-followup-toolbar {
                flex-wrap: wrap;
            }
        }

        /* ----------------------------------------------------------- */
        /* Critique / Debate Brief Stat Cards                          */
        /* ----------------------------------------------------------- */
        .aimp-brief-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 12px;
            margin-bottom: 14px;
        }

        .aimp-brief-card {
            position: relative;
            padding: 14px 16px;
            border-radius: 10px;
            background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
            border: 1px solid rgba(255,255,255,0.10);
            border-top-width: 3px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-height: 120px;
        }

        .aimp-brief-card-header {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #b0bec5;
        }

        .aimp-brief-card-icon {
            font-size: 16px;
            line-height: 1;
        }

        .aimp-brief-card-body {
            color: #eceff1;
            font-size: 14px;
            line-height: 1.55;
            flex: 1;
        }

        .aimp-brief-card-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 4px;
        }

        .aimp-brief-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(255,255,255,0.05);
            color: #cfd8dc;
            border: 1px solid rgba(255,255,255,0.12);
        }

        /* Card variants - top border accent */
        .aimp-brief-card--agreement {
            border-top-color: #4caf85;
        }
        .aimp-brief-card--agreement .aimp-brief-card-header {
            color: #8cffb5;
        }
        .aimp-brief-card--agreement .aimp-brief-chip {
            background: rgba(76, 175, 133, 0.14);
            color: #b2f2cb;
            border-color: rgba(76, 175, 133, 0.45);
        }

        .aimp-brief-card--insight {
            border-top-color: #4da3ff;
        }
        .aimp-brief-card--insight .aimp-brief-card-header {
            color: #cfe6ff;
        }
        .aimp-brief-card--insight .aimp-brief-chip {
            background: rgba(77, 163, 255, 0.14);
            color: #d6eaff;
            border-color: rgba(77, 163, 255, 0.45);
        }

        .aimp-brief-card--action {
            border-top-color: #ffb74d;
        }
        .aimp-brief-card--action .aimp-brief-card-header {
            color: #ffd180;
        }
        .aimp-brief-card--action .aimp-brief-chip {
            background: rgba(255, 183, 77, 0.14);
            color: #ffe0b2;
            border-color: rgba(255, 183, 77, 0.45);
        }

        /* "When to use which" guidance card shown in both Critique and
           Debate modals so users have decision support at the point of use. */
        .aimp-when-to-use-card {
            margin: 14px 0 18px 0;
            padding: 14px 16px;
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(68,170,153,0.08) 0%, rgba(0,119,204,0.08) 100%);
            border: 1px solid rgba(255,255,255,0.10);
            color: #eceff1;
            font-size: 13px;
            line-height: 1.55;
        }
        .aimp-when-to-use-card h4 {
            margin: 0 0 10px 0;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #b0bec5;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .aimp-when-to-use-card .aimp-wtuc-icon {
            font-size: 16px;
        }
        .aimp-when-to-use-card .aimp-wtuc-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 8px;
        }
        .aimp-when-to-use-card .aimp-wtuc-row:last-of-type {
            margin-bottom: 0;
        }
        .aimp-when-to-use-card .aimp-wtuc-tag {
            display: inline-block;
            flex-shrink: 0;
            min-width: 78px;
            text-align: center;
            font-size: 10.5px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            padding: 3px 10px;
            border-radius: 999px;
            border: 1px solid;
            line-height: 1.3;
        }
        .aimp-when-to-use-card .aimp-wtuc-tag--critique {
            color: #8cffb5;
            background: rgba(76,175,133,0.14);
            border-color: rgba(76,175,133,0.5);
        }
        .aimp-when-to-use-card .aimp-wtuc-tag--debate {
            color: #cfe6ff;
            background: rgba(77,163,255,0.14);
            border-color: rgba(77,163,255,0.5);
        }
        .aimp-when-to-use-card .aimp-wtuc-tag--tip {
            color: #ffe0b2;
            background: rgba(255,183,77,0.14);
            border-color: rgba(255,183,77,0.5);
        }
        .aimp-when-to-use-card .aimp-wtuc-text {
            flex: 1;
        }
        .aimp-when-to-use-card .aimp-wtuc-text strong {
            color: #ffffff;
        }
        .aimp-when-to-use-card .aimp-wtuc-tip {
            margin-top: 8px;
            padding-top: 10px;
            border-top: 1px dashed rgba(255,255,255,0.12);
            font-style: italic;
            color: #cfd8dc;
        }
        .aimp-when-to-use-card .aimp-wtuc-quote {
            color: #ffe0b2;
            font-style: normal;
        }

        /* Debate role legend in the picker explainer */
        .aimp-debate-role-legend {
            display: inline-block;
            font-weight: 600;
            font-size: 10.5px;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            padding: 1px 7px;
            border-radius: 999px;
            border: 1px solid currentColor;
            line-height: 1.4;
            margin: 0 1px;
        }
        .aimp-debate-role-legend[data-role="Affirmative"]    { color: #4caf85; }
        .aimp-debate-role-legend[data-role="Skeptic"]        { color: #ff7043; }
        .aimp-debate-role-legend[data-role="Evidence Judge"] { color: #4da3ff; }
        .aimp-debate-role-legend[data-role="Pragmatist"]     { color: #ffb74d; }
        .aimp-debate-role-legend[data-role="Wildcard"]       { color: #ba68c8; }

        /* Live badge next to each selected model in the debate picker */
        .aimp-debate-row .aimp-debate-role-badge {
            transition: opacity 0.12s ease;
        }
        .aimp-debate-row .form-check-label {
            cursor: pointer;
        }

        .aimp-brief-card--disagreement {
            border-top-color: #ff7043;
            background: linear-gradient(180deg, rgba(255,112,67,0.08) 0%, rgba(255,255,255,0.015) 100%);
        }
        .aimp-brief-card--disagreement .aimp-brief-card-header {
            color: #ffab91;
        }
        .aimp-brief-card--disagreement .aimp-brief-chip {
            background: rgba(255, 112, 67, 0.14);
            color: #ffccbc;
            border-color: rgba(255, 112, 67, 0.45);
        }

        .aimp-brief-empty {
            color: #90a4ae;
            font-style: italic;
        }

        .aimp-brief-toolbar {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            margin-top: 6px;
        }

        .aimp-brief-empty-state {
            padding: 14px 16px;
            border-radius: 8px;
            background: rgba(255,255,255,0.03);
            border: 1px dashed rgba(255,255,255,0.15);
            color: #b0bec5;
            font-size: 13px;
            line-height: 1.55;
            text-align: center;
        }

        @media (max-width: 600px) {
            .aimp-brief-grid {
                grid-template-columns: 1fr;
            }
        }
