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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f5f5f5;
        }

        /* Header */
        header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 8px 16px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .header-content {
            max-width: 1600px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-title {
            text-align: left;
        }

        .header-title h1 {
            font-size: 1.3rem;
            margin-bottom: 2px;
            font-weight: 600;
        }

        .header-title p {
            font-size: 0.85rem;
            opacity: 0.9;
        }

        .header-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 6px;
        }

        .header-actions {
            display: flex;
            gap: 8px;
        }

        .header-copyright {
            font-size: 0.75rem;
            opacity: 0.7;
        }

        .header-copyright a {
            color: white;
            text-decoration: none;
        }

        .header-copyright a:hover {
            text-decoration: underline;
        }

        .header-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: rgba(255, 255, 255, 0.15);
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.2s;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .header-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-1px);
        }

        .header-btn svg {
            width: 16px;
            height: 16px;
        }

        .header-btn--star {
            background: rgba(255, 255, 255, 0.15);
            color: #FFD700;
        }

        .header-btn--star:hover {
            background: rgba(255, 215, 0, 0.25);
        }

        .header-btn--coffee {
            background: #FFDD00;
            color: #333;
            border-color: #FFDD00;
        }

        .header-btn--coffee:hover {
            background: #FFEE00;
        }

        /* Clear button (used in filter bar search) */
        .clear-btn {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: #999;
        }

        .clear-btn:hover {
            color: #333;
        }

        /* Filter Bar */
        .filter-bar {
            display: flex;
            flex-direction: column;
            gap: 4px;
            background: white;
            padding: 6px 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            position: sticky;
            top: 0;
            z-index: 500;
            max-width: 1600px;
            margin: 0 auto;
        }

        /* Filter Bar Rows */
        .filter-bar__row {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            align-items: center;
        }

        .filter-bar__row--primary {
            padding-bottom: 4px;
            border-bottom: 1px solid #e5e7eb;
        }

        .filter-bar__row--pills {
            gap: 8px;
        }

        .filter-bar__search {
            position: relative;
            flex: 1;
            min-width: 180px;
            max-width: 300px;
        }

        .filter-bar__search input {
            width: 100%;
            padding: 6px 32px 6px 10px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 0.85rem;
            height: 32px;
        }

        .filter-bar__search input:focus {
            outline: none;
            border-color: #667eea;
        }

        .filter-bar__sort {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .filter-bar__sort label {
            font-size: 0.85rem;
            font-weight: 600;
            color: #555;
        }

        .filter-bar__sort select {
            appearance: none;
            background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path fill="%23667eea" d="M6 9L1 4h10z"/></svg>') no-repeat right 10px center;
            padding: 6px 30px 6px 10px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            height: 32px;
        }

        .filter-bar__sort select:hover {
            border-color: #667eea;
        }

        .filter-bar__sort select:focus {
            outline: none;
            border-color: #667eea;
        }

        .filter-bar__group {
            display: flex;
            align-items: center;
            gap: 4px;
            flex-wrap: wrap;
        }

        .filter-bar__label {
            font-size: 0.8rem;
            font-weight: 600;
            color: #667eea;
            margin-right: 2px;
        }

        .filter-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border: 1px solid #d1d5db;
            border-radius: 16px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
            background: #f9fafb;
            user-select: none;
        }

        .filter-pill:hover {
            border-color: #667eea;
            background: #f0f0ff;
        }

        .filter-pill input[type="checkbox"] {
            appearance: none;
            width: 14px;
            height: 14px;
            border: 2px solid #d1d5db;
            border-radius: 3px;
            cursor: pointer;
            position: relative;
            transition: all 0.2s;
            margin: 0;
        }

        .filter-pill input[type="checkbox"]:checked {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-color: #667eea;
        }

        .filter-pill input[type="checkbox"]:checked::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 0.65rem;
            font-weight: bold;
        }

        .filter-bar__actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: auto;
            font-size: 0.85rem;
        }

        .filter-bar__actions span {
            color: #666;
        }

        #resultCount {
            color: #667eea;
            font-size: 1.1rem;
            font-weight: bold;
        }

        #clearFilters {
            background: none;
            border: 1px solid #667eea;
            color: #667eea;
            cursor: pointer;
            font-size: 0.8rem;
            padding: 4px 10px;
            border-radius: 4px;
            transition: all 0.2s;
        }

        #clearFilters:hover {
            background: #667eea;
            color: white;
        }

        /* Filter Toggle (Mobile) - Hidden by default */
        .filter-toggle {
            display: none;
        }

        /* Loading, Error, and Empty States */
        .loading-state,
        .error-state,
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            max-width: 500px;
            margin: 0 auto;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #f3f4f6;
            border-top: 4px solid #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

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

        .loading-state p {
            color: #666;
            font-size: 1.1rem;
        }

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

        .error-state h3,
        .empty-state h3 {
            color: #333;
            font-size: 1.5rem;
            margin-bottom: 10px;
        }

        .error-state p,
        .empty-state p {
            color: #666;
            font-size: 1rem;
            margin-bottom: 20px;
        }

        .retry-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .retry-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        /* Conference Container */
        .conference-container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 12px;
        }

        /* Scroll Sentinel */
        .scroll-sentinel {
            height: 1px;
            width: 100%;
        }

        /* Cards Grid - Masonry.js container */
        .cards-grid {
            /* Masonry container - no layout needed, handled by JS */
        }

        /* Individual Card */
        .conference-card {
            width: 340px;            /* Default width */
            max-width: 100%;         /* Prevent overflow */
            background: white;
            border-radius: 8px;
            padding: 16px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
            transition: transform 0.2s, box-shadow 0.2s, z-index 0s;
            height: auto;
            position: relative;
            z-index: 1;
            margin-bottom: 16px;
            animation: cardFadeIn 1s ease-out both;
            box-sizing: border-box;
        }

        @keyframes cardFadeIn {
            from { opacity: 0; }
            to   { opacity: 1; }
        }

        /* Card with visible popover gets elevated */
        .conference-card:has(.rule-tag:hover) {
            z-index: 9999;
            box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        }

        .conference-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        }

        /* Card Header */
        .card-header {
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid #e5e7eb;
        }

        .card-header__top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 6px;
        }


        .conf-name {
            font-size: 1.25rem;
            font-weight: 600;
            color: #333;
            margin: 0;
            line-height: 1.3;
        }

        .conf-name a {
            color: #667eea;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .conf-name a:hover {
            text-decoration: underline;
        }

        .conf-name a:focus {
            outline: 2px solid #667eea;
            outline-offset: 2px;
            border-radius: 4px;
        }

        .external-link-icon {
            width: 12px;
            height: 12px;
            vertical-align: middle;
            flex-shrink: 0;
        }

        .card-header__badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        /* Badges */
        .area-badge {
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            color: white;
            line-height: 1.4;
        }

        .area-badge.ai { background: #667eea; }
        .area-badge.db { background: #10b981; }
        .area-badge.se { background: #f59e0b; }
        .area-badge.nw { background: #3b82f6; }
        .area-badge.sc { background: #ef4444; }
        .area-badge.cg { background: #ec4899; }
        .area-badge.ct { background: #8b5cf6; }
        .area-badge.ds { background: #14b8a6; }
        .area-badge.hi { background: #f97316; }
        .area-badge.mx { background: #6366f1; }
        .area-badge.other { background: #999; }

        .rank-badge {
            padding: 2px 6px;
            border-radius: 6px;
            font-size: 0.65rem;
            font-weight: 700;
            border: 1.5px solid;
            line-height: 1.4;
        }

        .rank-badge.ccf-a { color: #10b981; border-color: #10b981; background: #d1fae5; }
        .rank-badge.ccf-b { color: #3b82f6; border-color: #3b82f6; background: #dbeafe; }
        .rank-badge.ccf-c { color: #f59e0b; border-color: #f59e0b; background: #fef3c7; }
        .rank-badge.core-astar { color: #10b981; border-color: #10b981; background: #d1fae5; }
        .rank-badge.core-a { color: #3b82f6; border-color: #3b82f6; background: #dbeafe; }
        .rank-badge.core-b { color: #f59e0b; border-color: #f59e0b; background: #fef3c7; }

        .area-badge:focus,
        .rank-badge:focus {
            outline: 2px solid #667eea;
            outline-offset: 2px;
        }

        /* Metadata Bar */
        .card-metadata {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            font-size: 0.85rem;
            color: #666;
            gap: 10px;
        }

        .completeness {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            margin: 0 12px;
        }

        .progress-bar {
            flex: 1;
            height: 8px;
            background: #e0e0e0;
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            transition: width 0.3s;
        }

        .percent {
            font-weight: 600;
            color: #667eea;
        }

        /* Rules Tags Container */
        .rules-container {
            position: relative;
            z-index: 100;
        }

        .rules-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin: 10px 0;
            min-height: 30px;
            position: relative;
            z-index: 100;
        }

        /* Important Dates */
        .important-dates {
            margin: 12px 0;
            padding: 12px;
            background: #f8f9fa;
            border-radius: 6px;
            border-left: 3px solid #667eea;
        }

        .dates-header {
            font-size: 0.75rem;
            font-weight: 600;
            color: #667eea;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .date-item {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 6px;
            font-size: 0.85rem;
        }

        .date-item:last-child {
            margin-bottom: 0;
        }

        .date-icon {
            font-size: 1rem;
        }

        .date-label {
            font-weight: 600;
            color: #555;
            min-width: 90px;
        }

        .date-value {
            color: #333;
        }

        .no-dates {
            font-size: 0.85rem;
            color: #999;
            font-style: italic;
        }

        .rule-tag {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 0;
            padding: 3px 6px;
            border-radius: 3px;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
            line-height: 1.3;
            z-index: 1;
        }

        .rule-tag:hover,
        .rule-tag.active {
            z-index: 100;
        }

        /* Status-based styling */
        .rule-tag--confirmed {
            background: #d1fae5;
            color: #065f46;
            border: 1px solid #10b981;
        }

        .rule-tag--denied {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #ef4444;
        }

        .rule-tag--unknown {
            background: #f3f4f6;
            color: #4b5563;
            border: 1px solid #d1d5db;
        }

        .rule-tag--value {
            background: #e0e7ff;
            color: #3730a3;
            border: 1px solid #667eea;
        }

        /* Partial/Optional - Amber/Yellow */
        .rule-tag--partial {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #f59e0b;
        }

        .rule-tag--partial .rule-tag__icon {
            color: #f59e0b;
        }

        /* Hover effect */
        .rule-tag:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .rule-tag:focus {
            outline: 3px solid #667eea;
            outline-offset: 2px;
        }

        /* Icon and label styling */
        .rule-tag__icon {
            font-size: 0.75rem;
            font-weight: bold;
            margin-right: 3px;
        }

        .rule-tag__label {
            font-size: 0.75rem;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 120px;
        }

        /* Popover */
        .rule-tag-popover {
            position: absolute;
            bottom: calc(100% + 6px);
            left: 50%;
            transform: translateX(-50%) scale(0.95);
            width: 280px;
            max-width: 90vw;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 6px;
            padding: 8px 10px;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            z-index: 10000;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        /* Arrow pointing down */
        .rule-tag-popover::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 8px solid #764ba2;
        }

        /* Show on hover */
        .rule-tag:hover .rule-tag-popover,
        .rule-tag.active .rule-tag-popover {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) scale(1);
        }

        /* Popover header */
        .rule-tag-popover__header {
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 4px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
            padding-bottom: 4px;
            word-wrap: break-word;
            overflow-wrap: break-word;
            white-space: normal;
        }

        /* Status badge */
        .rule-tag-popover__status {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            padding: 2px 6px;
            border-radius: 8px;
            font-size: 0.7rem;
            margin-bottom: 6px;
            white-space: normal;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        /* Evidence text */
        .rule-tag-popover__evidence {
            font-size: 0.75rem;
            line-height: 1.3;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            max-width: 100%;
            max-height: 120px;
            overflow-y: auto;
        }

        /* Custom scrollbar for evidence */
        .rule-tag-popover__evidence::-webkit-scrollbar {
            width: 4px;
        }

        .rule-tag-popover__evidence::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
        }

        .rule-tag-popover__evidence::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 2px;
        }

        .rule-tag-popover__evidence::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        .rule-tag-popover__evidence p {
            margin: 0;
            font-style: italic;
            opacity: 0.95;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            white-space: normal;
        }

        .rule-tag-popover__evidence small {
            opacity: 0.7;
            font-size: 0.7rem;
        }

        /* Grouped tag styling */
        .rule-tag--grouped {
            position: relative;
            cursor: pointer;
            padding-right: 28px; /* Space for expand icon */
        }

        .rule-tag--grouped .rule-tag__summary {
            margin-left: 4px;
            font-size: 0.85em;
            opacity: 0.8;
        }

        .rule-tag--grouped .rule-tag__expand-icon {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.7em;
            transition: transform 0.2s ease;
        }

        .rule-tag--grouped[data-expanded="true"] .rule-tag__expand-icon {
            transform: translateY(-50%) rotate(180deg);
        }

        /* Expanded content panel */
        .rule-tag__expanded-content {
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 8px;
            background: white;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            padding: 12px;
            min-width: 300px;
            max-width: 400px;
            z-index: 1000;
            animation: slideDown 0.2s ease;
        }

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

        .grouped-tag__header {
            font-size: 0.85em;
            color: #6b7280;
            margin-bottom: 8px;
            padding-bottom: 8px;
            border-bottom: 1px solid #e5e7eb;
        }

        .grouped-tag__members {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .grouped-tag__member {
            /* Member tags styled normally but smaller */
        }

        .grouped-tag__member .rule-tag {
            font-size: 0.9em;
            padding: 4px 8px;
        }

        /* Hover state for grouped tags */
        .rule-tag--grouped:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* Prevent nested popover on grouped tags */
        .rule-tag--grouped .rule-tag-popover {
            display: none;
        }

        /* Mobile filter toggle and collapse (640px breakpoint) */
        @media (max-width: 640px) {
            .filter-toggle {
                display: flex;
                align-items: center;
                gap: 8px;
                width: 100%;
                padding: 10px 16px;
                background: white;
                border: none;
                border-bottom: 1px solid #e5e7eb;
                cursor: pointer;
                font-size: 0.9rem;
                font-weight: 500;
                position: sticky;
                top: 0;
                z-index: 501;
                box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            }

            .filter-toggle:hover {
                background: #f9fafb;
            }

            .filter-toggle .filter-icon {
                flex-shrink: 0;
            }

            .filter-toggle .chevron {
                margin-left: auto;
                flex-shrink: 0;
                transition: transform 0.2s;
            }

            .filter-toggle.active .chevron {
                transform: rotate(180deg);
            }

            /* Hide filter bar by default on mobile */
            .filter-bar {
                display: none;
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.3s ease-out;
            }

            /* Show when active */
            .filter-bar.active {
                display: flex;
                max-height: 600px;
            }
        }

        /* Mobile adjustments for grouped tags */
        @media (max-width: 768px) {
            .rule-tag__expanded-content {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                max-width: 90vw;
            }
        }

        /* Card Footer */
        .card-footer {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            padding-top: 8px;
            margin-top: 8px;
            border-top: 1px solid #e5e7eb;
            font-size: 0.85rem;
        }

        .conf-url-footer {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.2s;
        }

        .conf-url-footer:hover {
            color: #764ba2;
            text-decoration: underline;
        }

        .conf-url-footer:focus {
            outline: 2px solid #667eea;
            outline-offset: 2px;
            border-radius: 4px;
        }

        /* Rule tag "view more" button */
        .rule-tag--more {
            cursor: pointer;
            color: #667eea;
            font-size: 0.8rem;
            padding: 4px 8px;
            border: 1px dashed #667eea;
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
        }
        .rule-tag--more:hover {
            background: #f0f0ff;
        }

        /* Legend */
        .legend-compact {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 6px 12px;
            margin-bottom: 8px;
            background: #f9fafb;
            border-radius: 6px;
            font-size: 0.8rem;
        }

        .legend-label {
            font-weight: 600;
            color: #667eea;
            margin-right: 8px;
        }

        .legend-item {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .symbol {
            font-size: 0.9rem;
            font-weight: bold;
        }

        .symbol.confirmed { color: #10b981; }
        .symbol.denied { color: #ef4444; }
        .symbol.unknown { color: #9ca3af; }
        .symbol.value { color: #667eea; }

        /* Footer */
        footer {
            text-align: center;
            padding: 30px;
            color: #999;
            font-size: 0.85rem;
            background: white;
            margin-top: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        footer a {
            color: #667eea;
            text-decoration: none;
        }

        footer a:hover {
            text-decoration: underline;
        }

        /* Disclaimer (subtle, under legend) */
        .disclaimer-subtle {
            font-size: 0.7rem;
            color: #999;
            padding: 4px 0;
            margin-bottom: 8px;
            border-bottom: 1px solid #f0f0f0;
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            animation: fadeIn 0.3s;
        }

        .modal-content {
            background: white;
            margin: 10% auto;
            padding: 30px;
            border-radius: 8px;
            max-width: 600px;
            max-height: 70vh;
            overflow-y: auto;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            animation: slideIn 0.3s;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #667eea;
        }

        .modal-header h2 {
            color: #667eea;
        }

        .close {
            font-size: 28px;
            font-weight: bold;
            color: #aaa;
            cursor: pointer;
            transition: color 0.2s;
        }

        .close:hover {
            color: #000;
        }

        .evidence-item {
            margin: 0;
            padding: 6px 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            border-left: 2px solid rgba(255, 255, 255, 0.3);
        }

        .evidence-text {
            font-style: italic;
            color: rgba(255, 255, 255, 0.95);
            line-height: 1.4;
            margin: 0;
        }

        .evidence-source {
            margin-top: 10px;
            font-size: 0.85rem;
            color: #666;
        }

        .no-results {
            text-align: center;
            padding: 60px 20px;
            color: #999;
            font-size: 1.1rem;
        }

        /* Override Masonry's inline styles when no cards are present */
        .cards-grid:has(.no-results) {
            height: auto !important;
            width: 100% !important;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

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

        /* Responsive */
        @media (max-width: 1024px) {
            .conference-card {
                width: 280px;
            }
        }

        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 16px;
            }

            .header-title {
                text-align: center;
            }

            .header-right {
                align-items: center;
            }

            .header-title h1 {
                font-size: 1.8rem;
            }

            .conference-card {
                width: 100%;
                max-width: 100%;
                margin-bottom: 16px;
            }

            /* Mobile: filter bar stacks vertically */
            .filter-bar {
                flex-direction: column;
                align-items: stretch;
            }

            .filter-bar__search {
                max-width: 100%;
            }

            .filter-bar__actions {
                margin-left: 0;
            }
        }

/* Card Body - Missing CSS */
.card-body {
    margin-top: 12px;
}

.rules-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ===== CUSTOM ENHANCEMENTS ===== */

/* Card Body & Rules Container */
.card-body {
    margin-top: 12px;
}

.rules-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Card Badges Right Container */
.card-badges-right {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* Badges row below card title and subtitle */
.card-badges-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

/* Compact Rank Badges */
.rank-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid;
}

.rank-badge.rank-a {
    background: #fee2e2;
    color: #991b1b;
    border-color: #dc2626;
}

.rank-badge.rank-b {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.rank-badge.rank-c {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #6366f1;
}

.rank-badge.rank-core {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.rank-badge.rank-thcpl {
    background: #e9d5ff;
    color: #6b21a8;
    border-color: #a855f7;
}

/* Area Badge - Compact */
.area-badge {
    background: #f3f4f6;
    color: #374151;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
}

/* Card Title - now on its own line */
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    padding: 0;
}

/* Card Subtitle Link - Blue to indicate it's a link */
.card-subtitle-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #2563eb;
    text-decoration: none;
    margin: 4px 0 8px 0;
    padding: 0;
    transition: color 0.2s;
}

.card-subtitle-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.card-subtitle-link:hover .external-link-icon {
    color: #1d4ed8;
    transform: translate(2px, -2px);
}

/* Card Footer */
.card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.footer-dates {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.footer-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
}

.footer-date strong {
    color: #1f2937;
    font-weight: 500;
}
