/* ============================================
           1. CSS VARIABLES & RESET
           ============================================ */
        :root {
            /* Colors - Light Theme */
            --color-bg: #FAFAFA;
            --color-text: #1A1A1A;
            --color-text-secondary: #6B7280;
            --color-accent: #059669;
            --color-accent-warning: #D97706;
            --color-border: #E5E7EB;
            --color-surface: #FFFFFF;
            --color-surface-alt: #F1F5F9;
            --color-success: #059669;
            --color-danger: #DC2626;
            --color-callout-bg: #FFFBEB;
            --color-callout-border: #F59E0B;
            --color-callout-text: #92400E;
            --color-dos-bg: #ECFDF5;
            --color-donts-bg: #FEF2F2;
            
            /* Typography */
            --font-display: 'Barlow Condensed', sans-serif;
            --font-body: 'Inter', sans-serif;
            --font-mono: 'JetBrains Mono', monospace;
            
            /* Spacing */
            --section-gap: clamp(3rem, 8vw, 6rem);
            --content-max-width: 720px;
            --content-padding: clamp(1rem, 4vw, 2rem);
            
            /* Transitions */
            --transition-fast: 150ms ease;
            --transition-base: 250ms ease;
        
    /* --- AUTO-FORCED DARK THEME --- */
    --color-bg: #0F0F0F;
                --color-text: #F5F5F5;
                --color-text-secondary: #9CA3AF;
                --color-border: #374151;
                --color-surface: #1A1A1A;
                --color-surface-alt: #262626;
                --color-callout-bg: #292524;
                --color-callout-border: #D97706;
                --color-callout-text: #FCD34D;
                --color-dos-bg: #052E16;
                --color-donts-bg: #450A0A;
}

        

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

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: var(--font-body);
            font-size: 18px;
            line-height: 1.7;
            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: 600;
            line-height: 1.2;
            color: var(--color-text);
            text-align: left;
        }

        h2 {
            font-size: clamp(1.75rem, 4vw, 2rem);
            letter-spacing: 0.01em;
            margin-bottom: 1.25rem;
            scroll-margin-top: 2rem;
        }

        h3 {
            font-size: clamp(1.25rem, 3vw, 1.5rem);
            margin-top: 2rem;
            margin-bottom: 0.75rem;
            scroll-margin-top: 2rem;
        }

        p {
            margin-bottom: 1.25rem;
            text-align: left;
        }

        a {
            color: var(--color-accent);
            text-decoration: underline;
            text-underline-offset: 2px;
            transition: opacity var(--transition-fast);
        }

        a:hover {
            opacity: 0.8;
        }

        a:focus {
            outline: 2px solid var(--color-accent);
            outline-offset: 2px;
        }

        strong {
            font-weight: 500;
        }

        ul, ol {
            margin-bottom: 1.25rem;
            padding-left: 1.5rem;
            text-align: left;
        }

        li {
            margin-bottom: 0.5rem;
        }

        blockquote {
            border-left: 3px solid var(--color-accent);
            padding-left: 1.25rem;
            margin: 1.5rem 0;
            font-style: italic;
            color: var(--color-text-secondary);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
            text-align: left;
        }

        th, td {
            padding: 0.75rem 1rem;
            border: 1px solid var(--color-border);
            text-align: left;
        }

        th {
            background-color: var(--color-surface-alt);
            font-weight: 500;
        }

        figure {
            margin: 2rem 0;
        }

        figcaption {
            font-size: 0.875rem;
            color: var(--color-text-secondary);
            text-align: center;
            margin-top: 0.75rem;
            letter-spacing: 0.02em;
        }

        img {
            max-width: 100%;
            height: auto;
            display: block;
        }

        hr {
            border: none;
            height: 1px;
            background-color: var(--color-border);
            margin: 2rem 0;
        }

        /* ============================================
           3. LAYOUT - SECTIONS
           ============================================ */
        header {
            /* Empty header - no visual gap before hero */
        }

        main {
            width: 100%;
        }

        [data-content] {
            max-width: var(--content-max-width);
            margin-left: auto;
            margin-right: auto;
            padding-left: var(--content-padding);
            padding-right: var(--content-padding);
            padding-top: var(--section-gap);
            padding-bottom: var(--section-gap);
        }

        [data-content]:first-of-type {
            padding-top: 0;
        }

        /* ============================================
           4. COMPONENTS
           ============================================ */
        
        /* --- info-box --- */
        .info-box {
            background: var(--color-surface);
            border-left: 4px solid var(--color-accent);
            padding: 24px 28px;
            margin: 32px 0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }

        .info-box p {
            font-family: var(--font-body);
            font-size: 16px;
            line-height: 1.6;
            color: var(--color-text);
            margin-bottom: 0.75rem;
            text-align: left;
        }

        .info-box p:last-child {
            margin-bottom: 0;
        }

        .info-box p:first-child strong {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--color-accent);
            display: block;
            margin-bottom: 12px;
        }

        /* --- odds-example --- */
        .odds-example {
            background: var(--color-surface-alt);
            border-radius: 8px;
            padding: 24px;
            margin: 32px 0;
        }

        .odds-example p {
            font-family: var(--font-body);
            font-size: 16px;
            line-height: 1.6;
            color: var(--color-text);
            margin-bottom: 0.5rem;
            text-align: left;
        }

        .odds-example p:first-child {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            color: var(--color-text-secondary);
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--color-border);
        }

        .odds-example p:last-child {
            margin-bottom: 0;
        }

        .odds-example strong {
            font-family: var(--font-mono);
            font-weight: 700;
            color: var(--color-accent);
        }

        /* --- callout --- */
        .callout {
            background: var(--color-callout-bg);
            border: 1px solid var(--color-callout-border);
            border-radius: 6px;
            padding: 20px 24px;
            margin: 28px 0;
        }

        .callout p {
            font-family: var(--font-body);
            font-size: 16px;
            line-height: 1.6;
            color: var(--color-callout-text);
            margin-bottom: 0.5rem;
            text-align: left;
        }

        .callout p:first-child strong {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            display: block;
            margin-bottom: 8px;
            color: var(--color-accent-warning);
        }

        .callout p:last-child {
            margin-bottom: 0;
        }

        /* --- comparison --- */
        .comparison {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin: 32px 0;
        }

        .comparison > div {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 24px;
        }

        .comparison > div p {
            text-align: left;
            margin-bottom: 0.75rem;
        }

        .comparison > div p:first-child {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 18px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid var(--color-accent);
            color: var(--color-text);
        }

        .comparison ul {
            margin-bottom: 0;
        }

        .comparison li {
            font-size: 15px;
            line-height: 1.5;
            color: var(--color-text);
        }

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

        /* --- key-takeaway --- */
        .key-takeaway {
            border-top: 3px solid var(--color-text);
            padding-top: 20px;
            margin: 40px 0;
        }

        .key-takeaway p {
            font-family: var(--font-display);
            font-size: clamp(20px, 3vw, 24px);
            font-weight: 600;
            line-height: 1.3;
            color: var(--color-text);
            margin-bottom: 0;
            text-align: left;
        }

        /* --- fun-fact --- */
        .fun-fact {
            position: relative;
            margin: 24px 0;
            padding-left: 24px;
        }

        .fun-fact::before {
            content: '\2014';
            position: absolute;
            left: 0;
            top: 0;
            color: var(--color-accent);
            font-weight: 700;
        }

        .fun-fact p {
            font-family: var(--font-body);
            font-style: italic;
            font-size: 15px;
            color: var(--color-text-secondary);
            line-height: 1.5;
            margin-bottom: 0;
            text-align: left;
        }

        /* --- glossary-term --- */
        .glossary-term {
            display: flex;
            align-items: baseline;
            gap: 12px;
            margin: 24px 0;
        }

        .glossary-term p {
            margin-bottom: 0;
            text-align: left;
        }

        .glossary-term strong {
            font-family: var(--font-mono);
            color: var(--color-accent);
            text-decoration: underline;
            text-underline-offset: 3px;
            flex-shrink: 0;
        }

        @media (max-width: 500px) {
            .glossary-term {
                flex-direction: column;
                gap: 4px;
            }
        }

        /* --- dos-donts --- */
        .dos-donts {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin: 32px 0;
        }

        .dos-donts > div {
            border-radius: 8px;
            padding: 20px;
        }

        .dos-donts > div:first-child {
            background: var(--color-dos-bg);
        }

        .dos-donts > div:last-child {
            background: var(--color-donts-bg);
        }

        .dos-donts > div p {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            margin-bottom: 12px;
            text-align: left;
        }

        .dos-donts > div:first-child p strong {
            color: var(--color-success);
        }

        .dos-donts > div:last-child p strong {
            color: var(--color-danger);
        }

        .dos-donts ul {
            margin-bottom: 0;
            padding-left: 1.25rem;
        }

        .dos-donts li {
            font-size: 15px;
            line-height: 1.5;
            color: var(--color-text);
        }

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

        /* --- pre-bet-checklist --- */
        .pre-bet-checklist {
            margin: 32px 0;
            padding-left: 24px;
            border-left: 3px solid var(--color-accent);
        }

        .pre-bet-checklist p:first-child {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: var(--color-accent);
            margin-bottom: 16px;
            text-align: left;
        }

        .pre-bet-checklist ul {
            list-style: none;
            padding-left: 0;
            margin-bottom: 0;
        }

        .pre-bet-checklist li {
            position: relative;
            padding-left: 32px;
            margin-bottom: 12px;
            font-size: 16px;
            line-height: 1.5;
        }

        .pre-bet-checklist li::before {
            content: '\2610';
            position: absolute;
            left: 0;
            top: 0;
            color: var(--color-accent);
            font-size: 18px;
            background: var(--color-bg);
            padding-right: 4px;
        }

        /* --- at-a-glance --- */
        .at-a-glance {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0;
            margin: 32px 0;
            border: 1px solid var(--color-border);
            border-radius: 8px;
            overflow: hidden;
        }

        .at-a-glance > div {
            padding: 20px;
            border-right: 1px solid var(--color-border);
            background: var(--color-surface);
        }

        .at-a-glance > div:last-child {
            border-right: none;
        }

        .at-a-glance > div p {
            text-align: left;
            margin-bottom: 0.5rem;
        }

        .at-a-glance > div p:first-child {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 16px;
            color: var(--color-text);
            margin-bottom: 8px;
        }

        .at-a-glance > div p:last-child {
            font-size: 14px;
            color: var(--color-text-secondary);
            line-height: 1.5;
            margin-bottom: 0;
        }

        @media (max-width: 700px) {
            .at-a-glance {
                grid-template-columns: 1fr;
            }
            .at-a-glance > div {
                border-right: none;
                border-bottom: 1px solid var(--color-border);
            }
            .at-a-glance > div:last-child {
                border-bottom: none;
            }
        }

        /* --- worked-example --- */
        .worked-example {
            background: var(--color-surface-alt);
            border-radius: 8px;
            padding: 28px;
            margin: 32px 0;
        }

        .worked-example p {
            font-family: var(--font-body);
            font-size: 16px;
            line-height: 1.6;
            color: var(--color-text);
            margin-bottom: 0.75rem;
            text-align: left;
        }

        .worked-example p:first-child {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 16px;
            text-transform: uppercase;
            color: var(--color-accent);
            margin-bottom: 20px;
        }

        .worked-example p:last-child {
            margin-bottom: 0;
        }

        .worked-example strong {
            font-family: var(--font-mono);
            font-weight: 700;
            color: var(--color-accent);
        }

        /* --- card-grid --- */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin: 32px 0;
        }

        .card-grid > div {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        .card-grid > div p {
            text-align: left;
            margin-bottom: 0.5rem;
        }

        .card-grid > div p:first-child {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 16px;
            color: var(--color-text);
            margin-bottom: 8px;
        }

        .card-grid > div p:last-child {
            font-size: 14px;
            color: var(--color-text-secondary);
            line-height: 1.5;
            margin-bottom: 0;
        }

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

        /* --- section-bridge --- */
        .section-bridge {
            text-align: center;
            margin: 2.5rem 0;
            position: relative;
        }

        .section-bridge::before,
        .section-bridge::after {
            content: '\2014\2014';
            color: var(--color-border);
            margin: 0 1rem;
        }

        .section-bridge p {
            display: inline;
            font-family: var(--font-display);
            font-style: italic;
            font-size: 17px;
            color: var(--color-accent);
            margin: 0;
        }

        /* ============================================
           5. HERO SECTION
           ============================================ */
        [data-content="hero"] {
            max-width: none;
            padding: 0;
            margin: 0;
            width: 100%;
            background: 
                linear-gradient(90deg, transparent 49.5%, rgba(5,150,105,0.08) 49.5%, rgba(5,150,105,0.08) 50.5%, transparent 50.5%),
                repeating-linear-gradient(0deg, transparent 0px, transparent 40px, rgba(5,150,105,0.03) 40px, rgba(5,150,105,0.03) 41px),
                var(--color-bg);
            padding-top: clamp(3rem, 10vw, 5rem);
            padding-bottom: clamp(2rem, 6vw, 3rem);
        }

        .hero-inner {
            max-width: var(--content-max-width);
            margin: 0 auto;
            padding: 0 var(--content-padding);
            text-align: center;
        }

        .rubrica {
            font-family: var(--font-display);
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--color-accent);
            display: block;
            margin-bottom: 1rem;
        }

        [data-content="hero"] h1 {
            font-family: var(--font-display);
            font-size: clamp(2.25rem, 7vw, 3rem);
            font-weight: 700;
            line-height: 1.1;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            color: var(--color-text);
            margin-bottom: 1.25rem;
            text-align: center;
        }

        .subtitle {
            font-family: var(--font-body);
            font-size: clamp(1rem, 2.5vw, 1.25rem);
            font-weight: 400;
            color: var(--color-text-secondary);
            margin-bottom: 1.5rem;
            text-align: center;
        }

        .hero-divider {
            width: 60px;
            height: 3px;
            background-color: var(--color-accent);
            border: none;
            margin: 0 auto 1.5rem;
        }

        .meta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
            font-size: 14px;
            color: var(--color-text-secondary);
            margin-bottom: 2rem;
        }

        .meta time {
            letter-spacing: 0.02em;
        }

        .badge {
            font-family: var(--font-display);
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            background-color: var(--color-accent);
            color: var(--color-surface);
            padding: 4px 10px;
            border-radius: 3px;
        }

        [data-content="hero"] figure {
            max-width: 900px;
            margin: 0 auto;
        }

        [data-content="hero"] figure img {
            width: 100%;
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        [data-content="hero"] figcaption {
            font-size: 13px;
            margin-top: 1rem;
        }

        .hero-cta {
            display: inline-block;
            font-family: var(--font-display);
            font-size: 14px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--color-surface);
            background-color: var(--color-accent);
            padding: 12px 28px;
            border-radius: 4px;
            text-decoration: none;
            margin-top: 1.5rem;
            transition: transform var(--transition-fast), opacity var(--transition-fast);
        }

        .hero-cta:hover {
            transform: translateY(-2px);
            opacity: 0.95;
        }

        /* ============================================
           6. TABLE OF CONTENTS - HORIZONTAL
           ============================================ */
        [data-content="toc"] {
            max-width: none;
            background-color: var(--color-surface);
            border-top: 1px solid var(--color-border);
            border-bottom: 1px solid var(--color-border);
            padding-top: 1rem;
            padding-bottom: 1rem;
        }

        .toc-inner {
            max-width: 960px;
            margin: 0 auto;
            padding: 0 var(--content-padding);
        }

        .toc-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            justify-content: center;
            align-items: center;
        }

        .toc-nav a {
            font-family: var(--font-display);
            font-size: 13px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: var(--color-text-secondary);
            text-decoration: none;
            padding: 6px 14px;
            border: 1px solid var(--color-border);
            border-radius: 4px;
            transition: all var(--transition-fast);
            white-space: nowrap;
        }

        .toc-nav a:hover {
            color: var(--color-accent);
            border-color: var(--color-accent);
            background-color: rgba(5,150,105,0.05);
        }

        @media (max-width: 600px) {
            .toc-nav {
                justify-content: flex-start;
            }
            .toc-nav a {
                font-size: 12px;
                padding: 5px 10px;
            }
        }

        /* ============================================
           7. FAQ ACCORDION
           ============================================ */
        details {
            border-bottom: 1px solid var(--color-border);
            interpolate-size: allow-keywords;
        }

        details:first-of-type {
            border-top: 1px solid var(--color-border);
        }

        summary {
            font-family: var(--font-display);
            font-size: clamp(1rem, 2vw, 1.125rem);
            font-weight: 600;
            color: var(--color-text);
            padding: 1.25rem 2.5rem 1.25rem 0;
            cursor: pointer;
            list-style: none;
            position: relative;
            transition: color var(--transition-fast);
        }

        summary::-webkit-details-marker {
            display: none;
        }

        summary::after {
            content: '+';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            font-family: var(--font-mono);
            font-size: 1.25rem;
            font-weight: 400;
            color: var(--color-accent);
            transition: transform var(--transition-base);
        }

        details[open] summary::after {
            transform: translateY(-50%) rotate(45deg);
        }

        summary:hover {
            color: var(--color-accent);
        }

        summary:focus {
            outline: 2px solid var(--color-accent);
            outline-offset: 2px;
        }

        /* Modern details animation */
        ::details-content {
            opacity: 0;
            block-size: 0;
            overflow: hidden;
            transition: 
                opacity var(--transition-base),
                block-size var(--transition-base),
                content-visibility var(--transition-base) allow-discrete;
        }

        details[open]::details-content {
            opacity: 1;
            block-size: auto;
        }

        details > div {
            padding-bottom: 1.25rem;
        }

        details > div p {
            font-size: 16px;
            line-height: 1.7;
            color: var(--color-text);
            text-align: left;
        }

        /* Fallback for older browsers */
        @supports not selector(::details-content) {
            details[open] > *:not(summary) {
                animation: fade-in 300ms ease forwards;
            }
            @keyframes fade-in {
                from { opacity: 0; }
                to { opacity: 1; }
            }
        }

        /* ============================================
           8. FOOTER
           ============================================ */
        footer {
            max-width: var(--content-max-width);
            margin: 0 auto;
            padding: var(--section-gap) var(--content-padding);
            border-top: 1px solid var(--color-border);
            font-size: 13px;
            color: var(--color-text-secondary);
            text-align: left;
        }

        /* ============================================
           9. UTILITY & IMAGES
           ============================================ */
        .hero-image {
            width: 100%;
            max-width: 100%;
            height: auto;
            display: block;
        }

        .article-image {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 0 auto;
            border-radius: 4px;
        }

        /* ============================================
           10. MEDIA QUERIES
           ============================================ */
        @media (max-width: 768px) {
            :root {
                --section-gap: 3rem;
            }

            [data-content="hero"] h1 {
                font-size: clamp(1.75rem, 8vw, 2.5rem);
            }

            h2 {
                font-size: 1.5rem;
            }

            h3 {
                font-size: 1.25rem;
            }

            body {
                font-size: 17px;
            }
        }

        @media (max-width: 480px) {
            .meta {
                flex-direction: column;
                gap: 0.5rem;
            }
        }

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

