/* =====================================================
           1. CSS VARIABLES AND RESET
           ===================================================== */
        :root {
            /* Colour Scheme - Data-Dashboard (Analytical) */
            --color-primary: #0A5F38;
            --color-secondary: #C9A227;
            --color-accent: #1A2B4A;
            --color-bg: #F8F7F4;
            --color-text: #2D2D2D;
            --color-success: #10B981;
            --color-warning: #F59E0B;
            --color-danger: #DC2626;
            
            /* Derived colours */
            --color-surface: #FFFFFF;
            --color-border: #E5E3DE;
            --color-text-secondary: #5A5A5A;
            --color-text-muted: #7A7A7A;
            
            /* Typography */
            --font-display: 'DM Sans', sans-serif;
            --font-body: 'DM Sans', sans-serif;
            --font-mono: 'JetBrains Mono', monospace;
            
            /* Sizes */
            --h1-size: clamp(2rem, 5vw, 3rem);
            --h2-size: clamp(1.625rem, 4vw, 2.25rem);
            --h3-size: clamp(1.25rem, 3vw, 1.5rem);
            --body-size: clamp(1rem, 2vw, 1.125rem);
            --small-size: clamp(0.8125rem, 1.5vw, 0.875rem);
            --caption-size: clamp(0.6875rem, 1vw, 0.75rem);
            
            /* Spacing */
            --section-gap: clamp(3rem, 8vw, 5rem);
            --content-max-width: 820px;
            --sidebar-width: 260px;
            
            /* Shadows */
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
            --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
        
    /* --- AUTO-FORCED DARK THEME --- */
    --color-bg: #1A1A1A;
                --color-text: #E8E6E3;
                --color-surface: #252525;
                --color-border: #3A3A3A;
                --color-text-secondary: #B0B0B0;
                --color-text-muted: #888888;
                --color-primary: #12A868;
                --color-secondary: #D4AF37;
                --color-accent: #2E4A7A;
}
        
        /* Dark theme */
        
        
        /* Reset */
        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        html {
            scroll-behavior: smooth;
        }
        
        body {
            font-family: var(--font-body);
            font-size: var(--body-size);
            line-height: 1.6;
            color: var(--color-text);
            background-color: var(--color-bg);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        /* =====================================================
           2. GENERAL TYPOGRAPHY
           ===================================================== */
        h1, h2, h3, h4, h5, h6 {
            font-family: var(--font-display);
            font-weight: 700;
            line-height: 1.2;
            text-align: left;
            color: var(--color-text);
        }
        
        h2 {
            font-size: var(--h2-size);
            margin-bottom: 1.5rem;
            letter-spacing: -0.01em;
            scroll-margin-top: 2rem;
        }
        
        h3 {
            font-size: var(--h3-size);
            margin-top: 2rem;
            margin-bottom: 1rem;
            scroll-margin-top: 2rem;
        }
        
        p {
            text-align: left;
            margin-bottom: 1.25rem;
        }
        
        a {
            color: var(--color-primary);
            text-decoration: underline;
            text-underline-offset: 2px;
            transition: color 0.2s ease;
        }
        
        a:hover {
            color: var(--color-secondary);
        }
        
        a:focus {
            outline: 2px solid var(--color-primary);
            outline-offset: 2px;
        }
        
        strong {
            font-weight: 600;
        }
        
        em {
            font-style: italic;
        }
        
        ul, ol {
            text-align: left;
            margin-bottom: 1.25rem;
            padding-left: 1.5rem;
        }
        
        li {
            margin-bottom: 0.5rem;
        }
        
        blockquote {
            text-align: left;
            border-left: 3px solid var(--color-secondary);
            padding-left: 1.5rem;
            margin: 1.5rem 0;
            font-style: italic;
            color: var(--color-text-secondary);
        }
        
        figure {
            margin: 2rem auto;
            max-width: 100%;
        }
        
        figcaption {
            text-align: center;
            font-size: var(--small-size);
            color: var(--color-text-muted);
            margin-top: 0.75rem;
        }
        
        img {
            max-width: 100%;
            height: auto;
            display: block;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
            font-size: var(--small-size);
        }
        
        th, td {
            text-align: left;
            padding: 0.875rem 1rem;
            border-bottom: 1px solid var(--color-border);
        }
        
        th {
            font-weight: 600;
            background-color: var(--color-surface);
            position: sticky;
            top: 0;
        }
        
        tbody tr:nth-child(even) {
            background-color: rgba(0, 0, 0, 0.02);
        }
        
        @media (prefers-color-scheme: dark) {
            tbody tr:nth-child(even) {
                background-color: rgba(255, 255, 255, 0.03);
            }
        }
        
        /* =====================================================
           3. LAYOUT - MAIN AND SECTIONS
           ===================================================== */
        header {
            position: relative;
        }
        
        main {
            width: 100%;
            display: grid;
            grid-template-columns: var(--sidebar-width) 1fr;
            gap: 3rem;
            max-width: calc(var(--sidebar-width) + var(--content-max-width) + 6rem);
            margin: 0 auto;
            padding: 0 1.5rem;
        }
        
        [data-content] {
            grid-column: 2;
            max-width: var(--content-max-width);
            padding: var(--section-gap) 0;
        }
        
        [data-content="hero"] {
            grid-column: 1 / -1;
            max-width: none;
            padding: 0;
            width: 100vw;
            margin-left: calc(50% - 50vw);
        }
        
        [data-content="toc"] {
            grid-column: 1;
            grid-row: 2 / 20;
            max-width: var(--sidebar-width);
            padding-top: var(--section-gap);
        }
        
        [data-content="intro"] {
            padding-top: 2rem;
        }
        
        /* =====================================================
           4. COMPONENTS
           ===================================================== */
        
        /* Info Box */
        .info-box {
            background-color: var(--color-surface);
            border: 1px solid var(--color-border);
            border-left: 4px solid var(--color-primary);
            border-radius: 4px;
            padding: 1.25rem 1.5rem;
            margin: 1.5rem 0;
            box-shadow: var(--shadow-sm);
        }
        
        .info-box p {
            text-align: left;
            margin-bottom: 0;
            color: var(--color-text);
        }
        
        .info-box p:last-child {
            margin-bottom: 0;
        }
        
        .info-box strong {
            color: var(--color-primary);
        }
        
        /* Odds Example */
        .odds-example {
            background-color: var(--color-accent);
            color: var(--color-bg);
            border-radius: 6px;
            padding: 1.5rem 2rem;
            margin: 2rem 0;
            box-shadow: var(--shadow-md);
        }
        
        .odds-example p {
            text-align: center;
            color: var(--color-bg);
            margin-bottom: 0.75rem;
        }
        
        .odds-example p:last-child {
            margin-bottom: 0;
        }
        
        .odds-example strong {
            font-family: var(--font-mono);
            font-size: 1.5em;
            color: var(--color-secondary);
        }
        
        @media (prefers-color-scheme: dark) {
            .odds-example {
                background-color: #1A2B4A;
                color: #E8E6E3;
            }
            
            .odds-example p {
                color: #E8E6E3;
            }
        }
        
        /* Callout Tip */
        .callout-tip {
            background-color: rgba(16, 185, 129, 0.08);
            border-left: 4px solid var(--color-success);
            border-radius: 0 4px 4px 0;
            padding: 1.25rem 1.5rem;
            margin: 1.5rem 0;
        }
        
        .callout-tip p {
            text-align: left;
            color: var(--color-text);
            margin-bottom: 0;
        }
        
        .callout-tip strong {
            color: var(--color-success);
        }
        
        /* Callout Warning */
        .callout-warning {
            background-color: rgba(245, 158, 11, 0.08);
            border-left: 4px solid var(--color-warning);
            border-radius: 0 4px 4px 0;
            padding: 1.25rem 1.5rem;
            margin: 1.5rem 0;
        }
        
        .callout-warning p {
            text-align: left;
            color: var(--color-text);
            margin-bottom: 0;
        }
        
        .callout-warning strong {
            color: var(--color-warning);
        }
        
        /* Key Takeaway */
        .key-takeaway {
            border-top: 2px solid var(--color-secondary);
            padding-top: 1.25rem;
            margin: 2rem 0;
        }
        
        .key-takeaway p {
            text-align: left;
            font-family: var(--font-display);
            font-size: clamp(1.125rem, 2.5vw, 1.25rem);
            font-weight: 600;
            line-height: 1.5;
            color: var(--color-text);
            margin-bottom: 0;
        }
        
        /* Step Guide */
        .step-guide {
            background-color: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 6px;
            padding: 1.5rem;
            margin: 1.5rem 0;
            box-shadow: var(--shadow-sm);
        }
        
        .step-guide p {
            text-align: left;
            font-family: var(--font-mono);
            font-size: var(--small-size);
            line-height: 1.6;
            color: var(--color-text);
            margin-bottom: 0.5rem;
        }
        
        .step-guide p:first-child {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: var(--body-size);
            margin-bottom: 1rem;
            color: var(--color-primary);
        }
        
        .step-guide p:last-child {
            margin-bottom: 0;
        }
        
        /* Stat Highlight */
        .stat-highlight {
            background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
            color: #FFFFFF;
            border-radius: 8px;
            padding: 2rem;
            margin: 2rem 0;
            text-align: center;
            box-shadow: var(--shadow-md);
        }
        
        .stat-highlight p {
            text-align: center;
            color: #FFFFFF;
            margin-bottom: 0.5rem;
        }
        
        .stat-highlight p:last-child {
            margin-bottom: 0;
        }
        
        .stat-highlight strong {
            display: block;
            font-family: var(--font-mono);
            font-size: clamp(2rem, 5vw, 2.5rem);
            font-weight: 700;
            color: var(--color-secondary);
        }
        
        /* Card Grid */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin: 2rem 0;
        }
        
        .card-grid > div {
            background-color: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 6px;
            padding: 1.25rem;
            box-shadow: var(--shadow-sm);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        
        .card-grid > div:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        
        .card-grid p {
            text-align: left;
            color: var(--color-text);
            margin-bottom: 0;
        }
        
        .card-grid strong {
            color: var(--color-primary);
        }
        
        /* Comparison */
        .comparison {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin: 2rem 0;
        }
        
        .comparison > div {
            background-color: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 6px;
            padding: 1.5rem;
            box-shadow: var(--shadow-sm);
        }
        
        .comparison > div:first-child {
            border-top: 3px solid var(--color-primary);
        }
        
        .comparison > div:last-child {
            border-top: 3px solid var(--color-secondary);
        }
        
        .comparison h4 {
            font-size: var(--small-size);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 1rem;
            color: var(--color-text-secondary);
        }
        
        .comparison p, .comparison li {
            text-align: left;
            color: var(--color-text);
        }
        
        @media (max-width: 600px) {
            .comparison {
                grid-template-columns: 1fr;
            }
        }
        
        /* TL;DR */
        .tldr {
            background-color: var(--color-surface);
            border-left: 4px solid var(--color-secondary);
            border-radius: 0 6px 6px 0;
            padding: 1.5rem 2rem;
            margin: 2rem 0;
            box-shadow: var(--shadow-sm);
        }
        
        .tldr h2 {
            font-size: clamp(1.125rem, 2vw, 1.25rem);
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--color-primary);
        }
        
        .tldr ul {
            margin-bottom: 0;
        }
        
        .tldr li {
            text-align: left;
            color: var(--color-text);
            margin-bottom: 0.75rem;
        }
        
        .tldr li:last-child {
            margin-bottom: 0;
        }
        
        /* Fun Fact */
        .fun-fact {
            position: relative;
            padding-left: 1.5rem;
            margin: 1.5rem 0;
            font-style: italic;
            color: var(--color-text-secondary);
        }
        
        .fun-fact::before {
            content: '—';
            position: absolute;
            left: 0;
            color: var(--color-secondary);
            font-weight: 600;
        }
        
        .fun-fact p {
            text-align: left;
            color: var(--color-text-secondary);
            margin-bottom: 0;
        }
        
        /* Glossary Term */
        .glossary-term {
            display: flex;
            align-items: baseline;
            gap: 12px;
            margin: 1rem 0;
        }
        
        .glossary-term strong {
            font-family: var(--font-mono);
            color: var(--color-primary);
            text-decoration: underline;
            text-underline-offset: 3px;
            flex-shrink: 0;
        }
        
        .glossary-term span {
            color: var(--color-text-secondary);
        }
        
        @media (max-width: 500px) {
            .glossary-term {
                flex-direction: column;
                gap: 4px;
            }
        }
        
        /* Dos and Don'ts */
        .dos-donts {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin: 2rem 0;
        }
        
        .dos-donts > div:first-child {
            border-left: 4px solid var(--color-success);
            padding-left: 1.25rem;
        }
        
        .dos-donts > div:last-child {
            border-left: 4px solid var(--color-danger);
            padding-left: 1.25rem;
        }
        
        .dos-donts h4 {
            font-size: var(--small-size);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.75rem;
        }
        
        .dos-donts > div:first-child h4 {
            color: var(--color-success);
        }
        
        .dos-donts > div:last-child h4 {
            color: var(--color-danger);
        }
        
        .dos-donts ul {
            padding-left: 0;
            list-style: none;
        }
        
        .dos-donts li {
            text-align: left;
            color: var(--color-text);
            padding-left: 1.25rem;
            position: relative;
        }
        
        .dos-donts > div:first-child li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: var(--color-success);
            font-weight: 600;
        }
        
        .dos-donts > div:last-child li::before {
            content: '✗';
            position: absolute;
            left: 0;
            color: var(--color-danger);
            font-weight: 600;
        }
        
        @media (max-width: 600px) {
            .dos-donts {
                grid-template-columns: 1fr;
            }
        }
        
        /* Pre-Bet Checklist */
        .pre-bet-checklist {
            margin: 2rem 0;
        }
        
        .pre-bet-checklist h4 {
            font-family: var(--font-display);
            font-size: var(--small-size);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--color-secondary);
            margin-bottom: 1rem;
        }
        
        .pre-bet-checklist ul {
            border-left: 2px solid var(--color-border);
            padding-left: 1.5rem;
            list-style: none;
        }
        
        .pre-bet-checklist li {
            text-align: left;
            color: var(--color-text);
            position: relative;
            padding-left: 1.5rem;
            margin-bottom: 0.75rem;
        }
        
        .pre-bet-checklist li::before {
            content: '☐';
            position: absolute;
            left: -0.75rem;
            color: var(--color-secondary);
            background-color: var(--color-bg);
            padding: 0 4px;
        }
        
        /* At a Glance */
        .at-a-glance {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 0;
            margin: 2rem 0;
            background-color: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 6px;
            overflow: hidden;
        }
        
        .at-a-glance > div {
            padding: 1.25rem;
            border-right: 1px solid var(--color-border);
            text-align: center;
        }
        
        .at-a-glance > div:last-child {
            border-right: none;
        }
        
        .at-a-glance strong {
            display: block;
            font-family: var(--font-display);
            font-size: var(--h3-size);
            font-weight: 700;
            color: var(--color-primary);
            margin-bottom: 0.25rem;
        }
        
        .at-a-glance span {
            font-size: var(--small-size);
            color: var(--color-text-secondary);
        }
        
        .at-a-glance p {
            text-align: center;
            color: var(--color-text);
        }
        
        @media (max-width: 600px) {
            .at-a-glance {
                grid-template-columns: 1fr 1fr;
            }
            
            .at-a-glance > div {
                border-bottom: 1px solid var(--color-border);
            }
            
            .at-a-glance > div:nth-child(2n) {
                border-right: none;
            }
            
            .at-a-glance > div:nth-last-child(-n+2) {
                border-bottom: none;
            }
        }
        
        /* Worked Example */
        .worked-example {
            background-color: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 2rem;
            margin: 2rem 0;
            box-shadow: var(--shadow-sm);
        }
        
        .worked-example h4 {
            font-size: var(--body-size);
            color: var(--color-primary);
            margin-bottom: 1.25rem;
        }
        
        .worked-example p {
            text-align: left;
            font-family: var(--font-mono);
            font-size: var(--small-size);
            color: var(--color-text);
            margin-bottom: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px dashed var(--color-border);
        }
        
        .worked-example p:last-child {
            border-bottom: none;
            font-weight: 600;
            color: var(--color-primary);
            font-size: var(--body-size);
            margin-bottom: 0;
        }
        
        /* Section Bridge */
        .section-bridge {
            text-align: center;
            font-style: italic;
            font-family: var(--font-display);
            color: var(--color-secondary);
            margin: 2rem 0;
            padding: 1rem 0;
            position: relative;
        }
        
        .section-bridge::before,
        .section-bridge::after {
            content: '—';
            margin: 0 0.75rem;
            color: var(--color-border);
        }
        
        /* =====================================================
           5. HERO SECTION
           ===================================================== */
        [data-content="hero"] {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
            position: relative;
            padding: clamp(4rem, 12vw, 8rem) 2rem clamp(3rem, 8vw, 5rem);
            overflow: hidden;
        }
        
        /* Subtle racecourse pattern */
        [data-content="hero"]::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                repeating-linear-gradient(
                    90deg,
                    transparent,
                    transparent 40px,
                    rgba(255, 255, 255, 0.03) 40px,
                    rgba(255, 255, 255, 0.03) 41px
                ),
                repeating-linear-gradient(
                    0deg,
                    transparent,
                    transparent 40px,
                    rgba(255, 255, 255, 0.02) 40px,
                    rgba(255, 255, 255, 0.02) 41px
                );
            pointer-events: none;
        }
        
        /* Soft glow */
        [data-content="hero"]::after {
            content: '';
            position: absolute;
            top: 30%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 120%;
            height: 80%;
            background: radial-gradient(ellipse, rgba(201, 162, 39, 0.06) 0%, transparent 60%);
            pointer-events: none;
        }
        
        .hero-inner {
            position: relative;
            z-index: 1;
            max-width: calc(var(--sidebar-width) + var(--content-max-width) + 6rem);
            margin: 0 auto;
            padding-left: calc(var(--sidebar-width) + 3rem);
        }
        
        .hero-meta {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        
        .date-badge {
            display: inline-flex;
            align-items: center;
            background-color: rgba(255, 255, 255, 0.12);
            padding: 0.375rem 0.75rem;
            border-radius: 4px;
            font-size: var(--caption-size);
            font-weight: 500;
            letter-spacing: 0.03em;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .trust-marker {
            font-size: var(--caption-size);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(255, 255, 255, 0.7);
        }
        
        [data-content="hero"] h1 {
            font-size: clamp(2.5rem, 5vw, 3.5rem);
            font-weight: 700;
            color: #FFFFFF;
            letter-spacing: -0.02em;
            line-height: 1.1;
            margin-bottom: 1rem;
            max-width: var(--content-max-width);
        }
        
        .hero-subtitle {
            font-size: var(--small-size);
            font-weight: 500;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            color: var(--color-secondary);
            margin-bottom: 2rem;
        }
        
        [data-content="hero"] figure {
            margin-top: 2.5rem;
            max-width: var(--content-max-width);
        }
        
        [data-content="hero"] .hero-image {
            width: 100%;
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: var(--shadow-lg);
        }
        
        [data-content="hero"] figcaption {
            text-align: center;
            color: rgba(255, 255, 255, 0.7);
            margin-top: 1rem;
        }
        
        @media (max-width: 900px) {
            .hero-inner {
                padding-left: 0;
            }
        }
        
        /* =====================================================
           6. TABLE OF CONTENTS - SIDEBAR VARIANT
           ===================================================== */
        [data-content="toc"] {
            position: sticky;
            top: 2rem;
            max-height: calc(100vh - 4rem);
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--color-border) transparent;
        }
        
        [data-content="toc"]::-webkit-scrollbar {
            width: 4px;
        }
        
        [data-content="toc"]::-webkit-scrollbar-track {
            background: transparent;
        }
        
        [data-content="toc"]::-webkit-scrollbar-thumb {
            background-color: var(--color-border);
            border-radius: 2px;
        }
        
        .toc-title {
            font-size: var(--caption-size);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--color-text-muted);
            margin-bottom: 1rem;
        }
        
        [data-content="toc"] nav ul {
            list-style: none;
            padding-left: 0;
            margin-bottom: 0;
        }
        
        [data-content="toc"] nav > ul > li {
            margin-bottom: 0.5rem;
        }
        
        [data-content="toc"] nav a {
            display: block;
            font-size: var(--small-size);
            color: var(--color-text-secondary);
            text-decoration: none;
            padding: 0.375rem 0;
            border-left: 2px solid transparent;
            padding-left: 0.75rem;
            transition: color 0.2s ease, border-color 0.2s ease;
        }
        
        [data-content="toc"] nav a:hover {
            color: var(--color-primary);
            border-left-color: var(--color-primary);
        }
        
        [data-content="toc"] nav a:focus {
            outline: none;
            color: var(--color-primary);
            border-left-color: var(--color-primary);
        }
        
        /* Nested TOC items (H3s) */
        [data-content="toc"] nav ul ul {
            margin-top: 0.25rem;
            padding-left: 0.75rem;
        }
        
        [data-content="toc"] nav ul ul a {
            font-size: var(--caption-size);
            color: var(--color-text-muted);
            padding: 0.25rem 0 0.25rem 0.75rem;
        }
        
        /* =====================================================
           7. FAQ ACCORDION
           ===================================================== */
        details {
            border: 1px solid var(--color-border);
            border-radius: 6px;
            margin-bottom: 0.75rem;
            background-color: var(--color-surface);
            overflow: hidden;
            interpolate-size: allow-keywords;
        }
        
        summary {
            padding: 1rem 1.25rem;
            padding-right: 2.5rem;
            cursor: pointer;
            font-weight: 500;
            color: var(--color-text);
            position: relative;
            list-style: none;
            transition: background-color 0.2s ease;
        }
        
        summary::-webkit-details-marker {
            display: none;
        }
        
        summary::after {
            content: '+';
            position: absolute;
            right: 1.25rem;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.25rem;
            font-weight: 400;
            color: var(--color-text-muted);
            transition: transform 0.3s ease;
        }
        
        details[open] summary::after {
            transform: translateY(-50%) rotate(45deg);
        }
        
        summary:hover {
            background-color: rgba(0, 0, 0, 0.02);
        }
        
        @media (prefers-color-scheme: dark) {
            summary:hover {
                background-color: rgba(255, 255, 255, 0.03);
            }
        }
        
        summary:focus {
            outline: 2px solid var(--color-primary);
            outline-offset: -2px;
        }
        
        /* Modern details animation */
        ::details-content {
            opacity: 0;
            block-size: 0;
            overflow: hidden;
            transition: 
                opacity 0.3s ease,
                block-size 0.3s ease,
                content-visibility 0.3s allow-discrete;
        }
        
        details[open]::details-content {
            opacity: 1;
            block-size: auto;
        }
        
        details > div {
            padding: 0 1.25rem 1.25rem;
        }
        
        details > div > p {
            text-align: left;
            color: var(--color-text);
            margin-bottom: 0;
        }
        
        /* Fallback for older browsers */
        @supports not selector(::details-content) {
            @keyframes fade-in {
                from { opacity: 0; }
                to { opacity: 1; }
            }
            
            details[open] > *:not(summary) {
                animation: fade-in 0.3s ease;
            }
        }
        
        /* =====================================================
           8. MEDIA QUERIES
           ===================================================== */
        @media (max-width: 900px) {
            main {
                display: block;
                padding: 0 1.25rem;
            }
            
            [data-content] {
                max-width: 100%;
                padding: calc(var(--section-gap) * 0.7) 0;
            }
            
            [data-content="toc"] {
                position: static;
                max-height: none;
                overflow-y: visible;
                max-width: 100%;
                padding: 1.5rem 0;
                border-bottom: 1px solid var(--color-border);
                margin-bottom: 1rem;
            }
            
            [data-content="hero"] {
                margin-left: -1.25rem;
                margin-right: -1.25rem;
                width: calc(100% + 2.5rem);
                padding: clamp(3rem, 8vw, 5rem) 1.25rem;
            }
            
            [data-content="hero"] h1 {
                font-size: clamp(2rem, 7vw, 2.5rem);
            }
        }
        
        @media (max-width: 600px) {
            :root {
                --section-gap: 2.5rem;
            }
            
            table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
        }
        
        
        /* =====================================================
           10. IMAGES
           ===================================================== */
        .hero-image {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 0 auto;
        }
        
        .article-image {
            max-width: 100%;
            height: auto;
            display: block;
            border-radius: 6px;
        }

