/* =========================================================
   1. CSS VARIABLES & RESET
   ========================================================= */
:root {
    --bg-page: #0b0d12;
    --bg-surface: #11141b;
    --bg-header: #1a1a1a;
    --bg-footer: #0e1016;
    --text-main: #f2f4f8;
    --text-secondary: #9aa3b2;
    --accent: #4281ef;
    --accent-2: #89b0f5;
    --border: #2a2f3a;
    --success: #3ecf8e;
    --alert: #f5a524;

    --font-heading: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --font-logo: 'Poppins', system-ui, sans-serif;

    --fs-h1: clamp(2.2rem, 4vw + 0.5rem, 3.75rem);
    --fs-h2: clamp(1.6rem, 2.2vw + 0.6rem, 2.4rem);
    --fs-h3: clamp(1.25rem, 1.2vw + 0.6rem, 1.6rem);
    --fs-body: 1.0625rem;
    --fs-small: 0.9375rem;

    --content-width: 740px;
    --section-gap: clamp(3rem, 6vw, 5rem);
    --section-px: clamp(1rem, 3vw, 1.5rem);
}

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

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

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* =========================================================
   2. GLOBAL TYPOGRAPHY
   ========================================================= */
p, li, td, blockquote, details, summary {
    text-align: left;
}

p {
    margin: 0 0 1.25rem 0;
    color: var(--text-main);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    text-align: left;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

h2 { font-size: var(--fs-h2); scroll-margin-top: 2rem; margin-top: 2rem; }
h3 { font-size: var(--fs-h3); scroll-margin-top: 2rem; margin-top: 2rem; margin-bottom: 0.75rem; }

strong { color: var(--text-main); font-weight: 600; }
em { font-style: italic; }

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
a:hover { color: var(--accent-2); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

ul, ol { margin: 0 0 1.25rem 0; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

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

figure {
    margin: 1.5em auto;
    max-width: 100%;
}
figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
figcaption {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.75rem;
    letter-spacing: 0.02em;
}

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

/* =========================================================
   3. LAYOUT: MAIN + SECTIONS
   ========================================================= */
main {
    width: 100%;
    display: block;
}

article {
    display: block;
    width: 100%;
}

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

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

/* =========================================================
   4. HEADER
   ========================================================= */
.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 0.9rem var(--section-px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo img {
    display: block;
    height: auto;
    width: 200px;
    max-width: 100%;
}

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

.header-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    background: rgba(66, 129, 239, 0.08);
    border: 1px solid rgba(66, 129, 239, 0.3);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-main);
    letter-spacing: 0.02em;
}
.header-date-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.header-trust {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* =========================================================
   5. COMPONENTS (before hero — compiled together then hero below)
   ========================================================= */

/* --- info-box --- */
.info-box {
    background: var(--bg-surface);
    border-left: 3px solid var(--accent);
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.35rem;
    margin: 1.75rem 0;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    position: relative;
}
.info-box::before {
    content: "i";
    position: absolute;
    left: -3px;
    top: -1px;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 3px 0;
}
.info-box p { margin: 0; color: var(--text-main); }
.info-box p + p { margin-top: 0.75rem; }
.info-box strong { color: var(--accent-2); }

/* --- callout --- */
.callout {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem 1.6rem;
    margin: 1.75rem 0;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.callout::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--accent);
}
.callout p { text-align: center; color: var(--text-main); margin: 0; }
.callout p + p { margin-top: 0.5rem; }
.callout strong {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

/* --- key-takeaway --- */
.key-takeaway {
    border-top: 2px solid var(--accent);
    padding: 1.25rem 0 0.5rem 0;
    margin: 2rem 0;
    background: transparent;
}
.key-takeaway p {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(1.15rem, 1.2vw + 0.7rem, 1.4rem);
    line-height: 1.45;
    color: var(--text-main);
    text-align: left;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
}
.key-takeaway ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.key-takeaway li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.85rem;
    font-size: var(--fs-body);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    counter-increment: ktk;
}
.key-takeaway {
    counter-reset: ktk;
}
.key-takeaway li::before {
    content: counter(ktk, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.02em;
}

/* --- fun-fact --- */
.fun-fact {
    margin: 1.75rem 0;
    padding-left: 1.5rem;
    position: relative;
}
.fun-fact::before {
    content: "—";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-2);
    font-weight: 600;
}
.fun-fact p {
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.98rem;
}

/* --- glossary-term --- */
.glossary-term {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin: 1.25rem 0;
}
.glossary-term p {
    margin: 0;
    line-height: 1.6;
}
.glossary-term strong {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    font-weight: 500;
}

/* --- dos-donts --- */
.dos-donts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.75rem 0;
}
.dos-donts > div {
    padding: 1.25rem;
    background: var(--bg-surface);
    border-radius: 3px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.dos-donts > div:first-child { border-top: 2px solid var(--success); }
.dos-donts > div:last-child { border-top: 2px solid var(--alert); }
.dos-donts p {
    margin: 0 0 0.75rem 0;
    color: var(--text-main);
}
.dos-donts p strong {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
}
.dos-donts > div:first-child strong { color: var(--success); }
.dos-donts > div:last-child strong { color: var(--alert); }
.dos-donts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dos-donts li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.6rem;
    font-size: 0.97rem;
    line-height: 1.5;
    color: var(--text-main);
}
.dos-donts > div:first-child li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success);
    font-weight: 700;
}
.dos-donts > div:last-child li::before {
    content: "✗";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--alert);
    font-weight: 700;
}