/* Header Base */
.site-header {
    background-color: var(--color-bg, #121212);
    border-bottom: 1px solid var(--color-border, #333333);
    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 {
    min-width: 180px;
    margin: 0;
}

.site-logo img {
    max-height: 50px !important;
    max-width: none !important;
    width: auto !important; 
    display: block;
    transition: transform 0.2s ease;
    transform: scale(2.2); /* Увеличит на 20% */
    transform-origin: left center; /* Точка трансформации слева по центру */
}

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

/* Desktop Menu */
.site-nav--desktop {
    display: none; 
}

/* Desktop Grid Layout: Logo left, Menu center */
@media (min-width: 1024px) {
    .top-navigation-bar {
        max-width: 100%;
        padding: 15px 40px; 
        display: flex; 
        justify-content: space-between;
        align-items: center;
        gap: 30px;
    }
    
    .site-nav--desktop {
        display: block;
        flex: 1; 
        min-width: 0; 
    }

    .mobile-controls {
        display: none; 
    }
    
    .site-nav--desktop ul {
        display: flex;
        flex-wrap: wrap; 
        justify-content: flex-end; 
        gap: 15px 25px; 
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .site-nav--desktop a {
        text-decoration: none;
        color: var(--color-text, #ffffff);
        font-family: var(--font-body, sans-serif);
        font-weight: 500;
        font-size: 14px; 
        transition: color 0.2s ease;
        white-space: normal !important;
        line-height: 1.2;
    }
    
    .site-nav--desktop a:hover {
        color: var(--color-accent, #eab308);
    }
}

/* 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, #ffffff);
    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%; 
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color-bg, #121212);
    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; 
}

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

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

.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, #ffffff);
    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, #eab308);
    padding-left: 10px; 
}

/* 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); 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 998;
}

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

.sitemap-main{
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.sitemap-title{
  margin: 0 0 8px;
  text-align: center;
}

.sitemap-subtitle{
  margin: 0 0 24px;
  text-align: center;
  opacity: 0.75;
}

.sitemap-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.sitemap-link{
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  text-decoration: none;
}

.sitemap-link:hover{
  border-color: rgba(255,255,255,0.2);
}

/* ===== Universal hub (NO body_class needed) ===== */

main.hub-children-main{
  padding-bottom: 48px;
}

/* Article wrapper */
main.hub-children-main .hub-children-article{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
main.hub-children-main .hub-children-header{
  text-align: center;
  margin-top: 24px;
  margin-bottom: 24px;
}

main.hub-children-main .hub-children-title{
  margin: 0 0 10px;
}

main.hub-children-main .hub-children-intro{
  max-width: 900px;
  margin: 0 auto;
  opacity: .9;
}

/* Grid */
main.hub-children-main .hub-children-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 12px;
}

/* Card */
main.hub-children-main .hub-children-card{
  display: block;
  text-decoration: none;
}

main.hub-children-main .hub-children-card__media{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  transition: transform .22s ease, box-shadow .22s ease;
}

main.hub-children-main .hub-children-card:hover .hub-children-card__media{
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}

/* Image */
main.hub-children-main .hub-children-card__img{
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

/* Overlay */
main.hub-children-main .hub-children-card__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.42) 55%,
    rgba(0,0,0,0.70) 100%
  );
}

/* Text */
main.hub-children-main .hub-children-card__content{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
}

main.hub-children-main .hub-children-card__title{
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,.55);
}

/* Responsive */
@media (max-width: 1024px){
  main.hub-children-main .hub-children-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 640px){
  main.hub-children-main .hub-children-grid{
    grid-template-columns: 1fr;
  }
}

.home main > *:not([data-content="hero"]):not(.cl-header):not(header):not(.cl-hero),
.home main article > *:not([data-content="hero"]):not(.cl-header):not(header):not(.cl-hero) {
    max-width: var(--content-max-width, 940px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
}

.home main iframe,
.home main article iframe {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    width: 100% !important;
}

/* ===== ХЛЕБНЫЕ КРОШКИ (BREADCRUMBS) - LIGHT & DARK ===== */

/* БАЗОВАЯ (СВЕТЛАЯ) ТЕМА */
#crumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #64748b; 
    text-align: center; 
}

#crumbs a {
    text-decoration: none;
    color: #475569; 
    transition: color 0.2s ease;
}

#crumbs a:hover {
    color: #2563eb; 
    text-decoration: underline;
}

#crumbs .current {
    font-weight: 600;
    color: #0f172a; 
}