/* =========================================
   UNIVERSAL DESKTOP & MOBILE MENU + LOGO
   ========================================= */

/* Header Base */
.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border, #333);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Mobile defaults for navigation bar */
.top-navigation-bar {
    width: 100%;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- LOGO FIXES --- */
.site-logo img {
    max-height: 75px; /* Optimal height for most logos */
    width: auto !important; /* Prevents squishing */
    display: block;
    transition: transform 0.2s ease;
}

.site-logo img:hover {
    transform: scale(1.02);
}

/* --- DESKTOP MENU --- */
.site-nav--desktop {
    display: none; /* Hidden on mobile by default */
}

/* Desktop Grid Layout: Logo left, Menu center */
@media (min-width: 1024px) {
    .top-navigation-bar {
        max-width: 100%;
        padding: 15px 40px; /* Safe padding from screen edges */
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }
    
    .site-logo {
        grid-column: 1;
        justify-self: start; /* Locks logo to the left edge */
        margin: 0;
    }

    .site-nav--desktop {
        display: block;
        grid-column: 2;
        justify-self: center; /* Locks menu perfectly in the center */
    }

    .mobile-controls {
        display: none; /* Hide burger on desktop */
    }
    
    .menu-desktop {
        display: flex;
        gap: 30px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .menu-desktop a {
        text-decoration: none;
        color: var(--color-text);
        font-family: var(--font-body, sans-serif);
        font-weight: 500;
        font-size: 16px;
        transition: color 0.2s ease;
    }
    
    .menu-desktop a:hover {
        color: var(--color-accent);
    }
}

/* --- MOBILE BURGER BUTTON --- */
.burger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1000;
}

.burger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
}

