:root {
            /* Light mode colors */
            --bg-primary: #ffffff;
            --bg-secondary: #f8f9fa;
            --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --text-primary: #000000; /* Black for WCAG AA contrast (4.5:1+) on all playoff background colors */
            --text-secondary: #495057; /* Darker gray for better contrast: #6c757d -> #495057 (7.0:1 on white) */
            --border-color: #dee2e6;
            --shadow: rgba(0,0,0,0.1);
            --hover-bg: #1a5f8f; /* Darker blue for WCAG AA contrast (4.5:1+) with white text */
            --hover-text: #ffffff;
            --card-bg: rgba(255, 255, 255, 0.95);
            --sidebar-bg: rgba(255, 255, 255, 0.95);
        }

        [data-theme="dark"] {
            /* Dark mode colors */
            --bg-primary: #1a1a1a;
            --bg-secondary: #2d2d2d;
            --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            --text-primary: #e8e8e8;
            --text-secondary: #b0b0b0;
            --border-color: #404040;
            --shadow: rgba(0,0,0,0.3);
            --hover-bg: #1a5f8f; /* Darker blue for WCAG AA contrast (4.5:1+) with white text */
            --hover-text: #ffffff;
            --card-bg: rgba(45, 45, 45, 0.95);
            --sidebar-bg: rgba(45, 45, 45, 0.95);
        }

        html {
            overflow-x: hidden; /* Prevent horizontal scrolling */
            width: 100%;
        }
        
        /* Visually hidden but accessible to screen readers */
        .visually-hidden {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            line-height: 1.6;
            margin: 0;
            padding: 0;
            min-height: 100vh;
            background: var(--bg-gradient);
            color: var(--text-primary);
            transition: background 0.3s ease, color 0.3s ease;
            overflow-x: hidden; /* Prevent horizontal scrolling */
            width: 100%;
            max-width: 100vw; /* Ensure body doesn't exceed viewport width */
        }
                .top-bar {
            display: block;
        }
        
        .desktop-logo-container {
            display: none;
        }
        
        .desktop-footer-container {
            display: none;
        }
        
        .left-column {
            display: none;
        }
        
        .header {
            background: var(--card-bg);
            backdrop-filter: blur(10px);
            padding: 1rem 0;
            box-shadow: 0 2px 20px var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }
        
        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            line-height: 1;
            height: 2.5rem;
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
            transition: opacity 0.3s ease;
        }
        
        .logo:hover {
            opacity: 0.8;
        }
        
        .logo img {
            height: 50px;
            width: auto;
            max-width: 250px;
            object-fit: contain;
        }
        
        .logo-text {
            font-size: 1.8rem;
            font-weight: bold;
            color: var(--text-primary);
        }
        
        .desktop-logo {
            height: 400px;
            width: 400px;
            object-fit: contain;
        }
        
        @media (min-width: 769px) {
            .top-bar {
                display: block; /* Changed from flex - left-column is fixed, header is separate */
                position: relative;
                z-index: 100;
                pointer-events: none;
            }
            
            .top-bar > * {
                pointer-events: auto;
            }
            
            .left-column {
                display: flex;
                flex-direction: column;
                width: 250px;
                flex-shrink: 0;
                height: 100vh;
                position: fixed; /* Fixed instead of sticky to stay in place */
                left: 0;
                top: 0;
                z-index: 101; /* Above top-bar (100) to prevent overlap */
                pointer-events: none; /* Allow clicks to pass through to sidebar */
            }
            
            .left-column > * {
                pointer-events: auto; /* Re-enable clicks for logo and footer */
            }
            
            .desktop-logo-container {
                width: 100%; /* Full width of left column */
                background: var(--card-bg);
                backdrop-filter: blur(10px);
                box-shadow: 0 2px 20px var(--shadow);
                padding: 5px;
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
                height: 250px; /* Fixed height, taller than header */
                box-sizing: border-box;
            }
            
            .desktop-logo-container a {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 100%;
                height: 100%;
                text-decoration: none;
                transition: opacity 0.3s ease;
            }
            
            .desktop-logo-container a:hover {
                opacity: 0.8;
            }
            
            .desktop-logo {
                height: auto;
                width: calc(100% - 10px);
                max-width: 240px;
                max-height: 240px;
                object-fit: contain;
            }
            
            .desktop-footer-container {
                width: 100%; /* Full width of left column */
                background: var(--card-bg);
                backdrop-filter: blur(10px);
                box-shadow: 0 2px 20px var(--shadow);
                padding: 10px;
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
                box-sizing: border-box;
                min-height: 80px; /* Minimum height for footer */
                margin-top: auto; /* Push footer to bottom of left-column */
                z-index: 100;
            }
            
            .footer-content {
                font-size: 0.8em;
                color: var(--text-secondary);
                text-align: center;
                line-height: 1.4;
                word-wrap: break-word;
                width: 100%;
            }
            
            .header {
                position: fixed; /* Fixed positioning like left-column */
                left: 250px; /* Start at right edge of left-column */
                right: 0; /* Extend to right edge of viewport */
                top: 0;
                background: var(--card-bg);
                backdrop-filter: blur(10px);
                box-shadow: 0 2px 20px var(--shadow);
                transition: background 0.3s ease, box-shadow 0.3s ease;
                padding: 1rem 0;
                z-index: 100;
                height: 72px; /* Fixed height */
                box-sizing: border-box;
            }
            
            .header-content {
                height: 2.5rem;
                line-height: 1;
                padding: 0 2rem;
                margin: 0;
                max-width: none;
                width: 100%;
                box-sizing: border-box;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            
            .header .logo img {
                display: none;
            }
            
            .header .logo-text {
                display: block;
            }
        }
        
        @media (max-width: 768px) {
            .top-bar {
                display: block !important;
                position: sticky;
                top: 0;
                z-index: 100;
            }
            
            .desktop-logo-container {
                display: none !important;
            }
            
            /* On mobile, hide logo but allow sidebar and footer to be shown */
            .left-column {
                position: fixed;
                left: 0;
                right: 0;
                width: 100%;
                height: auto;
                flex-direction: column;
                top: auto;
                z-index: 97; /* Below nav (99) but above content */
                pointer-events: auto; /* Allow clicks on sidebar and footer */
                display: none;
            }
            
            .left-column.active {
                display: flex;
            }
            
            /* Hide logo on mobile */
            .left-column .desktop-logo-container {
                display: none !important;
            }
            
            /* Show sidebar on mobile when left-column is active */
            .left-column .sidebar {
                position: relative !important;
                left: auto !important;
                right: auto !important;
                top: auto !important;
                width: 100% !important;
                height: auto !important;
                max-height: none !important;
                background: var(--sidebar-bg) !important;
                backdrop-filter: blur(10px) !important;
                padding: 1rem !important;
                border-right: none !important;
                border-top: 1px solid var(--border-color) !important;
                z-index: auto !important;
                overflow-y: auto !important;
                box-sizing: border-box !important;
                pointer-events: auto !important;
                display: block !important;
                flex: 0 0 auto;
            }
            
            /* Show footer on mobile when left-column is active */
            .left-column .desktop-footer-container {
                position: relative !important;
                left: auto !important;
                right: auto !important;
                top: auto !important;
                width: 100% !important;
                background: var(--card-bg) !important;
                backdrop-filter: blur(10px) !important;
                padding: 1rem !important;
                box-shadow: 0 -2px 20px var(--shadow) !important;
                z-index: auto !important;
                box-sizing: border-box !important;
                pointer-events: auto !important;
                display: flex !important;
                flex: 0 0 auto;
                margin-top: 0;
            }
            
            .header {
                width: 100%;
                display: block !important;
                flex: none !important;
                align-self: stretch !important;
            }
            
            /* Header adjustments */
            .header-content {
                padding: 0 1rem;
                flex-wrap: wrap;
            }
            
            .logo img {
                height: 36px;
                max-width: 180px;
            }
            
            .logo-text {
                font-size: 1.4rem;
            }
        }


        .nav {
            display: flex;
            gap: 2rem;
            align-items: center;
        }
        
        /* Dark mode toggle */
        .theme-toggle {
            position: relative;
            width: 60px;
            height: 30px;
            background: var(--border-color);
            border-radius: 15px;
            cursor: pointer;
            transition: background 0.3s ease;
            border: none;
            outline: none;
        }
        
        .theme-toggle:hover {
            background: var(--text-secondary);
        }
        
        .theme-toggle::before {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 24px;
            height: 24px;
            background: var(--bg-primary);
            border-radius: 50%;
            transition: transform 0.3s ease;
            box-shadow: 0 2px 4px var(--shadow);
        }
        
        [data-theme="dark"] .theme-toggle::before {
            transform: translateX(30px);
        }
        
        .theme-toggle-icon {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            font-size: 12px;
            transition: opacity 0.3s ease;
        }
        
        .theme-toggle-icon.sun {
            left: 8px;
            /* No color property - emoji uses natural yellow color for better contrast */
        }
        
        .theme-toggle-icon.moon {
            right: 8px;
            color: #FFD700; /* Gold/yellow to match moon emoji color - 8.6:1 on #404040 */
            opacity: 0;
            visibility: hidden; /* Completely hide from accessibility tools in light mode */
        }
        
        [data-theme="dark"] .theme-toggle-icon.sun {
            opacity: 0;
            visibility: hidden;
        }
        
        [data-theme="dark"] .theme-toggle-icon.moon {
            opacity: 1;
            visibility: visible;
            color: #FFD700; /* Gold/yellow to match moon emoji color - 8.6:1 on #404040 */
        }
        
        /* Explicitly show sun in light mode */
        .theme-toggle-icon.sun {
            opacity: 1;
            visibility: visible;
        }
        .nav select, .nav a {
            color: var(--text-primary);
            text-decoration: none;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
            background: var(--bg-primary);
            font-size: 1rem;
            height: 2.5rem;
            display: inline-flex;
            align-items: center;
            box-sizing: border-box;
        }
        .nav-social-group {
            display: inline-flex;
            gap: 0;
            align-items: center;
        }
        .nav .nav-social-link {
            padding: 0.59375rem;
            width: 2.375rem;
            height: 2.375rem;
            min-width: 2.375rem;
            min-height: 2.375rem;
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
        }
        .nav .nav-social-link .nav-social-icon {
            display: block;
            width: 1.1875rem;
            height: 1.1875rem;
            min-width: 1.1875rem;
            min-height: 1.1875rem;
            flex-shrink: 0;
        }
        .nav select {
            cursor: pointer;
        }
        .nav select:hover, .nav a:hover {
            background: var(--hover-bg);
            color: var(--hover-text);
            border-color: var(--hover-bg);
        }
        .container {
            display: flex;
            min-height: calc(100vh - 80px);
        }
        .sidebar {
            width: 100%; /* Full width of left-column */
            background: var(--sidebar-bg);
            backdrop-filter: blur(10px);
            padding: 20px;
            border-right: 1px solid var(--border-color);
            flex-shrink: 0;
            overflow-y: auto;
            box-sizing: border-box;
            transition: background 0.3s ease, border-color 0.3s ease;
            z-index: 99; /* Below top-bar (100) but above content */
            pointer-events: auto; /* Ensure clicks work */
        }
        
        @media (min-width: 769px) {
            .container {
                display: block; /* Not flex on desktop - left-column is in top-bar */
                position: relative;
                margin-top: 72px; /* Start below fixed header bar */
                margin-left: 250px; /* Shift right to account for left-column */
                z-index: 1;
                width: calc(100% - 250px); /* Account for left-column width */
                box-sizing: border-box;
            }
            .main-content {
                margin-top: 0; /* Already accounted for by container padding */
                position: relative;
                z-index: 1;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
            }
            .charts-container {
                position: relative;
                z-index: 1;
            }
            .chart-wrapper {
                position: relative;
                z-index: 1;
            }
            /* Note: .left-column styles are defined in header_styles.html */
            
            .sidebar {
                /* Sidebar is now in left-column, positioned between logo and footer */
                /* It will flex to fill space between logo (250px) and footer */
                flex: 1;
                min-height: 0; /* Allow flex shrinking */
                overflow-y: auto; /* Scrollable */
            }
        }
        .main-content {
            flex: 1;
            padding: 20px 30px;
            overflow-x: auto;
            min-width: 0; /* Prevent flex item from overflowing */
            max-width: 100%; /* Prevent content from exceeding container width */
            box-sizing: border-box; /* Include padding in width calculation */
        }
        .charts-container {
            display: flex;
            gap: 20px;
            margin: 20px 0;
            flex-wrap: wrap;
        }
        .chart-wrapper {
            flex: 1;
            min-width: 400px;
            background: var(--bg-primary);
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 1px 3px var(--shadow);
            transition: background 0.3s ease, box-shadow 0.3s ease;
            position: relative;
            z-index: 1;
            max-width: 100%;
            box-sizing: border-box;
        }
        .chart-wrapper button {
            position: relative;
            z-index: 101;
            pointer-events: auto;
        }
        .shared-legend-container {
            width: 100%;
            margin: 20px 0;
            padding: 10px 15px;
            background: var(--bg-primary);
            border-radius: 8px;
            box-shadow: 0 1px 3px var(--shadow);
            transition: background 0.3s ease, box-shadow 0.3s ease;
            box-sizing: border-box;
        }
        .legend-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 0;
            font-weight: bold;
            font-size: 1.1em;
            color: var(--text-primary);
            user-select: none;
            transition: background 0.2s ease;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 10px;
        }
        .legend-header:hover {
            background: var(--bg-secondary);
            border-radius: 4px;
        }
        .legend-toggle {
            display: inline-block;
            font-size: 0.9em;
            cursor: pointer;
            transition: transform 0.2s ease;
        }
        .legend-title {
            flex: 1;
        }
        .legend-content {
            transition: max-height 0.3s ease, opacity 0.3s ease;
            overflow: hidden;
        }
        .legend-content.legend-collapsed {
            max-height: 0;
            opacity: 0;
            margin: 0;
            padding: 0;
        }
        .legend-controls {
            display: flex;
            gap: 8px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        .legend-controls button {
            padding: 4px 8px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: #ffffff; /* White background for WCAG AA contrast (4.5:1+) with black text */
            cursor: pointer;
            font-size: 0.9em;
            color: #000000; /* Black text for WCAG AA contrast on white background */
            transition: all 0.3s ease;
        }
        [data-theme="dark"] .legend-controls button {
            background: #ffffff; /* Keep white background in dark mode */
            color: #000000; /* Black text for contrast */
        }
        .legend-controls button:hover {
            background: var(--bg-secondary);
        }
        [data-theme="dark"] .legend-controls button:hover {
            background: #e0e0e0; /* Light gray hover in dark mode */
        }
        .legend-items {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            gap: 8px;
            row-gap: 4px;
        }
        .legend-item {
            display: flex;
            align-items: center;
            margin: 2px 5px;
            font-size: 0.9em;
        }
        .legend-color {
            width: 16px;
            height: 3px;
            margin-right: 6px;
            border-radius: 1px;
        }
        /* Column group headers */
        .column-group-header {
            background: var(--bg-secondary);
            font-weight: bold;
            text-align: center;
            padding: 8px;
            border: 1px solid var(--border-color);
            position: relative;
            user-select: none;
            transition: background 0.2s ease;
            white-space: normal;
            word-break: normal;
            overflow-wrap: break-word;
            line-height: 1.3;
        }
        .column-group-header:hover {
            background: var(--hover-bg);
            color: var(--hover-text);
        }
        .group-toggle {
            display: inline-block;
            margin-right: 5px;
            font-size: 0.9em;
            cursor: pointer;
        }
        .column-groups th[rowspan] {
            vertical-align: middle;
        }
        /* Hide collapsed columns */
        .column-collapsed {
            display: none !important;
        }
        /* Spacer column for collapsed groups */
        .spacer-column {
            width: 20px !important;
            min-width: 20px !important;
            max-width: 20px !important;
            padding: 4px !important;
            border: 1px solid var(--border-color) !important;
        }
        /* Mobile: initial state handled by JavaScript, no CSS override needed */

        table {
            border-collapse: collapse;
            margin: 20px 0;
            width: 100%;
            min-width: 800px; /* Ensure table doesn't get too squeezed */
            background: var(--bg-primary);
            transition: background 0.3s ease;
        }
        th, td {
            border: 1px solid var(--border-color);
            padding: 8px;
            text-align: left;
            white-space: nowrap; /* Prevent cell content from wrapping */
            transition: border-color 0.3s ease;
        }
        /* Allow Championship Odds condensed header to wrap */
        th.condensed-header[data-group="championship-odds"] {
            white-space: normal !important;
            word-break: normal;
            word-wrap: break-word;
            overflow-wrap: break-word;
            line-height: 1.2;
            hyphens: none;
            width: 100px !important; /* Fixed width to force wrapping to two lines */
            max-width: 100px !important;
            min-width: 100px !important;
        }
        th {
            background-color: var(--bg-secondary);
            position: sticky;
            top: 0;
            z-index: 1;
            color: var(--text-primary);
            transition: background-color 0.3s ease, color 0.3s ease;
        }
        td {
            color: #000000;
            transition: color 0.3s ease;
        }
        
        /* Dark mode table text should be black for readability */
        [data-theme="dark"] td {
            color: #000000;
        }
        tr.playoff-line {
            border-bottom: 2px solid #28a745;
        }
        tr.wildcard-line {
            border-bottom: 2px solid #ffc107;
        }
        
        /* Playoff chance background colors */
        tr.playoff-exact-100 {
            background-color: #6c9b7a !important; /* Dark green for exactly 100% */
            color: #000000 !important; /* Black text for WCAG AA contrast on dark green */
        }
        tr.playoff-exact-100 td {
            color: #000000 !important; /* Black text for all cells in exact-100 rows */
        }
        tr.playoff-exact-100 td a {
            color: #000000 !important; /* Black text for links in exact-100 rows */
        }
        tr.playoff-high {
            background-color: #8db89a !important; /* Medium green for 75.00-99.99% */
            color: #000000 !important; /* Black text for WCAG AA contrast on medium green */
        }
        tr.playoff-high td {
            color: #000000 !important; /* Black text for all cells in high rows */
        }
        tr.playoff-high td a {
            color: #000000 !important; /* Black text for links in high rows */
        }
        tr.playoff-medium {
            background-color: #b8d5c4 !important; /* Light green for 50.01-74.99% */
        }
        tr.playoff-exact-50 {
            background-color: #e9ecef !important; /* Light gray for exactly 50.00% in light mode */
            color: #000000 !important; /* Black text for contrast on light gray */
        }
        tr.playoff-exact-50 td {
            color: #000000 !important; /* Black text for all cells in 50% rows */
        }
        tr.playoff-exact-50 td a {
            color: #000000 !important; /* Black text for links in 50% rows */
        }
        tr.playoff-low {
            background-color: #f5c6cb !important; /* Light red for 25.00-49.99% */
            color: #000000 !important; /* Black text for contrast on light red */
        }
        tr.playoff-low td {
            color: #000000 !important; /* Black text for all cells in low rows */
        }
        tr.playoff-low td a {
            color: #000000 !important; /* Black text for links in low rows */
        }
        tr.playoff-very-low {
            background-color: #e8a5a5 !important; /* Medium red for 0.01-24.99% */
            color: #000000 !important; /* Black text for contrast on medium red */
        }
        tr.playoff-very-low td {
            color: #000000 !important; /* Black text for all cells in very-low rows */
        }
        tr.playoff-very-low td a {
            color: #000000 !important; /* Black text for links in very-low rows */
        }
        tr.playoff-exact-0 {
            background-color: #d67a7a !important; /* Dark red for exactly 0% (matches legend) */
            color: #ffffff !important; /* White text for contrast on dark red */
        }
        tr.playoff-exact-0 td {
            color: #ffffff !important; /* White text for all cells in exact-0 rows */
        }
        tr.playoff-exact-0 td a {
            color: #ffffff !important; /* White text for links in exact-0 rows */
        }
        
        /* Dark mode playoff chance colors - same as light mode except for exact-50 */
        [data-theme="dark"] tr.playoff-exact-100 {
            background-color: #6c9b7a !important; /* Same dark green as light mode */
            color: #000000 !important; /* Black text for WCAG AA contrast on dark green */
        }
        [data-theme="dark"] tr.playoff-exact-100 td {
            color: #000000 !important; /* Black text for all cells in exact-100 rows */
        }
        [data-theme="dark"] tr.playoff-exact-100 td a {
            color: #000000 !important; /* Black text for links in exact-100 rows */
        }
        [data-theme="dark"] tr.playoff-high {
            background-color: #8db89a !important; /* Same medium green as light mode */
            color: #000000 !important; /* Black text for WCAG AA contrast on medium green */
        }
        [data-theme="dark"] tr.playoff-high td {
            color: #000000 !important; /* Black text for all cells in high rows */
        }
        [data-theme="dark"] tr.playoff-high td a {
            color: #000000 !important; /* Black text for links in high rows */
        }
        [data-theme="dark"] tr.playoff-medium {
            background-color: #b8d5c4 !important; /* Same light green as light mode */
            color: #000000 !important; /* Black text for contrast on light green */
        }
        [data-theme="dark"] tr.playoff-medium td {
            color: #000000 !important; /* Black text for all cells in medium rows */
        }
        [data-theme="dark"] tr.playoff-medium td a {
            color: #000000 !important; /* Black text for links in medium rows */
        }
        [data-theme="dark"] tr.playoff-exact-50 {
            background-color: var(--bg-secondary) !important; /* Dark gray for exactly 50.00% in dark mode */
            color: #ffffff !important; /* White text for contrast on dark gray */
        }
        [data-theme="dark"] tr.playoff-exact-50 td {
            color: #ffffff !important; /* White text for all cells in 50% rows */
        }
        [data-theme="dark"] tr.playoff-exact-50 td a {
            color: #ffffff !important; /* White text for links in 50% rows */
        }
        
        /* Legend color for exact-50 that matches table rows */
        .legend-exact-50 {
            background-color: #e9ecef !important; /* Light gray for light mode (matches table rows) */
        }
        [data-theme="dark"] .legend-exact-50 {
            background-color: var(--bg-secondary) !important; /* Dark gray in dark mode (matches table rows) */
        }
        /* Legend color for exact-0 that matches table rows */
        .legend-exact-0 {
            background-color: #d67a7a !important; /* Red for exactly 0% in light mode */
        }
        [data-theme="dark"] .legend-exact-0 {
            background-color: #d67a7a !important; /* Same dark red as light mode */
        }
        [data-theme="dark"] tr.playoff-low {
            background-color: #f5c6cb !important; /* Same light red as light mode */
            color: #000000 !important; /* Black text for contrast on light red */
        }
        [data-theme="dark"] tr.playoff-low td {
            color: #000000 !important; /* Black text for all cells in low rows */
        }
        [data-theme="dark"] tr.playoff-low td a {
            color: #000000 !important; /* Black text for links in low rows */
        }
        [data-theme="dark"] tr.playoff-very-low {
            background-color: #e8a5a5 !important; /* Same medium red as light mode */
            color: #000000 !important; /* Black text for contrast on medium red */
        }
        [data-theme="dark"] tr.playoff-very-low td {
            color: #000000 !important; /* Black text for all cells in very-low rows */
        }
        [data-theme="dark"] tr.playoff-very-low td a {
            color: #000000 !important; /* Black text for links in very-low rows */
        }
        [data-theme="dark"] tr.playoff-exact-0 {
            background-color: #d67a7a !important; /* Same dark red as light mode */
            color: #ffffff !important; /* White text for contrast on dark red */
        }
        [data-theme="dark"] tr.playoff-exact-0 td {
            color: #ffffff !important; /* White text for all cells in exact-0 rows */
        }
        [data-theme="dark"] tr.playoff-exact-0 td a {
            color: #ffffff !important; /* White text for links in exact-0 rows */
        }
        .playoff-change.positive::before {
            content: "+ ";
            color: #000000;
        }
        .playoff-change.positive {
            color: #000000;
        }
        .playoff-change.negative::before {
            content: "- ";
            color: #000000;
        }
        .playoff-change.negative {
            color: #000000;
        }
        .championship-change.positive::before {
            content: "+ ";
            color: #000000;
        }
        .championship-change.positive {
            color: #000000;
            font-weight: normal;
        }
        .championship-change.negative::before {
            content: "- ";
            color: #000000;
        }
        .championship-change.negative {
            color: #000000;
            font-weight: normal;
        }
        .last-game {
            white-space: nowrap;
        }
        nav {
            margin: 20px 0;
        }
        nav h2 {
            font-size: 1.2em;
            margin: 15px 0 10px;
            color: var(--text-primary);
            transition: color 0.3s ease;
        }
        nav h3.nav-collapsible {
            cursor: pointer;
            user-select: none;
            display: flex;
        }
        nav h3 .nav-collapsible {
            background: none;
            border: none;
            padding: 0;
            margin: 0;
            font-size: inherit;
            color: inherit;
            font-family: inherit;
            text-align: left;
            width: 100%;
            cursor: pointer;
            user-select: none;
        }
        nav h3 .nav-collapsible:focus {
            outline: 2px solid var(--hover-bg);
            outline-offset: 2px;
            border-radius: 2px;
        }
        nav h3 {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 15px;
        }
        nav h3.nav-collapsible .nav-toggle {
            font-size: 0.8em;
            transition: transform 0.2s;
        }
        .nav-toggle {
            background: none;
            border: none;
            padding: 0;
            margin: 0;
            cursor: pointer;
            font-size: inherit;
            color: inherit;
            font-family: inherit;
        }
        .nav-toggle:focus {
            outline: 2px solid var(--hover-bg);
            outline-offset: 2px;
            border-radius: 2px;
        }
        .nav-conference-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
        }
        .nav-conference-header a {
            flex: 1;
        }
        .nav-conference-header .nav-toggle {
            font-size: 0.8em;
            margin-left: 5px;
        }
        .nav-division-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
        }
        .nav-division-header a {
            flex: 1;
        }
        .nav-division-header .nav-toggle {
            font-size: 0.8em;
            margin-left: 5px;
        }
        .nav-decade-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            width: 100%;
            background: none;
            border: none;
            padding: 0;
            margin: 0;
            font-size: inherit;
            font-family: inherit;
            color: inherit;
            text-align: left;
        }
        .nav-decade-header:focus {
            outline: 2px solid var(--hover-bg);
            outline-offset: 2px;
            border-radius: 2px;
        }
        .nav-decade-label {
            flex: 1;
            font-weight: 600;
        }
        .nav-decade-header .nav-toggle-icon {
            font-size: 0.8em;
            margin-left: 5px;
        }
        .nav-collapsible-content {
            display: block;
        }
        .team-playoff-odds {
            color: var(--text-secondary);
            font-size: 0.85em;
            margin-left: 4px;
        }
        nav h3 {
            font-size: 1em;
            margin: 10px 0 5px;
            color: var(--text-secondary);
            transition: color 0.3s ease;
        }
        nav ul {
            list-style: none;
            padding-left: 0;
            margin: 0 0 15px;
        }
        nav ul ul {
            padding-left: 15px;
        }
        nav a {
            text-decoration: none;
            color: var(--hover-bg);
            display: block;
            padding: 4px 0;
            transition: color 0.3s ease;
        }
        nav a:hover {
            text-decoration: underline;
        }
        .legend {
            margin-top: 20px;
            font-size: 0.9em;
            padding: 10px;
            background-color: var(--bg-secondary);
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }
        .legend p {
            margin: 5px 0;
        }
        .last-updated {
            font-size: 0.8em;
            color: var(--text-secondary);
            margin-top: 20px;
            padding: 10px;
            background-color: var(--bg-secondary);
            border-radius: 4px;
            transition: background-color 0.3s ease, color 0.3s ease;
        }
        
        /* Big Games section styles */
        .big-games-section {
            margin-top: 30px;
            background: var(--bg-primary);
            padding: 20px;
            border-radius: 8px;
            transition: background 0.3s ease;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        .big-games-section h3 {
            color: var(--text-primary);
            margin-bottom: 20px;
            transition: color 0.3s ease;
        }

        .big-games-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 15px;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        .big-game-card {
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 15px 15px 15px 10px; /* Reduce left padding to move content left */
            box-shadow: 0 2px 4px var(--shadow);
            transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        .game-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
            transition: border-color 0.3s ease;
        }

        .game-date {
            font-weight: 600;
            color: var(--text-primary);
            transition: color 0.3s ease;
            line-height: 1.2;
        }
        
        .game-date-day {
            display: block;
        }
        
        .game-date-month {
            display: block;
        }
        
        /* Team name display - show full on desktop, abbreviation on mobile */
        .team-name-full {
            display: inline;
        }
        
        .team-name-abbr {
            display: none;
        }

        .importance-badge {
            background-color: #155724; /* Darker green for WCAG AA: #28a745 -> #155724 (4.5:1 with white text) */
            color: white;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.8em;
            font-weight: 500;
        }

        .game-matchup {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
            gap: 8px; /* Reduce gap between teams and vs */
        }

        .team {
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1;
            min-width: 0; /* Allow flex item to shrink below content size */
            max-width: 100%; /* Prevent overflow */
        }

        .team-name {
            font-weight: 600;
            font-size: 1.1em;
            color: var(--text-primary);
            margin-bottom: 4px;
            transition: color 0.3s ease;
            word-wrap: break-word;
            overflow-wrap: break-word;
            text-align: center;
            max-width: 100%;
        }

        .team-name a {
            color: var(--text-primary) !important;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .team-name a:hover {
            color: var(--hover-bg) !important;
        }
        [data-theme="dark"] .team-name a:hover {
            color: #5dade2 !important; /* Lighter blue for better contrast on dark background */
        }

        .team-stats {
            font-size: 0.9em;
            color: var(--text-secondary);
            transition: color 0.3s ease;
        }

        .compare-section {
            margin: 20px 0;
            padding: 15px;
            background: var(--bg-secondary);
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }

        .compare-section form {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .compare-section label {
            font-weight: bold;
            color: var(--text-primary);
        }

        .compare-section select {
            flex: 1;
            min-width: 200px;
            padding: 8px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: var(--bg-primary);
            color: var(--text-primary);
        }

        .compare-section button {
            padding: 8px 16px;
            background: #1a5f8f !important; /* Darker blue for WCAG AA contrast (4.5:1+) with white text */
            color: #ffffff !important;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.3s ease;
        }

        .compare-section button:hover {
            background: #155080 !important; /* Slightly darker on hover */
        }

        @media (max-width: 768px) {
            .compare-section form {
                flex-direction: column;
                align-items: stretch;
            }

            .compare-section select {
                width: 100%;
            }
        }

        .vs {
            font-weight: bold;
            color: var(--text-secondary);
            margin: 0 5px; /* Reduce horizontal margin to bring columns closer */
            font-size: 1.2em;
            transition: color 0.3s ease;
            flex-shrink: 0; /* Prevent vs from shrinking */
        }

        .game-reasons {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        .reason-tag {
            background-color: var(--bg-secondary);
            color: var(--text-primary);
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.8em;
            font-weight: 500;
            transition: background-color 0.3s ease, color 0.3s ease;
        }
        
        /* Mobile hamburger menu */
        .mobile-menu-toggle {
            display: none;
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            z-index: 101;
        }
        
        .mobile-menu-toggle span {
            width: 25px;
            height: 3px;
            background: var(--text-primary);
            border-radius: 2px;
            transition: all 0.3s ease;
        }
        
        .mobile-menu-toggle.active span:nth-child(1) {
            transform: rotate(45deg) translate(8px, 8px);
        }
        
        .mobile-menu-toggle.active span:nth-child(2) {
            opacity: 0;
        }
        
        .mobile-menu-toggle.active span:nth-child(3) {
            transform: rotate(-45deg) translate(7px, -7px);
        }
        
        /* Make the layout responsive */
        @media (max-width: 1024px) {
            .container {
                flex-direction: column;
                width: 100%;
                max-width: 100vw;
                overflow-x: hidden;
            }
            .sidebar {
                width: 100%;
                height: auto;
                position: static;
            }
            .main-content {
                padding: 20px;
            }
            .chart-wrapper {
                min-width: 100%;
            }
        }
        
        /* Mobile-specific styles (max-width: 768px) */
        @media (max-width: 768px) {
            /* Mobile menu toggle */
            .mobile-menu-toggle {
                display: flex;
            }
            
            /* Navigation - hide on mobile, show in mobile menu */
            .nav {
                display: none;
                position: fixed;
                top: 60px;
                left: 0;
                right: 0;
                background: var(--card-bg);
                backdrop-filter: blur(10px);
                flex-direction: column;
                padding: 1rem;
                gap: 1rem;
                box-shadow: 0 4px 20px var(--shadow);
                z-index: 99;
                max-height: none; /* Height will be determined by content */
                overflow: visible; /* Don't scroll, let content flow naturally */
            }
            
            .nav.active {
                display: flex;
            }
            
            .nav select, .nav a {
                width: 100%;
                justify-content: center;
                min-height: 44px; /* Touch-friendly size */
                font-size: 1rem;
            }
            
            /* Sidebar - hide on mobile, show in mobile menu below nav */
            /* Note: Sidebar is now inside .left-column, styles are handled in header_styles.html */
            /* No local styles needed here to avoid conflicts */
            
            /* Main content adjustments */
            .main-content {
                padding: 1rem;
                width: 100%;
            }
            
            /* Touch-friendly controls */
            button, .nav a, .nav select, .theme-toggle {
                min-height: 44px;
                min-width: 44px;
            }
            
            /* Tables - ensure horizontal scroll */
            .table-responsive {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                width: 100%;
                display: block;
                max-width: 100vw; /* Prevent overflow beyond viewport */
            }
            
            /* Override table min-width on mobile */
            table {
                min-width: auto !important; /* Remove fixed min-width on mobile */
                width: 100%;
                font-size: 0.85em;
            }
            
            table th, table td {
                padding: 8px 4px;
                white-space: nowrap;
            }
            
            /* Charts */
            .charts-container {
                flex-direction: column;
            }
            
            .chart-wrapper {
                min-width: auto !important;
                width: 100%;
                max-width: 100vw;
                box-sizing: border-box;
                overflow-x: hidden;
            }
            
            /* Ensure chart canvas doesn't overflow */
            .chart-wrapper canvas {
                max-width: 100% !important;
                height: auto !important;
            }
            
            /* Big Games section - reduce spacing on mobile */
            .big-games-section {
                padding: 10px;
                margin-top: 20px;
            }
            
            .big-games-section h3 {
                margin-bottom: 10px;
            }
            
            .big-games-container {
                grid-template-columns: repeat(2, 1fr); /* Force 2 columns on mobile */
                gap: 6px; /* Smaller gap to fit two columns */
                min-width: 0; /* Allow grid to shrink */
            }
            
            .big-game-card {
                padding: 8px 6px 8px 6px; /* Reduced padding to make cards smaller */
                min-width: 0; /* Allow card to shrink */
            }
            
            .game-header {
                margin-bottom: 8px;
                padding-bottom: 6px;
            }
            
            .game-matchup {
                margin-bottom: 8px;
                gap: 4px; /* Even smaller gap on mobile */
            }
            
            .vs {
                margin: 0 3px; /* Smaller margin on mobile */
                font-size: 1em; /* Slightly smaller vs on mobile */
            }
            
            /* Show abbreviations instead of full names on mobile */
            .team-name-full {
                display: none !important;
            }
            
            .team-name-abbr {
                display: inline !important;
            }
            
            /* Reduce font sizes on mobile for game cards */
            .team-name {
                font-size: 0.9em; /* Smaller team name font */
            }
            
            .team-stats {
                font-size: 0.75em; /* Smaller stats font */
            }
            
            .importance-badge {
                font-size: 0.65em; /* Smaller badge font */
                padding: 1px 4px; /* Less padding */
            }
            
            /* Hide "Importance:" label on mobile, just show number */
            .importance-badge::before {
                content: '';
            }
            
            .game-header {
                flex-wrap: wrap; /* Allow header to wrap if needed */
                gap: 4px; /* Small gap between date and badge */
            }
            
            /* Date sizing - both equal and larger on mobile */
            .game-date-day {
                font-size: 1em; /* Equal size with month/day */
            }
            
            .game-date-month {
                font-size: 1em; /* Equal size with day of week */
            }
            
            /* Reduce game reasons spacing on mobile */
            .game-reasons {
                margin-top: 6px;
                gap: 3px;
            }
            
            .reason-tag {
                font-size: 0.7em;
                padding: 2px 4px;
            }
            
            /* Collapsible sections - default to collapsed on mobile */
            /* Note: JavaScript uses .legend-collapsed class, so we need to ensure
               that when .legend-collapsed is removed, the content is visible */
            .legend-content.legend-collapsed {
                max-height: 0 !important;
                opacity: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
                overflow: hidden !important;
            }
            
            /* When not collapsed, show the content */
            .legend-content:not(.legend-collapsed) {
                max-height: none !important;
                opacity: 1 !important;
                overflow: visible !important;
                display: block !important;
                margin: inherit !important;
                padding: inherit !important;
            }
            
            /* Column group headers - larger touch targets */
            .column-group-header {
                min-height: 44px;
                padding: 12px 8px;
            }
            
            /* Form elements */
            input, select, textarea, button {
                font-size: 16px; /* Prevents zoom on iOS */
                min-height: 44px;
            }
            
            /* Spacing adjustments */
            .main-content > * {
                margin-bottom: 1rem;
            }
            
            h1 {
                font-size: 1.8rem;
            }
            
            h2 {
                font-size: 1.5rem;
            }
            
            h3 {
                font-size: 1.3rem;
            }
        }
        
        /* Tablet-specific styles (769px - 1024px) */
        @media (min-width: 769px) and (max-width: 1024px) {
            .header-content {
                padding: 0 1.5rem;
                max-width: none;
                width: 100%;
                box-sizing: border-box;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            
            .main-content {
                padding: 1.5rem;
            }
            
            .nav {
                gap: 1rem;
            }
            
            .nav select, .nav a {
                padding: 0.4rem 0.8rem;
                font-size: 0.9rem;
            }
        }


/* Sort indicators + condensed headers (was injected via <style> in site.js; blocked by style-src) */
th[data-sort="asc"]::after { content: " ▲"; }
th[data-sort="desc"]::after { content: " ▼"; }
.condensed-header {
    cursor: pointer !important;
    user-select: none;
    transition: background-color 0.2s ease;
}
.condensed-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.condensed-header[data-group="championship-odds"] {
    white-space: normal;
    word-break: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    padding: 4px 8px;
    hyphens: none;
    min-width: 80px;
    max-width: 120px;
}

/* SCS-208 — utility classes replacing inline style="" */
.is-hidden { display: none !important; }
.is-block { display: block; }
.flex-center-gap-5 {
    display: flex;
    align-items: center;
    gap: 5px;
}
.flex-center-gap-10 {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}
.flex-between-mb-10 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.view-btn {
    padding: 5px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.view-btn-compact {
    padding: 5px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.logo-sm {
    object-fit: contain;
    margin-right: 5px;
    vertical-align: middle;
}
.logo-md {
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}
.logo-only {
    object-fit: contain;
    flex-shrink: 0;
}
.logo-40 { width: 40px; height: 40px; }
.logo-50 { width: 50px; height: 50px; }
.logo-60 { width: 60px; height: 60px; }
.logo-75 { width: 75px; height: 75px; }
.help-link {
    text-decoration: none;
    font-size: 0.7em;
}
.help-link-sm {
    text-decoration: none;
    font-size: 0.6em;
}
.link-muted-xs {
    text-decoration: none;
    color: #495057;
    font-size: 0.5em;
}
.link-accent {
    color: #1a5f8f;
}
.legend-swatch {
    width: 20px;
    height: 15px;
    border: 1px solid #ccc;
}
.legend-swatch-elim-light { background-color: #f5c6cb; }
.legend-swatch-elim-dark { background-color: #e8a5a5; }
.legend-swatch-clinch-light { background-color: #b8d5c4; }
.legend-swatch-clinch-mid { background-color: #8db89a; }
.legend-swatch-clinch-dark { background-color: #6c9b7a; }
.section-mt-30 { margin-top: 30px; }
.section-mb-30-center { margin-bottom: 30px; text-align: center; }
.margin-0 { margin: 0; }
.full-width-mt-05 {
    margin: 0.5rem 0;
    width: 100%;
}
.bold-mt-10 {
    font-weight: bold;
    margin-top: 10px;
}
.btn-save-view {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    height: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.compare-score-input {
    max-width: 300px;
    padding: 12px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}
.nav-decade-panel.is-collapsed { display: none; }
.nav-decade-panel.is-expanded { display: block; }

.view-buttons-row { display: flex; gap: 5px; }
.view-nav-buttons-row { display: none; flex-direction: row; gap: 5px; }
.legend-flex-wrap { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; }
