/* ============================================
   1. CSS Variables & Reset
   ============================================ */
:root {
    --bg-page: #fafafa;
    --bg-header: #ffffff;
    --bg-footer: #1a1a1a;
    --text-body: #1a1a1a;
    --accent: #e56419;
    --secondary: #2d2d2d;
    --border: #e0ddd8;
    --text-muted: #6b6560;
    --bg-card: #ffffff;
    --bg-code: #f5f2ee;
    --content-width: 740px;
    --section-gap: 4rem;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-logo: 'Bebas Neue', sans-serif;
    --success: #2a7d4f;
    --danger: #c0392b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.7;
    color: var(--text-body);
    background-color: var(--bg-page);
}

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

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

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

button:focus-visible,
summary:focus-visible,
details:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   2. General Typography
   ============================================ */
h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.2;
    color: var(--text-body);
}

h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    line-height: 1.2;
    color: var(--text-body);
    text-align: left;
    margin-bottom: 1rem;
    scroll-margin-top: 2rem;
}

h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    line-height: 1.2;
    color: var(--text-body);
    text-align: left;
    margin-bottom: 0.75rem;
    scroll-margin-top: 2rem;
}

p {
    text-align: left;
    margin-bottom: 1.5em;
}

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

li {
    margin-bottom: 0.5em;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

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

figure {
    margin: 1.5em auto;
}

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

figcaption {
    text-align: center;
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 0.5em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
}

th, td {
    padding: 0.6em 0.8em;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

/* ============================================
   3. Layout — Sections
   ============================================ */
[data-content] {
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.25rem;
    margin-top: var(--section-gap);
    margin-bottom: 0;
}

[data-content]:first-child {
    margin-top: 0;
}

/* ============================================
   4. Components
   ============================================ */

/* --- info-box --- */
.info-box {
    border-left: 4px solid var(--accent);
    background: var(--bg-code);
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    box-shadow: var(--shadow-sm);
}

.info-box p {
    text-align: left;
    color: var(--text-body);
    margin-bottom: 0.75em;
    font-size: 0.95em;
}

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

/* --- callout --- */
.callout {
    border-top: 3px solid var(--accent);
    background: var(--bg-code);
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    box-shadow: var(--shadow-sm);
}

.callout p {
    text-align: left;
    color: var(--text-body);
    margin-bottom: 0.75em;
    font-size: 0.95em;
}

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

/* --- key-takeaway --- */
.key-takeaway {
    border-top: 2px solid var(--accent);
    padding-top: 1rem;
    margin: 2em 0;
}

.key-takeaway p {
    text-align: left;
    color: var(--text-body);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.5;
}

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

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

.fun-fact p {
    text-align: left;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 0;
}

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

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

.glossary-term strong {
    font-family: var(--font-mono);
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.glossary-term p {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.95em;
}

/* --- odds-example --- */
.odds-example {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

.odds-example p {
    text-align: left;
    color: var(--text-body);
    font-size: 0.95em;
    margin-bottom: 0.75em;
}

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

.odds-example table {
    margin: 0.75em 0;
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.odds-example th {
    background: var(--bg-code);
    color: var(--secondary);
}

.odds-example td {
    font-family: var(--font-mono);
}

/* --- worked-example --- */
.worked-example {
    background: var(--bg-code);
    padding: 1.5em 1.75em;
    margin: 1.5em 0;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--secondary);
}

.worked-example p {
    text-align: left;
    color: var(--text-body);
    font-size: 0.95em;
    margin-bottom: 0.75em;
}

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

.worked-example strong {
    font-family: var(--font-heading);
    font-size: 1em;
    color: var(--secondary);
}

/* --- comparison --- */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    margin: 1.5em 0;
}

.comparison > div {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25em;
    box-shadow: var(--shadow-sm);
}

.comparison > div:first-child {
    border-top: 3px solid var(--success);
}

.comparison > div:last-child {
    border-top: 3px solid var(--danger);
}

.comparison p {
    text-align: left;
    color: var(--text-body);
    margin-bottom: 0.75em;
    font-size: 0.95em;
}

.comparison ul {
    text-align: left;
    padding-left: 1.25em;
    margin-bottom: 0;
}

.comparison li {
    color: var(--text-body);
    font-size: 0.9em;
    margin-bottom: 0.4em;
}

/* --- at-a-glance --- */
.at-a-glance {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 1.5em 0;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.at-a-glance > div {
    padding: 1.25em 1.5em;
}

.at-a-glance > div:first-child {
    border-right: 1px solid var(--border);
}

.at-a-glance p {
    text-align: left;
    color: var(--text-body);
    font-size: 0.9em;
    margin-bottom: 0.5em;
}

.at-a-glance p:last-child {
    margin-bottom: 0;
}

.at-a-glance strong {
    font-family: var(--font-heading);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
}

/* --- pre-bet-checklist --- */
.pre-bet-checklist {
    margin: 2em 0;
}

.pre-bet-checklist > p {
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1em;
}

.pre-bet-checklist ul {
    list-style: none;
    padding-left: 2em;
    border-left: 2px solid var(--border);
    margin-bottom: 0;
}

.pre-bet-checklist li {
    position: relative;
    padding-left: 0.5em;
    margin-bottom: 0.75em;
    font-size: 0.95em;
    color: var(--text-body);
}

.pre-bet-checklist li::before {
    content: "\2610";
    position: absolute;
    left: -1.75em;
    color: var(--accent);
    background: var(--bg-page);
    padding: 0 2px;
}

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

.section-bridge::before,
.section-bridge::after {
    content: "";
    display: inline-block;
    width: 2em;
    height: 1px;
    background: var(--border);
    vertical-align: middle;
    margin: 0 0.75em;
}

.section-bridge p {
    display: inline;
    text-align: center;
    font-style: italic;
    color: var(--accent);
    font-size: 0.95em;
    margin-bottom: 0;
}

/* --- dos-donts --- */
.dos-donts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    margin: 1.5em 0;
}

.dos-donts > div:first-child {
    border-left: 3px solid var(--success);
    padding-left: 1.25em;
}

.dos-donts > div:last-child {
    border-left: 3px solid var(--danger);
    padding-left: 1.25em;
}

.dos-donts p {
    text-align: left;
    color: var(--text-body);
    font-size: 0.95em;
    margin-bottom: 0.5em;
}

.dos-donts ul {
    text-align: left;
    padding-left: 1.25em;
}

.dos-donts li {
    color: var(--text-body);
    font-size: 0.9em;
}

/* --- card-grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25em;
    margin: 1.5em 0;
}

.card-grid > div {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25em;
    box-shadow: var(--shadow-sm);
}

.card-grid p {
    text-align: left;
    color: var(--text-body);
    font-size: 0.9em;
    margin-bottom: 0.5em;
}

/* --- tldr --- */
.tldr {
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    padding: 1.5em 1.75em;
    box-shadow: var(--shadow-sm);
}

.tldr h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--secondary);
    margin-bottom: 0.75em;
    text-transform: none;
    letter-spacing: 0;
}

.tldr ul {
    text-align: left;
    padding-left: 1.25em;
    margin-bottom: 0;
}

.tldr li {
    color: var(--text-body);
    font-size: 0.95em;
    margin-bottom: 0.6em;
}

.tldr li:last-child {
    margin-bottom: 0;
}

/* --- author-bio --- */
.author-bio {
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;
    padding: 1rem 1.25rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: left;
}

/* ============================================
   5. Header
   ============================================ */
.site-header {
    background: var(--bg-header);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.site-logo img {
    width: 180px;
    height: auto;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.header-meta time {
    color: var(--text-muted);
}

.trust-marker {
    color: var(--accent);
    font-weight: 700;
}

/* ============================================
   6. Hero Section
   ============================================ */
[data-content="hero"] {
    max-width: 100%;
    width: 100vw;
    margin-top: 0;
    padding: 4rem 1.25rem 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-header);
}

[data-content="hero"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(229,100,25,0.05) 0%, transparent 70%),
        radial-gradient(circle, rgba(229,100,25,0.06) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px;
    pointer-events: none;
    z-index: 0;
}

[data-content="hero"]::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg-page));
    pointer-events: none;
    z-index: 0;
}