/* --- pre-bet-checklist --- */
.pre-bet-checklist {
    margin: 1.75rem 0;
    padding: 0;
    position: relative;
}
.pre-bet-checklist p:first-child {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin: 0 0 1rem 0;
}
.pre-bet-checklist p:first-child strong {
    color: var(--accent);
    font-weight: 700;
}
.pre-bet-checklist ul {
    list-style: none;
    padding: 0 0 0 1.5rem;
    margin: 0;
    border-left: 2px solid var(--border);
    position: relative;
}
.pre-bet-checklist li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.85rem;
    color: var(--text-main);
    line-height: 1.55;
    font-size: 0.98rem;
}
.pre-bet-checklist li::before {
    content: "☐";
    position: absolute;
    left: -0.1rem;
    top: -0.1rem;
    color: var(--accent);
    font-size: 1.15rem;
    background: var(--bg-page);
    width: 1.4rem;
    line-height: 1;
    padding-top: 0.15rem;
    padding-left: 0.15rem;
    transform: translateX(-1.5rem);
}

/* --- at-a-glance --- */
.at-a-glance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin: 1.75rem 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.at-a-glance > div {
    padding: 1.15rem 1rem;
    border-right: 1px solid var(--border);
    text-align: center;
}
.at-a-glance > div:last-child { border-right: none; }
.at-a-glance p {
    text-align: center;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}
.at-a-glance p:first-child {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.55rem;
}
.at-a-glance p:first-child strong { color: var(--text-secondary); font-weight: 700; }
.at-a-glance p:last-child {
    font-family: var(--font-mono);
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* --- worked-example --- */
.worked-example {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem 1.6rem;
    margin: 1.75rem 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    position: relative;
}
.worked-example::before {
    content: "EX";
    position: absolute;
    top: 0;
    right: 1rem;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.5rem;
    border-radius: 0 0 3px 3px;
}
.worked-example p {
    margin: 0 0 0.75rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-main);
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}
.worked-example p:first-child {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-main);
    padding-left: 0;
    border-left: 0;
    margin-bottom: 1.25rem;
    padding-right: 2.5rem;
}
.worked-example p:first-child strong {
    color: var(--accent-2);
    font-weight: 700;
}
.worked-example p strong {
    color: var(--accent);
}

