/* Style #, ##, ### headings */
article h1 {
    font-size: 3rem;
    font-weight: bold;
    font-style: normal;
    line-height: 1;
    margin-bottom: 2rem;
    color: var(--header-color);
}

article h2 {
    font-size: 1.8rem;
    font-weight: bold;
    font-style: normal;
    line-height: 1;
    margin-top: 1.8rem;
}

article h3 {
    font-size: 1.2rem;
    font-weight: bold;
    font-style: normal;
    margin-top: 1.5rem;
    line-height: 1;
}

article h4 {
    font-size: 0.9rem;
    font-weight: bold;
    font-style: normal;
    margin-top: 1.5rem;
    line-height: 1;
}

/* Emphasize links on hover without showing an underline */
article a:hover {
    background-color: rgba(0, 71, 186, 0.08);
    border-radius: 0.15rem;
}

html[data-theme="dark"] article a:hover {
    background-color: rgba(209, 204, 189, 0.16);
}

/* Indent lists in page content */
article ol,
article ul {
    margin-left: 1.25rem;
    padding-left: 1.75rem;
}

/* Tighten spacing between paragraphs and lists in page content */
article p:has(+ ol),
article p:has(+ ul) {
    margin-bottom: 0.35rem;
}

article p+ol,
article p+ul {
    margin-top: 0rem;
}

article ol,
article ul {
    margin-bottom: 0rem;
}

/* Add space when a list is followed immediately by a notebook/code cell */
article ol+div.cell,
article ul+div.cell,
article ol+div.highlight,
article ul+div.highlight {
    margin-top: 0.8rem;
}

/* Horizontal scrolling for long left side bar titles */
/* .sidebar-tree .reference {
    white-space: nowrap;
    overflow-x: auto;
} */

/* Code block backgrounds */
/* pre {
    background-color: rgb(255, 250, 238);
} */


/* === Exercise admonition === */
.admonition.exercise {
    /* Light background derived from primary color */
    /* background-color: rgba(0, 71, 186, 0.08); */

    /* Left border */
    border-left: 0.35rem solid var(--color-exercise-border);

    /* Right border */
    border-right: 0.35rem solid var(--color-exercise-border);

    /* Bottom border */
    border-bottom: 0.35rem solid var(--color-exercise-border);
}

.admonition.exercise>.admonition-title {
    background-color: var(--color-exercise-border);
    color: var(--color-exercise-titletext);
    font-weight: 650;
    font-size: 1em;
}

.admonition.exercise>.admonition-title::before {
    /* White icon */
    background-color: var(--color-exercise-titletext);
}


/* === Test cases admonition === */
.admonition.testcase {
    /* Light background derived from primary color */
    /* background-color: rgba(0, 71, 186, 0.08); */

    /* Left border */
    border-left: 0.1rem solid #D1CCBD;

    /* Right border */
    border-right: 0.1rem solid #D1CCBD;

    /* Bottom border */
    border-bottom: 0.1rem solid #D1CCBD;
}

.admonition.testcase>.admonition-title {
    background-color: #D1CCBD;
    color: black;
}

.admonition.testcase>.admonition-title::before {
    /* White icon */
    background-color: black;
}

/* === Math rendering === */
/* Tighten vertical spacing around display math from $$ blocks */
div.math {
    margin-top: 0;
    margin-bottom: 0;
}

/* MathJax also adds its own display-math margin */
div.math mjx-container[display="true"] {
    margin-top: .45em;
    margin-bottom: .45em;
}


/* === Images === */
/* Frame screenshots and rendered figures that need separating from the page */
img.with-border {
    border: 2px solid #D1CCBD;
    border-radius: 6px;
    padding: 20px;
    box-sizing: border-box;
}
