/* ============================================
   1. CSS Variables & Reset
   ============================================ */
:root {
    --bg-page: #fafaf8;
    --bg-header: #ffffff;
    --bg-footer: #1a1a1a;
    --text-primary: #1a1a1a;
    --text-secondary: #5c5c5c;
    --accent: #c45510;
    --accent-hover: #e56b19;
    --border: #e0ddd8;
    --bg-card: #ffffff;
    --bg-code: #f5f3ef;
    --content-width: 940px;
    --section-gap: 4rem;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-logo: 'Poppins', sans-serif;
    --success: #2d7a3a;
    --danger: #b91c1c;
    --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;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

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

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

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

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

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

h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 1.25rem;
}

h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.3;
    color: #0073aa;
    text-align: left;
    margin-bottom: 1rem;
    scroll-margin-top: 2rem;
}

h2 {
    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: 600;
}

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

figure {
    margin: 1.5em auto;
}

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

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

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

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

th {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background-color: var(--bg-code);
}

td {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 400;
}

/* ============================================
   3. Layout — Sections
   ============================================ */
main {
    width: 100%;
}

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

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

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

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

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

/* --- callout --- */
.callout {
    border-top: 3px solid var(--accent);
    background-color: var(--bg-card);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

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

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

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

.key-takeaway p {
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 0;
}

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

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

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

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

.glossary-term p {
    text-align: left;
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 1rem;
}

.glossary-term p strong {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.95rem;
}

/* --- odds-example --- */
.odds-example {
    background-color: var(--bg-code);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.odds-example > p:first-child {
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 1rem;
}

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

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

.odds-example table {
    font-size: 0.9rem;
}

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

/* --- comparison --- */
.comparison {
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison table th {
    color: var(--accent);
    background-color: var(--bg-code);
}

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

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

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

.dos-donts p {
    text-align: left;
    color: var(--text-primary);
}

.dos-donts p strong {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

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

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

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

.dos-donts li {
    font-size: 0.95rem;
    color: var(--text-primary);
}

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

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

.pre-bet-checklist ul {
    border-left: 2px solid var(--border);
    padding-left: 1.75rem;
    list-style: none;
}

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

.pre-bet-checklist li::before {
    content: "\2610";
    position: absolute;
    left: -1.75rem;
    color: var(--accent);
    background-color: var(--bg-page);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- at-a-glance --- */
.at-a-glance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    margin: 2rem 0;
}

.at-a-glance > div {
    padding: 1.25rem 1rem;
    text-align: center;
    border-right: 1px solid var(--border);
}

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

.at-a-glance p {
    text-align: center;
    margin-bottom: 0.25em;
}

.at-a-glance p strong {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--accent);
    display: block;
    margin-bottom: 0.25rem;
}

.at-a-glance p:last-child {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* --- worked-example --- */
.worked-example {
    background-color: var(--bg-code);
    padding: 1.75rem 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.worked-example > p:first-child {
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.worked-example p {
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.5em;
    line-height: 1.8;
}

.worked-example p:last-child {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
}

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

.section-bridge p {
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1rem;
    display: inline;
}

.section-bridge::before,
.section-bridge::after {
    content: "\00B7\00A0\00B7\00A0\00B7";
    color: var(--border);
    font-size: 0.85rem;
    vertical-align: middle;
    margin: 0 0.75rem;
}

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

.card-grid > div {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-grid > div:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

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

.card-grid p strong {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

/* --- author-bio --- */
.author-bio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* --- tldr --- */
.tldr {
    background-color: var(--bg-code);
    border-left: 3px solid var(--accent);
    padding: 1.5rem 1.75rem;
    margin-top: var(--section-gap);
    margin-bottom: var(--section-gap);
}

.tldr h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    text-align: left;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.tldr li {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.6em;
    line-height: 1.6;
}

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

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

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

.header-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-badge {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background-color: var(--bg-code);
    padding: 0.25rem 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.trust-marker {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

/* ============================================
   6. Hero
   ============================================ */
[data-content="hero"] {
    max-width: 100%;
    width: 100vw;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    background-color: var(--bg-page);
    background-image: radial-gradient(ellipse at 50% 40%, rgba(196, 85, 16, 0.05) 0%, transparent 70%);
    margin-bottom: var(--section-gap);
}

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

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

[data-content="hero"] .hero-subtitle {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    max-width: 500px;
    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.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

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

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

/* ============================================
   7. TOC
   ============================================ */
[data-content="toc"] {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
}

.toc-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    text-align: left;
}

.toc-list {
    column-count: 2;
    column-gap: 2rem;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.toc-list > li {
    break-inside: avoid;
    margin-bottom: 0.6rem;
}

.toc-list > li > a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-list > li > a:hover {
    color: var(--accent);
}

.toc-sublist {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.3rem;
    margin-bottom: 0;
}

.toc-sublist li {
    margin-bottom: 0.3rem;
}

.toc-sublist a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-sublist a:hover {
    color: var(--accent);
}

/* ============================================
   8. FAQ
   ============================================ */
[data-content="faq"] details {
    border-bottom: 1px solid var(--border);
    interpolate-size: allow-keywords;
}

[data-content="faq"] details summary {
    padding: 1rem 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

[data-content="faq"] details summary:hover {
    color: var(--accent);
}

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

[data-content="faq"] details summary::after {
    content: "+";
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

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

[data-content="faq"] details::details-content {
    opacity: 0;
    block-size: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, block-size 0.35s ease, content-visibility 0.3s ease allow-discrete;
}

[data-content="faq"] details[open]::details-content {
    opacity: 1;
    block-size: auto;
}

@supports not selector(::details-content) {
    [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 {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    padding-bottom: 1rem;
}

/* ============================================
   9. Footer
   ============================================ */
.site-footer {
    background-color: var(--bg-footer);
    color: #a0a0a0;
    padding: 3rem 1.5rem 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: #d0d0d0;
    margin-bottom: 0.75rem;
    text-align: left;
}

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

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

.footer-col a:hover {
    color: var(--accent-hover);
}

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

.footer-col ul li {
    margin-bottom: 0.35rem;
}

.footer-col ul li a {
    font-size: 0.78rem;
}

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

.footer-logo {
    height: 28px;
    width: auto;
    margin-bottom: 0.75rem;
    filter: brightness(0) invert(1);
}

/* ============================================
   10. Media Queries
   ============================================ */
@media (max-width: 768px) {
    :root {
        --section-gap: 2.5rem;
    }

    [data-content] {
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

    .toc-list {
        column-count: 1;
    }

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

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

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

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

    .card-grid {
        grid-template-columns: 1fr;
    }

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

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

    .comparison {
        overflow-x: auto;
    }

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

    .header-meta {
        gap: 0.5rem;
    }

    [data-content="toc"] {
        padding: 1.25rem 1rem;
    }
}

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

    .header-meta {
        width: 100%;
        justify-content: flex-start;
    }
}

/* =========================================
   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 img {
    max-height: 55px; 
    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: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }
    
    .site-logo {
        grid-column: 1;
        justify-self: start; 
        margin: 0;
    }

    .site-nav--desktop {
        display: block;
        grid-column: 2;
        justify-self: center; 
    }

    .mobile-controls {
        display: none; 
    }
    
    .menu-desktop {
        display: flex;
        gap: 30px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .menu-desktop a {
        text-decoration: none;
        color: var(--color-text, #ffffff);
        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, #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;
  }
}

#crumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    text-align: center; 
}

#crumbs a {
    text-decoration: none;
    color: #0073aa; 
}

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

#crumbs .current {
    font-weight: bold;
    color: rgb(0, 0, 0);
}

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

@media (max-width: 900px) {
    html, body {
        overflow-x: hidden !important; 
        width: 100% !important;
        max-width: 100vw !important;
    }

    main {
        display: block !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    [data-content="hero"], 
    main:not(:has([data-content="toc"])) [data-content="hero"],
    .article-hero,
    .cl-hero {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1rem !important; 
        padding-right: 1rem !important;
        box-sizing: border-box !important;
    }
    
    .tldr, [data-content], article {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

