kbd {
    border: 1px solid var(--divider-color);
    border-radius: 5px;
    background-color: var(--bg-0);
    padding: 0.1rem 0.3rem;
    font-size: 0.8rem;
}

.draft-label {
    margin-inline-end: 0.3rem;
    background-color: var(--primary-color);
    padding-inline: 4px;
    padding-block: 2px;
    color: var(--hover-color);
}

.article-title {
    display: block;
    margin: 0;
    color: var(--text-color-high-contrast);
    font-weight: 550;
    font-size: 2rem;
    line-height: 3rem;
}

iframe {
    display: block;
    margin-inline-start: 15%;
    margin-inline-end: 15%;
    margin-block-end: 3vmin;
    border: none;
    aspect-ratio: 16/9;
    width: 100vmin;
    max-width: 70%;
}

ul {
    margin-top: 0;
}

.toc-container {
    margin-block-end: 4vmin;
}

.padding-top {
    padding-top: 4vmin;
}

.title-container {
    padding-bottom: 8px;
}

.bottom-divider {
    border-bottom: var(--divider-color) solid 0.5px;
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--hover-color);
    text-shadow: none;
}

::selection {
    background: var(--primary-color);
    color: var(--hover-color);
}

.nav.tags {
    display: inline-block;
}

blockquote {
    margin: 0;
    border-inline-start: 0.3rem solid var(--primary-color);
    padding-inline-start: 1em;
}

a {
    position: relative;
    color: var(--primary-color);
    font-weight: inherit;
    text-decoration: inherit;
}

a:hover {
    background-color: var(--primary-color);
    color: var(--hover-color);
}

a:hover rt {
    color: var(--text-color);
}

a:not(.no-hover-padding):hover::after {
    display: inline-block;
    position: absolute;
    z-index: -1;
    inset-block-end: 0;
    inset-block-start: 0;
    inset-inline-end: -0.15em;
    inset-inline-start: -0.15em;
    background-color: var(--primary-color);
    max-inline-size: 105%;  // This fixes multi-line links (see #225)
    content: "";
}

@media screen and (max-width: 600px) {
    .list > ul {
        margin: 0;
        padding: 0;
    }
}

hr {
    margin: 3.5rem 0 1rem;
    border: none;
    background-color: var(--divider-color);
    height: 1px;
}

.footnote-reference {
    font-size: 0.7rem;
    font-family: var(--serif-font);
}

.footnote-definition {
    margin-block-end: 0.6rem;

    sup {
        margin-inline-end: 0.15rem;
        font-size: 0.75rem;
        font-family: var(--serif-font);
    }

    p {
        display: inline;
    }
}

.footnote-backlink {
    margin-inline-start: 0.2rem;
    font-size: 0.8rem;
}

.footnotes-list a[href^="#fr-"] {
    font-size: 0.8rem;
}

.references p {
    margin-inline-start: 2.4rem;
    text-indent: -2.4rem;
}

.info-box {
    margin-top: 1rem;
    margin-block-end: 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    border-inline-start-width: 0.3rem;
    padding: 1rem;
    text-align: center;
}

#page-content {
    margin-top: 4vmin;
}

.hidden {
    display: none;
    visibility: hidden;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    position: absolute;
    margin: -1px;
    border: 0;
    padding: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}

details summary {
    cursor: pointer;
}

.interactive-icon {
    cursor: pointer;

    path {
        fill: var(--text-color);
    }

    :hover path {
        fill: var(--meta-color);
    }
}

.article-navigation {
    display: flex;
    margin-block-start: 2rem;
    border-block-start: var(--divider-color) solid 0.5px;
    padding-block-start: 2rem;

    div:first-child {
        flex: 1;
        text-align: start;
    }

    div:last-child {
        flex: 1;
        text-align: end;
    }

    div p {
        color: var(--meta-color);
        font-weight: 300;
        line-height: 1.2rem;
        font-family: var(--sans-serif-font);
        letter-spacing: -0.4px;
    }

    @media (max-width: 600px) {
        flex-direction: column;

        div {
            text-align: center !important;
        }
    }
}

:dir(rtl) .arrow {
    display: inline-block;
    transform: scaleX(-1);
}

// This for the arrows that point to a corner, (e.g. '↗', '↘', '↙', '↖')
:dir(rtl) .arrow-corner {
    display: inline-block;
    transform: rotate(-90deg);
}

.mermaid p {
    font-family: var(--sans-serif-font) !important;
}

.mermaid .node .label {
    max-width: none !important;
}

// For the `force_text_direction` shortcode.
[data-force-text-direction="ltr"] {
    direction: ltr;
    unicode-bidi: bidi-override;
}

[data-force-text-direction="rtl"] {
    direction: rtl;
    unicode-bidi: bidi-override;
}

[data-force-text-direction="ltr"] *,
[data-force-text-direction="rtl"] * {
    direction: inherit;
}

.title-with-jump {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-with-jump h1 {
    flex: 1;
}

.jump-link {
    flex-shrink: 0;
    font-size: 0.9rem;
}

@media (max-width: 500px) {
    .title-with-jump {
        flex-direction: column;
    }
}