[data-content="hero"] .hero-category {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    display: block;
    text-align: center;
}

[data-content="hero"] h1 {
    position: relative;
    z-index: 1;
    max-width: var(--content-width);
    margin: 0 auto 1rem;
    text-align: center;
}

[data-content="hero"] .hero-subtitle {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    max-width: var(--content-width);
    margin: 0 auto 1.5rem;
    text-align: center;
}

[data-content="hero"] .hero-byline {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

[data-content="hero"] figure {
    position: relative;
    z-index: 1;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

[data-content="hero"] figure img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* ============================================
   7. TOC — Compact Horizontal
   ============================================ */
[data-content="toc"] {
    margin-top: 2.5rem;
}

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

.toc-strip a {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--secondary);
    text-decoration: none;
    padding: 0.4em 0.75em;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.toc-strip a:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    opacity: 1;
}

/* ============================================
   8. FAQ Accordion
   ============================================ */
[data-content="faq"] details {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

[data-content="faq"] details:last-of-type {
    border-bottom: none;
}

[data-content="faq"] summary {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    padding: 1em 2em 1em 0;
    cursor: pointer;
    list-style: none;
    position: relative;
    color: var(--text-body);
    transition: color 0.2s ease;
}

[data-content="faq"] summary::-webkit-details-marker {
    display: none;
}

[data-content="faq"] summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: var(--accent);
    transition: transform 0.3s ease;
}

[data-content="faq"] details[open] summary::after {
    content: "\2212";
}

[data-content="faq"] details > div {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

[data-content="faq"] details[open] > div {
    max-height: 500px;
    opacity: 1;
}

[data-content="faq"] details > div p {
    padding-bottom: 1em;
    font-size: 0.95em;
    color: var(--text-body);
    text-align: left;
}

/* ============================================
   9. Back to Top
   ============================================ */
.back-to-top {
    display: block;
    max-width: var(--content-width);
    margin: var(--section-gap) auto 0;
    padding: 0 1.25rem;
    text-align: center;
}

.back-to-top a {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-to-top a:hover {
    color: var(--accent);
    opacity: 1;
}

/* ============================================
   10. Footer
   ============================================ */
.site-footer {
    background: var(--bg-footer);
    color: #a8a29e;
    margin-top: var(--section-gap);
    padding: 3rem 1.25rem 1.5rem;
    font-size: 0.8rem;
    line-height: 1.6;
}

.footer-grid {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e0ddd8;
    margin-bottom: 0.75rem;
}

.footer-col p {
    text-align: left;
    color: #a8a29e;
    font-size: 0.78rem;
    margin-bottom: 0.5em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 0.4em;
}

.footer-col a {
    color: #a8a29e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #ffffff;
    opacity: 1;
}

.footer-bottom {
    max-width: 960px;
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid #333333;
    text-align: center;
    font-size: 0.72rem;
    color: #6b6560;
}

/* ============================================
   11. Media Queries
   ============================================ */
@media (max-width: 768px) {
    [data-content] {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    [data-content="hero"] {
        padding: 2.5rem 1rem 2rem;
    }

    .comparison,
    .dos-donts {
        grid-template-columns: 1fr;
    }

    .at-a-glance {
        grid-template-columns: 1fr;
    }

    .at-a-glance > div:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .glossary-term {
        flex-direction: column;
        gap: 4px;
    }

    .toc-strip {
        justify-content: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .site-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .odds-example {
        overflow-x: auto;
    }
}

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

    .header-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Hero image classes */
.hero-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

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

/* =========================================
   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;
}

.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; 
    }
}
