        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #2E8B57 0%, #228B22 100%);
            min-height: 100vh;
            color: #333;
        }
        
        .word-modified-left {
        background-color: #fecaca; 
        color: #991b36; 
        text-decoration: line-through;
        text-decoration-color: #991b1b; 
        text-decoration-thickness: 1px;
        padding: 0 2px;
        margin: 0 -2px;
        border-radius: 2px;
        font-weight: 800;
        }

        
        .word-modified-right {
        background-color: #bbf7d0; 
        color: #166534;
        font-weight: 800; 
        padding: 0 2px;
        margin: 0 -2px;
        border-radius: 2px;
        }

        
        .panel-content {
        white-space: pre-wrap; 
        line-height: 1.6;
        font-family: -apple-system, BlinkMacSystemFont, sans-serif;
        }
        .header {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            padding: 2rem 0;
            box-shadow: 0 2px 20px rgba(0,0,0,0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            text-align: center;
            padding: 0 2rem;
        }
        
        .header h1 {
            color: #2c3e50;
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
        }
        
        .header h2 {
            color: #7f8c8d;
            font-size: 1.2rem;
            margin-bottom: 1rem;
        }
        
        .controls {
            max-width: 1400px;
            margin: 1rem auto;
            padding: 0 2rem;
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            align-items: center;
        }
        
        .filter-btn {
            background: #27ae60;
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .filter-btn:hover {
            background: #219a52;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }
        
        .filter-btn.active {
            background: #e74c3c;
        }
        
        .search-box {
            flex: 1;
            max-width: 400px;
            position: relative;
        }
        
        .search-box input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: 2px solid #e0e0e0;
            border-radius: 25px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .search-box input:focus {
            outline: none;
            border-color: #27ae60;
            box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
        }
        
        .search-box i {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: #7f8c8d;
        }
        
        .stats {
            background: rgba(255, 255, 255, 0.9);
            padding: 0.75rem 1.5rem;
            border-radius: 25px;
            font-weight: 600;
            color: #2c3e50;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        main {
            max-width: 1400px;
            margin: 2rem auto;
            padding: 0 2rem;
        }
        
        .traces-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
            gap: 1.5rem;
        }
        
        .trace-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 1.5rem;
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
            cursor: pointer;
            transition: all 0.3s ease;
            border-left: 5px solid #27ae60;
            position: relative;
        }
        
        .trace-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 40px rgba(0,0,0,0.15);
        }
        
        .trace-title {
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 1rem;
            line-height: 1.4;
        }
        
        .source-flow {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }
        
        .ndaa-indicator {
            background: #27ae60;
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: bold;
        }
        
        .arrow {
            color: #7f8c8d;
            font-weight: bold;
            font-size: 1.2rem;
        }
        
        .source-indicator {
            padding: 0.25rem 0.75rem;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: bold;
            color: white;
            margin: 0.1rem;
        }
        
        .source-house { background: #3498db; }
        .source-senate { background: #f39c12; }
        .source-amendment { background: #e74c3c; }
        .source-original-amendment { background: #9b59b6; }
        
        .multi-sources {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }
        
        .source-branch {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .branch-line {
            width: 20px;
            height: 1px;
            background: #7f8c8d;
        }
        
        .trace-preview {
            color: #7f8c8d;
            font-size: 0.9rem;
            line-height: 1.4;
            margin-top: 0.5rem;
        }
        
        /* Modal styles */
        .trace-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            backdrop-filter: blur(5px);
        }
        
        .trace-modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .modal-content {
            background: white;
            border-radius: 20px;
            width: 95vw;
            height: 95vh;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }
        
        .modal-header {
            background: linear-gradient(135deg, #27ae60, #219a52);
            color: white;
            padding: 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 50%;
            transition: background 0.3s ease;
        }
        
        .modal-close:hover {
            background: rgba(255,255,255,0.2);
        }
        
        .modal-body {
            padding: 2rem;
            height: calc(95vh - 80px);
            overflow-y: auto;
        }
        
        .diff-note {
            background: #f8f9fa;
            padding: 1rem;
            border-radius: 10px;
            margin-bottom: 1.5rem;
            border-left: 4px solid #27ae60;
            font-size: 0.9rem;
            line-height: 1.4;
        }
        
        .source-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        
        .source-tab {
            background: #ecf0f1;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 20px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        
        .source-tab.active {
            background: #27ae60;
            color: white;
        }
        
        .source-tab:hover {
            background: #d5dbdb;
        }
        
        .source-tab.active:hover {
            background: #219a52;
        }
        
        .diff-content {
            background: #f8f9fa;
            padding: 1.5rem;
            border-radius: 10px;
            white-space: pre-wrap;
            font-family: 'Courier New', monospace;
            font-size: 0.9rem;
            line-height: 1.6;
            max-height: 60vh;
            overflow-y: auto;
        }
        
        /* Side-by-side layout */
        .side-by-side-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            height: 100%;
        }
        
        .side-panel {
            background: white;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        .panel-header {
            background: #e9ecef;
            padding: 1rem;
            font-weight: bold;
            color: #495057;
            border-bottom: 1px solid #dee2e6;
            font-size: 0.9rem;
        }
        
        .panel-content {
            padding: 1rem;
            flex: 1;
            overflow-y: auto;
            white-space: pre-wrap;
            font-family: 'Courier New', monospace;
            font-size: 0.85rem;
            line-height: 1.5;
        }
        
        /* Intelligent redlining styles */
        .redline-added {
            background-color: #d4edda;
            color: #155724;
            border-left: 4px solid #28a745;
            padding: 1rem;
            margin: 0.5rem 0;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .redline-removed {
            background-color: #f8d7da;
            color: #721c24;
            border-left: 4px solid #dc3545;
            padding: 1rem;
            margin: 0.5rem 0;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            text-decoration: line-through;
            opacity: 0.8;
        }
        
        .redline-unchanged {
            background-color: #f8f9fa;
            color: #6c757d;
            padding: 1rem;
            margin: 0.5rem 0;
            border-radius: 4px;
            border-left: 4px solid #6c757d;
        }
        
        .diff-section {
            margin-bottom: 2rem;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .diff-section-header {
            background: #e9ecef;
            padding: 1rem;
            font-weight: bold;
            color: #495057;
            border-bottom: 1px solid #dee2e6;
        }
        
        .diff-section-content {
            padding: 1rem;
        }
        
        .no-results {
            text-align: center;
            padding: 4rem 2rem;
            color: #7f8c8d;
            font-size: 1.2rem;
        }
        
        .loading {
            text-align: center;
            padding: 2rem;
            color: #7f8c8d;
        }
        
        /* Content-focused diff styles */
        .content-added {
            background-color: #d4edda;
            color: #155724;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            font-weight: 500;
            border-left: 3px solid #28a745;
            margin: 0.2rem 0;
            display: inline-block;
        }
        
        .content-removed {
            background-color: #f8d7da;
            color: #721c24;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            text-decoration: line-through;
            font-weight: 500;
            border-left: 3px solid #dc3545;
            margin: 0.2rem 0;
            display: inline-block;
        }
        
        .content-unchanged {
            color: #333;
        }
        
        .content-modified {
            background-color: #fff3cd;
            color: #856404;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            font-weight: 500;
            border-left: 3px solid #ffc107;
            margin: 0.2rem 0;
            display: inline-block;
        }
        
        .diff-stats {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            padding: 1.5rem;
            border-radius: 12px;
            margin-bottom: 1rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 1rem;
            text-align: center;
            border: 1px solid #dee2e6;
        }
        
        .stat-box {
            padding: 1rem;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .stat-added { 
            background: linear-gradient(135deg, #f0fff4, #dcffe4); 
            color: #22863a; 
            border-left: 4px solid #34d058;
        }
        .stat-removed { 
            background: linear-gradient(135deg, #ffeef0, #fdb8c0); 
            color: #d73a49; 
            border-left: 4px solid #d73a49;
        }
        .stat-unchanged { 
            background: linear-gradient(135deg, #f6f8fa, #e1e4e8); 
            color: #586069; 
            border-left: 4px solid #959da5;
        }
        .stat-similarity { 
            background: linear-gradient(135deg, #e3f2fd, #bbdefb); 
            color: #1976d2; 
            border-left: 4px solid #2196f3;
        }
        
        .stat-number {
            font-size: 1.8rem;
            font-weight: bold;
            margin-bottom: 0.25rem;
        }
        
        .stat-label {
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        .diff-note {
            background: #e3f2fd;
            border: 1px solid #2196f3;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
            font-size: 0.9rem;
            color: #1565c0;
        }
        
        @media (max-width: 768px) {
            .traces-container {
                grid-template-columns: 1fr;
            }
            
            .controls {
                flex-direction: column;
                align-items: stretch;
            }
            
            .search-box {
                max-width: none;
            }
        }