/* ================================
   Learning Zone — Left TOC Layout
   Neutral Dark Theme (no blue tint)
   ================================ */

/* ------- Theme Tokens ------- */
:root {
    --wagerGreen: #1cad75;
    --bg: #191919;
    /* page */
    --panel: #1a1a1a;
    /* cards/sidebar */
    --panelElev: #242424;
    /* hover/active neutral */
    --text: #e7e7ea;
    --muted: #b7b8bf;
    --border: #2f3136;
    /* neutral border */
    --ring: rgba(28, 173, 117, .5);
    --shadow: 0 10px 25px rgba(0, 0, 0, .35);

    /* Global type scale (+25%) */
    --fs-mult: 1.25;
    --lh-base: 1.7;
    /* overall line spacing */
    --lh-head: 1.25;
}

/* Smooth anchor scroll */
html {
    scroll-behavior: smooth;
}

/* Base */
body,
.baseholder {
    line-height: var(--lh-base);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
    font-size: calc(1rem * var(--fs-mult));
    /* +25% base copy */
}

/* Links */
a {
    color: var(--wagerGreen);
    text-decoration: none;
}

a:hover {
    color: white;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Media */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* ---------------- Layout ---------------- */
.main-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
}

/* Left sidebar (TOC) */
.lz-toc {
    position: sticky;
    top: 24px;
    /* adjust if header is fixed */
    align-self: start;
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0)), var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 14px;
    max-height: calc(100vh - 48px);
    overflow: auto;
}

/* Sidebar title */
.lz-toc .toc-title {
    font-weight: 700;
    font-size: calc(14px * var(--fs-mult));
    letter-spacing: .25px;
    color: var(--muted);
    margin: 4px 8px 10px;
    text-transform: uppercase;
}

/* ---------------- TOC (Grouped) ---------------- */
/* Root list */
.lz-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Module block */
.lz-toc-module {
    margin: 10px 0 14px;
}

/* Big module title (clickable) */
.lz-toc-module-title {
    display: block;
    padding: 12px 12px;
    border-radius: 12px;
    font-weight: 800;
    font-size: calc(18px * var(--fs-mult));
    line-height: 1.25;
    color: var(--text);
    border: 1px solid transparent;
    background: transparent;
    transition: background .15s ease, border-color .15s ease, transform .06s ease;
}

.lz-toc-module-title:hover {
    background: rgba(255, 255, 255, .035);
    border-color: var(--border);
}

/* Sub-list */
.lz-toc-sublist {
    list-style: none;
    margin: 6px 0 0 12px;
    padding-left: 12px;
    border-left: 1px dashed var(--border);
}

/* Sub-links (smaller, with dot bullet) */
.lz-toc-sublist>li>a {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    margin: 2px 0;
    border-radius: 10px;
    color: var(--text);
    border: 1px solid transparent;
    background: transparent;
    transition: background .15s ease, border-color .15s ease, transform .06s ease;
    line-height: 1.25;
    font-size: calc(13px * var(--fs-mult));
}

.lz-toc-sublist>li>a:hover {
    background: rgba(255, 255, 255, .03);
    border-color: var(--border);
}

.lz-toc-sublist>li>a::before {
    content: "•";
    color: var(--muted);
    flex: 0 0 auto;
    line-height: 1;
    margin-top: 2px;
    opacity: .85;
}

/* Anchor focus spacing */
:target {
    scroll-margin-top: 80px;
}

/* Subtle lift on hover/focus (if :has supported) */
@supports(selector(.lz-toc:has(a))) {
    .lz-toc a:is(:hover, :focus-visible) {
        transform: translateY(-1px);
    }
}

/* ---------------- Content ---------------- */
.main-lz-container {
    min-width: 0;
    display: grid;
    gap: 18px;
}

/* Content cards */
.lz-container {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 20px 22px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.lz-container:hover {
    background: var(--panelElev);
}

.lz-container:target {
    border-color: var(--wagerGreen);
    box-shadow: 0 0 0 3px var(--ring), var(--shadow);
}

/* Typography rhythm */
.lz-container h4 {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: calc(13px * var(--fs-mult));
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--muted);
}