/* --- section-bridge --- */
.section-bridge {
    margin: 2.5rem 0;
    padding: 0.5rem 0;
    text-align: center;
    position: relative;
}
.section-bridge::before,
.section-bridge::after {
    content: "· · ·";
    display: block;
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.5em;
    opacity: 0.5;
}
.section-bridge::before { margin-bottom: 0.75rem; }
.section-bridge::after { margin-top: 0.75rem; }
.section-bridge p {
    text-align: center;
    font-family: var(--font-mono);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.55;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- comparison --- */
.comparison {
    margin: 1.75rem 0;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    background: var(--bg-surface);
}
.comparison table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.comparison th,
.comparison td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}
.comparison th {
    background: rgba(66, 129, 239, 0.08);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent);
}
.comparison tr:last-child td { border-bottom: none; }
.comparison tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}
.comparison td:first-child {
    font-weight: 600;
    color: var(--text-main);
}

/* --- card-grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.75rem 0;
}
.card-grid > div,
.card-grid > article {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.card-grid > div:hover,
.card-grid > article:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}
.card-grid p { margin: 0 0 0.5rem 0; font-size: 0.95rem; }

/* --- odds-example --- */
.odds-example {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 3px;
    padding: 1.25rem 1.4rem;
    margin: 1.75rem 0;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.odds-example p { text-align: center; font-family: var(--font-mono); margin: 0.3rem 0; color: var(--text-main); }
.odds-example p strong { color: var(--accent); font-weight: 500; }

/* --- tldr --- */
.tldr {
    background: var(--bg-surface);
    border-left: 3px solid var(--accent);
    padding: 1.5rem 1.75rem;
    border-radius: 3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    margin-top: var(--section-gap);
    margin-bottom: 0;
}
.tldr h2 {
    font-size: clamp(1.1rem, 0.5vw + 1rem, 1.25rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
}
.tldr ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
}
.tldr li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    font-size: 0.98rem;
    line-height: 1.6;
}
.tldr li::before {
    content: "▸";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-size: 0.85rem;
}
.tldr .key-takeaway {
    border-top: none;
    padding: 0;
    margin: 0;
}
.tldr .key-takeaway p { display: none; }

/* --- author-bio --- */
.author-bio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 2rem;
    width: 100%;
    justify-content: flex-start;
}

/* =========================================================
   6. TABLE OF CONTENTS — horizontal
   ========================================================= */
.toc {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    margin-top: var(--section-gap);
}
.toc h2 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin: 0 0 0.85rem 0;
    font-weight: 700;
}
.toc ul {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc > ul > li ul { display: none; }
.toc li { margin: 0; }
.toc a {
    display: inline-block;
    padding: 0.32rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: rgba(66, 129, 239, 0.05);
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}
.toc a:hover {
    color: var(--text-main);
    border-color: var(--accent);
    background: rgba(66, 129, 239, 0.12);
}

/* =========================================================
   7. FAQ (details / summary)
   ========================================================= */
[data-content="faq"] details {
    border: 1px solid var(--border);
    border-radius: 3px;
    margin-bottom: 0.75rem;
    background: var(--bg-surface);
    overflow: hidden;
    transition: border-color 0.2s ease;
}
[data-content="faq"] details[open] {
    border-color: var(--accent);
}
[data-content="faq"] summary {
    padding: 1rem 3rem 1rem 1.25rem;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    list-style: none;
    position: relative;
    line-height: 1.35;
}
[data-content="faq"] summary::-webkit-details-marker { display: none; }
[data-content="faq"] summary::after {
    content: "+";
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent);
    transition: transform 0.25s ease;
    line-height: 1;
}
[data-content="faq"] details[open] summary::after {
    content: "−";
    transform: translateY(-50%) rotate(0deg);
}
[data-content="faq"] summary:hover { color: var(--accent-2); }
[data-content="faq"] summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
[data-content="faq"] details > div {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 1.25rem;
}
[data-content="faq"] details[open] > div {
    max-height: 800px;
    opacity: 1;
    padding: 0 1.25rem 1.1rem 1.25rem;
}
[data-content="faq"] details > div p {
    margin: 0;
    color: var(--text-main);
    font-size: var(--fs-body);
    line-height: 1.65;
}

/* =========================================================
   8. HERO SECTION
   ========================================================= */
.hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: var(--bg-surface);
    padding: clamp(3rem, 7vw, 5.5rem) var(--section-px) clamp(3.5rem, 7vw, 5.5rem);
    text-align: center;
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-category {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin: 0 auto 1rem auto;
    text-align: center;
}

.hero::before {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto 1.5rem auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    max-width: 900px;
    margin: 0 auto 1.25rem auto;
    text-align: center;
    font-size: var(--fs-h1);
    line-height: 1.12;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.hero-byline {
    display: block;
    width: fit-content;
    max-width: 100%;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin: 0 auto 2rem auto;
    position: relative;
    z-index: 1;
    text-align: center;
}
.hero-byline strong {
    color: var(--text-main);
    font-weight: 600;
}

.hero-meta-mono {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1.25rem;
    width: fit-content;
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0 auto 2rem auto;
    position: relative;
    z-index: 1;
}
.hero-meta-mono span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.hero-meta-mono .sep {
    color: var(--border);
    gap: 0;
}
.hero-meta-mono .label {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

.hero figure {
    margin: 2.5rem auto 0 auto;
    max-width: min(var(--content-width), 100%);
    position: relative;
    z-index: 1;
}
.hero figure img,
.hero-image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* =========================================================
   9. FOOTER
   ========================================================= */
.site-footer {
    background: var(--bg-footer);
    color: var(--text-secondary);
    padding: clamp(2.5rem, 5vw, 4rem) var(--section-px) 1.5rem;
    font-size: 0.82rem;
    line-height: 1.6;
    border-top: 1px solid var(--border);
    margin-top: var(--section-gap);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 2.5rem auto;
}
.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-main);
    margin: 0 0 1rem 0;
    font-weight: 700;
}
.footer-col p, .footer-col li {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-col a:hover {
    color: var(--accent-2);
    border-bottom-color: var(--accent-2);
}
.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.02em;
}
.footer-bottom p { margin: 0.3rem 0; text-align: center; }

/* =========================================================
   10. RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 1rem;
    }
    .site-logo img { width: 160px; }
    .header-meta { gap: 0.6rem; }
    .header-trust { font-size: 0.68rem; }

    .hero { padding: 2.5rem 1rem 3rem; }
    .hero h1 { font-size: clamp(1.8rem, 6vw + 0.5rem, 2.4rem); }
    .hero-meta-mono {
        font-size: 0.72rem;
        gap: 0.5rem 0.9rem;
        padding: 0.65rem 0.75rem;
    }
    .hero-meta-mono .sep { display: none; }

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

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

    .at-a-glance {
        grid-template-columns: 1fr 1fr;
    }
    .at-a-glance > div {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .at-a-glance > div:nth-child(odd) { border-right: 1px solid var(--border); }
    .at-a-glance > div:nth-last-child(-n+2) { border-bottom: none; }

    .glossary-term {
        flex-direction: column;
        gap: 0.3rem;
    }

    .comparison {
        overflow-x: auto;
    }
    .comparison table { min-width: 500px; }

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

    .worked-example::before { font-size: 0.65rem; }
    .worked-example p:first-child { padding-right: 2rem; font-size: 1rem; }

    .toc ul { gap: 0.35rem; }
    .toc a { font-size: 0.72rem; padding: 0.28rem 0.55rem; }
}

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

/* =========================================================
   11. ACCESSIBILITY
   ========================================================= */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   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; /* Отключаем базовое сжатие WordPress */
    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; /* МЕНЯЕМ GRID НА FLEX, чтобы меню не ломало верстку */
        justify-content: space-between;
        align-items: center;
        gap: 30px;
    }
    
    .site-nav--desktop {
        display: block;
        flex: 1; /* Позволяем меню занять оставшееся место */
        min-width: 0; /* Запрещаем меню выталкивать контент за пределы экрана */
    }

    .mobile-controls {
        display: none; 
    }
    
    /* Стили для списка меню WordPress */
    .site-nav--desktop ul {
        display: flex;
        flex-wrap: wrap; /* Если пунктам тесно, они перенесутся на 2-ю строчку */
        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;
}

#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(255, 255, 255);
}



