:root {
    --text-base: 1rem !important;
}

html,
body {
    font-size: 16px !important;
}

.card {
    --card-fs: 1rem;
}

/* ── Desktop sidebar ─────────────────────────────────── */
@media (min-width: 768px) {
    #sidebar-details > .sidebar-summary {
        display: none;
    }

    #sidebar-menu {
        position: sticky;
        top: 1rem;
        margin-top: 0;
    }
}

/* ── Mobile sidebar toggle ───────────────────────────── */
@media (max-width: 767px) {
    #sidebar-details[open] .sidebar-chevron {
        display: inline-block;
        transform: rotate(180deg);
    }

    #sidebar-details .sidebar-summary {
        border-radius: var(--rounded-box, 1rem);
    }

    #sidebar-details[open] .sidebar-summary {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        margin-bottom: 0;
    }

    #sidebar-menu {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        margin-top: 0;
    }
}

/* ── Section visibility ──────────────────────────────── */
.section-container {
    display: none;
}

.section-container.current {
    display: flex;
    flex-direction: column;
}

body.slide-mode-off .section-container {
    display: flex;
    flex-direction: column;
}

/* ── Section nav (prev / next) ───────────────────────── */
.section-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
}

.btn-next-section,
.btn-prev-section {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    background-color: transparent;
    color: oklch(var(--p));
    border: 1.5px solid oklch(var(--p));
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-next-section:hover,
.btn-prev-section:hover {
    background-color: oklch(var(--p));
    color: oklch(var(--pc));
}

/* ── Sidebar active indicator ────────────────────────── */
#sidebar-menu li a.active {
    color: purple;
    border-left: 4px solid purple;
    border-radius: 0;
    background-color: transparent;
    padding-left: calc(1rem - 4px);
}

/* ── Misc ────────────────────────────────────────────── */
.sidebar-chevron {
    transition: transform 0.2s ease;
    font-style: normal;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 10;
}

.prompt-block {
            margin-top: 1rem;
            padding: 1rem;
            border-radius: 0.5rem;
            background: rgba(120, 120, 120, 0.08);
            border: 1px solid rgba(120, 120, 120, 0.2);
        }

.card-section {
    margin-top: 16px;
}

#slideModeSwitch {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    padding: 0.6rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid oklch(var(--bc) / 0.2);
    background: oklch(var(--b1));
    box-shadow: 0 8px 24px oklch(var(--bc) / 0.15);
    display: inline-flex;
    align-items: center;
}

#slideModeSwitch:hover {
    box-shadow: 0 10px 28px oklch(var(--bc) / 0.22);
}

.course-status-notice {
    position: fixed;
    right: 1rem;
    top: 4.75rem;
    z-index: 30;
    width: fit-content;
    max-width: min(24rem, calc(100vw - 2rem));
}

@media (max-width: 767px) {
    .course-status-notice {
        top: 4.25rem;
    }
}

/* Keep figure captions below images across week pages. */
.section-container .card-body figure {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ── Background attention animation ─────────────────── */

/* Contain the absolute-positioned animation overlay */
.section-container {
    position: relative;
}

/* Lift card content above the animation overlay */
.section-container > .card-body,
.section-container > .section-nav {
    position: relative;
    z-index: 1;
}

/* The animation container — fills the card as a background layer */
.bg-attention-anima {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--color-base-100);
}

/* Individual dot circles injected by attention-anima.js */
.bg-attention-anima .circle {
    width: 10px;
    height: 10px;
    border-radius: 0;
    background-color: #f4c542;
    flex-shrink: 0;
    transform: scale(0.5);
}