.lz-container h2 {
    margin: 6px 0 10px;
    font-size: calc(22px * var(--fs-mult));
    line-height: 1.2;
}

.lz-container h3 {
    margin: 12px 0 8px;
    font-size: calc(18px * var(--fs-mult));
}

.lz-container p {
    margin: 8px 0;
    color: #f0f0f2;
}

.lz-container ul,
.lz-container ol {
    margin: 10px 0;
    padding-left: 20px;
}

.lz-container li {
    margin: 4px 0;
}

/* Badges (optional) */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    font-size: calc(12px * var(--fs-mult));
}

/* -------- Dropdown blocks -------- */
.learningzone-dropdown-container {
    background: #202020;
    /* neutral (was bluish) */
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin: 12px 0;
}

.learningzone-dropdown-container .dropdown-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    cursor: default;
    padding: 12px 14px;
    font-weight: 600;
}

.learningzone-dropdown-container .dropdown-title h4 {
    margin: 0;
    font-size: calc(15px * var(--fs-mult));
    color: #f5f5f7;
    text-transform: none;
}

.learningzone-dropdown-container .dropdown-title::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(-45deg);
    opacity: .8;
}

.learningzone-dropdown-container .dropdown-content {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: #1a1a1a;
    /* neutral (was #0f1320) */
}

/* -------- 16:9 wrappers -------- */
[style*="padding-bottom:56.25%"][style*="position:relative"] {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: #121212;
    /* neutral (was #0e111a) */
}

/* -------- Tables -------- */
.lz-container table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    background: #1d1d1f;
    /* neutral (was #131726) */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 10px 0 12px;
}

.lz-container th,
.lz-container td {
    padding: 10px 12px;
    border-bottom: 1px solid #33353b;
    /* neutral (was #22283a) */
    text-align: left;
}

.lz-container thead th {
    background: #242628;
    /* neutral (was #1a1f30) */
    font-weight: 700;
}

.lz-container tr:hover td {
    background: rgba(255, 255, 255, .03);
}

/* -------- Scrollbar (neutral) -------- */
.lz-toc::-webkit-scrollbar {
    width: 10px;
}

.lz-toc::-webkit-scrollbar-thumb {
    background: #3a3b3f;
    /* neutral (was #2a3044) */
    border-radius: 10px;
    border: 2px solid #1a1b1e;
    /* neutral (was #181c29) */
}

.lz-toc::-webkit-scrollbar-track {
    background: #141516;
    /* neutral (was #141722) */
}

/* -------- Glossary -------- */
.lz-glossary-term {
    margin: 16px 0 6px;
    font-size: calc(16px * var(--fs-mult));
    font-weight: 700;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fafafc;
    position: relative;
}

.lz-glossary-term::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--wagerGreen);
    box-shadow: 0 0 0 4px rgba(28, 173, 117, .15);
    flex: 0 0 auto;
}

.lz-glossary-def {
    margin: 4px 0 10px;
    color: #d9dae1;
}

/* Asian Handicap tables: responsive 2-up grid */
.lz-ah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

/* Minor polish specific to these tables */
.lz-ah thead th[colspan="3"] {
    text-align: left;
    font-size: calc(15px * var(--fs-mult));
    background: #222;
    /* neutral matches your dark theme */
}

.lz-ah tbody td:first-child {
    font-weight: 700;
    color: var(--muted);
}


/* -------- Responsive -------- */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .lz-toc {
        position: static;
        max-height: none;
    }
}

@media (max-width: 600px) {
    .lz-container {
        padding: 16px;
    }

    .lz-toc-module-title {
        font-size: calc(16px * var(--fs-mult));
    }

    .lz-toc-sublist>li>a {
        font-size: calc(13px * var(--fs-mult));
    }

    .lz-container h2 {
        font-size: calc(20px * var(--fs-mult));
    }
}