/* ТЕМНАЯ ТЕМА (Автоматическое переключение) */
@media (prefers-color-scheme: dark) {
    #crumbs {
        color: rgba(255, 255, 255, 0.5); 
    }

    #crumbs a {
        color: rgba(255, 255, 255, 0.7); 
    }

    #crumbs a:hover {
        color: #ffffff; 
    }

    #crumbs .current {
        color: #ffffff; 
    }
}

/* =========================================
   СТИЛИ ДЛЯ ОГЛАВЛЕНИЯ (TOC) - LIGHT & DARK
   ========================================= */

/* БАЗОВАЯ (СВЕТЛАЯ) ТЕМА */
.toc-card {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 10px;
    padding: 25px 30px;
    margin: 40px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.toc-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1e293b; 
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.toc-columns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc-group a {
    color: #475569 !important; 
    text-decoration: none;
    font-size: 16px;
    line-height: 1.5;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.toc-group a:hover {
    color: #2563eb !important; 
    transform: translateX(4px);
}

/* Две колонки на компьютерах */
@media (min-width: 768px) {
    .toc-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
    }
}

/* ТЕМНАЯ ТЕМА */
@media (prefers-color-scheme: dark) {
    .toc-card {
        background: #1a1a1f;
        border-color: #2d2d35;
        box-shadow: none;
    }

    .toc-card h2 {
        color: #ffffff;
        border-bottom-color: #2d2d35;
    }

    .toc-group a {
        color: #a0a0b0 !important; 
    }

    .toc-group a:hover {
        color: #ffffff !important; 
    }
}


html, body {
    overflow-x: clip;
}