.article-rich-content.probability-course {
    max-width: 100%;
}

.probability-course > p,
.probability-course > figure {
    max-width: 72ch;
}

.probability-course > nav {
    margin: 1.6rem 0 2rem;
    padding: 1.4rem;
    background: linear-gradient(135deg, #f4f8ff, #f9f5ff);
    border-left-color: #4f46c8;
}

.probability-course > nav ol {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: 0.55rem 1.5rem;
}

.probability-course > details {
    margin: 1rem 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #cbd8ea;
    border-radius: 1rem;
    box-shadow: 0 0.45rem 1.25rem rgb(22 38 68 / 7%);
}

.probability-course > details > summary {
    padding: 1rem 1.25rem;
    color: var(--ink);
    background: linear-gradient(115deg, #f2f7ff, #f7f4ff);
    cursor: pointer;
    list-style-position: inside;
}

.probability-course > details > summary:hover,
.probability-course > details[open] > summary {
    background: linear-gradient(115deg, #e7f1ff, #eee9ff);
}

.probability-course > details > summary:focus-visible {
    outline: 3px solid #704dc3;
    outline-offset: -3px;
}

.probability-course > details > summary h2 {
    display: inline;
    margin: 0;
    font-size: clamp(1.15rem, 2.3vw, 1.45rem);
    line-height: 1.35;
    scroll-margin-top: 7rem;
}

.probability-course > details > :not(summary) {
    margin-right: clamp(1rem, 3vw, 1.7rem);
    margin-left: clamp(1rem, 3vw, 1.7rem);
}

.probability-course > details > summary + * {
    margin-top: 1.2rem;
}

.probability-course > details > :last-child {
    margin-bottom: 1.4rem;
}

.probability-course > details h3,
.probability-course > details h4 {
    margin-top: 1.6rem;
}

.probability-course > details p:has(> mjx-container) {
    overflow-x: auto;
    padding: 0.65rem 0.8rem;
    background: #f8faff;
    border: 1px solid #e3eaf5;
    border-radius: 0.55rem;
}

@media print {
    .probability-course > details {
        overflow: visible;
        break-inside: auto;
        box-shadow: none;
    }

    .probability-course > details > summary {
        background: #fff;
        break-after: avoid;
    }
}