/* Burger Animation to X */
.burger.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger.is-active span:nth-child(2) {
    opacity: 0;
}
.burger.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- MOBILE MENU SLIDER --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen */
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color-bg);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    padding: 60px 30px;
}

.mobile-menu.is-open {
    right: 0; /* Slide in */
}

.mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 36px;
    line-height: 1;
    color: var(--color-text);
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-menu__close:hover {
    color: var(--color-accent);
}

.menu-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.menu-mobile a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 20px;
    font-family: var(--font-display, sans-serif);
    font-weight: 600;
    display: block;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.menu-mobile a:hover {
    color: var(--color-accent);
    padding-left: 10px; /* Nice slide effect on hover */
}

/* --- OVERLAY --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px); /* Beautiful blur effect */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 998;
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}


/* =========================================
   4-COLUMN FOOTER (Horse Racing Betting Odds)
   ========================================= */
.site-footer-4col {
    background-color: #111827; /* Deep slate matching the UI */
    color: #9ca3af;
    padding: 60px 20px 30px;
    margin-top: 80px;
    font-family: var(--font-body, sans-serif);
    border-top: 3px solid var(--color-accent, #10b981); /* Emerald Green border */
}

.footer-4col-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Legal Disclaimers Block */
.footer-disclaimers {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-disclaimers p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    text-align: left;
}

.footer-disclaimers a {
    color: var(--color-accent, #10b981);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-disclaimers a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Grid Layout */
.footer-4col-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-4col-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-4col-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* Emerald Green Titles (Using div for W3C) */
.widget-title {
    color: var(--color-accent, #10b981); 
    font-family: var(--font-display, sans-serif); 
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    margin-top: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #9ca3af;
    line-height: 1.5;
}

.widget-list a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget-list a:hover {
    color: var(--color-accent, #10b981);
}

/* Bullets */
.bullet-list li {
    position: relative;
    padding-left: 16px;
}

.bullet-list li::before {
    content: '•';
    color: var(--color-accent, #10b981); 
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 1.5rem;
    line-height: 1;
}

.clean-list li {
    padding-left: 0;
    padding-bottom: 0.8rem;
}

.clean-list li::before {
    display: none;
}

.footer-4col-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    text-align: center;
}

.footer-4col-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-accent, #10b981);
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: #059669;
    transform: translateY(-5px);
}

/* =========================================
   FIX: FULL-WIDTH BANNER & CONTENT LIFT
   ========================================= */

[data-content="hero"] {
    grid-column: 1 / -1 !important; 
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    border-radius: 0 !important; 
    padding: 0 !important; 
}

[data-content="hero"] .hero-inner {
    padding: 2.5rem 1.5rem 4rem !important; 
    max-width: var(--content-max-width, 820px) !important; 
    margin: 0 auto !important; 
}

/* =========================================
   CENTER SUBPAGES (Kill the empty sidebar)
   ========================================= */

main:not(:has([data-content="toc"])) {
    display: block !important; 
}

main:not(:has([data-content="toc"])) > *,
main:not(:has([data-content="toc"])) > h1,
main:not(:has([data-content="toc"])) > header,
main:not(:has([data-content="toc"])) > figure {
    max-width: var(--content-max-width, 820px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-column: auto !important; 
}

main:not(:has([data-content="toc"])) > [data-content="hero"] {
    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

body {
    overflow-x: clip;
}