@charset "UTF-8";
/* ==========================================================================
   content.css — #body content area, paragraphs, spacing, page ToC,
   child-index cards.
   ========================================================================== */

#body {
    position: relative;
    margin-left: 300px;
    min-height: 100%;
    background: rgb(var(--c-page));
}
#body img, #body .video-container {
    margin: 2rem auto;
    display: block;
    max-width: 100%;
    height: auto;
    text-align: center;
    border-radius: var(--radius-card);
}
#body img.border, #body .video-container.border {
    border: 1px solid rgb(var(--c-line)) !important;
}
#body img.shadow, #body .video-container.shadow {
    box-shadow: var(--shadow-float);
}
#body .bordered {
    border: 1px solid rgb(var(--c-line));
}
#body h1 + hr {
    margin-top: -1.7rem;
    margin-bottom: 3rem;
}

#body .nav {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 4rem;
    font-size: 50px;
    height: 100%;
    cursor: pointer;
    display: table;
    text-align: center;
    color: rgb(var(--c-fg-subtle));
}
#body .nav > i {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}
#body .nav:hover {
    background: rgb(var(--c-raised));
    color: rgb(var(--c-fg));
}
#body .nav.nav-prev { left: 0; }
#body .nav.nav-next { right: 0; }

@media only all and (max-width: 59.938em) {
    #body #navigation {
        position: static;
        margin-right: 0 !important;
        width: 100%;
        display: table;
    }
    #body .nav {
        display: table-cell;
        position: static;
        top: auto;
        width: 50%;
        text-align: center;
        height: 100px;
        line-height: 100px;
        padding-top: 0;
    }
    #body .nav > i { display: inline-block; }
}

#body-inner {
    margin-bottom: 5rem;
}

#body a.anchor-link { color: rgb(var(--c-fg-subtle)); }
#body a.anchor-link:hover { color: rgb(var(--c-accent)); }

.highlightable {
    padding: 25px 0 15px;
}

/* --- Paragraphs & lists --- */
#body p {
    margin: 0;
    padding-top: 1rem;
}
#body p:first-child {
    padding-top: 0;
}
#body ul, #body ol {
    margin-top: 1rem;
}
#body li { margin-bottom: .25rem; }
#body li::marker { color: rgb(var(--c-fg-subtle)); }

/* --- Content body spacing --- */
#body .padding {
    padding: 2rem 3rem;
}
@media only all and (max-width: 47.938em) {
    #body .padding {
        padding: 1rem;
    }
}

/* --- Page actions (Print) — .btn-ghost .btn-sm --- */
.page-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: -1.5rem;
}
.print-button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .375rem .75rem;
    font: 500 .75rem/1.2 var(--font-sans);
    color: rgb(var(--c-fg-muted));
    background: transparent;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-control);
    cursor: pointer;
    transition: color .15s, border-color .15s, background-color .15s;
}
.print-button .fa { margin-right: 0; }
.print-button:hover {
    color: rgb(var(--c-fg));
    border-color: rgb(var(--c-line-strong));
    background: rgb(var(--c-raised));
}

/* ==========================================================================
   Page ToC — card (.card-bare of the frontend)
   ========================================================================== */
#page-with-toc {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

#page-content {
    flex: 1;
    min-width: 0;
    max-width: 80ch;
}

#page-toc {
    position: sticky;
    top: calc(var(--topbar-h) + 1.5rem);
    flex: 0 0 220px;
    margin-left: auto;
    max-height: calc(100vh - var(--topbar-h) - 3rem);
    overflow-y: auto;
    font-size: .8rem;
    line-height: 1.5;
    background: rgb(var(--c-surface));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-card);
    padding: 0;
}

#page-toc .toc-header {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem .85rem;
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: .7rem;
    color: rgb(var(--c-accent));
    text-transform: uppercase;
    letter-spacing: .14em;
    border-bottom: 1px solid rgb(var(--c-line));
}

#page-toc .toc-header .mdi {
    font-size: 1rem;
}

#page-toc .toc-list {
    list-style: none;
    margin: 0;
    padding: .4rem 0;
}

#page-toc .toc-list li {
    margin: 0;
    padding: 0;
}

#page-toc .toc-list li a {
    display: block;
    padding: .25rem .85rem;
    color: rgb(var(--c-fg-muted));
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
}

#page-toc .toc-list li a:hover {
    color: rgb(var(--c-fg));
    text-decoration: none;
}

#page-toc .toc-list li.active > a {
    color: rgb(var(--c-fg));
    border-left-color: rgb(var(--c-accent));
    background: rgb(var(--c-raised));
}

#page-toc .toc-list li.toc-child a {
    padding-left: 1.5rem;
    font-size: .75rem;
    color: rgb(var(--c-fg-subtle));
}

#page-toc .toc-list li.toc-child a:hover,
#page-toc .toc-list li.toc-child.active > a {
    color: rgb(var(--c-fg));
}

/* ==========================================================================
   Child-index — the frontend's .card
   ========================================================================== */
.child-index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.child-card {
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-card);
    padding: 1.1rem 1.25rem;
    background: rgb(var(--c-surface));
    transition: border-color .15s;
}

.child-card:hover {
    border-color: rgb(var(--c-line-strong));
}

.child-card a { text-decoration: none; }
.child-card a strong { color: rgb(var(--c-fg)); }
.child-card a:hover strong { color: rgb(var(--c-accent)); }

.child-card p {
    margin: 0;
    padding-top: .4rem !important;
    font-size: .85rem;
    color: rgb(var(--c-fg-muted));
    line-height: 1.5;
}

/* Layout switch: the cookie's choice (html[data-child-layout]) wins over the page default */
.child-index-wrap { margin-top: 1.5rem; }
.child-index-switch {
    display: flex;
    justify-content: flex-end;
    gap: .4rem;
}
.child-view-table, .child-view-cards { display: none; }
html[data-child-layout="table"] .child-view-table,
html:not([data-child-layout]) [data-default="table"] .child-view-table { display: table; }
html[data-child-layout="cards"] .child-view-cards,
html:not([data-child-layout]) [data-default="cards"] .child-view-cards { display: grid; }
html[data-child-layout="table"] .child-index-switch [data-child-layout="table"],
html[data-child-layout="cards"] .child-index-switch [data-child-layout="cards"],
html:not([data-child-layout]) [data-default="table"] .child-index-switch [data-child-layout="table"],
html:not([data-child-layout]) [data-default="cards"] .child-index-switch [data-child-layout="cards"] {
    color: rgb(var(--c-accent));
    border-color: rgb(var(--c-accent));
}
.child-table { margin-top: 1rem; }
.child-index-wrap .child-index { margin-top: 1rem; }

/* Table layout (the default) — the generic table styles, plus these */
.child-table td:first-child {
    width: 30%;
    font-weight: 600;
}
.child-table td:first-child a { text-decoration: none; }
.child-table td:last-child { color: rgb(var(--c-fg-muted)); }
.child-table tbody tr:hover td { background-color: rgb(var(--c-raised)); }
.child-table td.child-table-extra { white-space: nowrap; }

/* Grouped index (child_index_groups): one heading + table/cards per group */
.child-index-wrap h2.child-index-group { margin-top: 2rem; }
.child-card .child-card-meta {
    padding-top: .3rem;
    font-size: .8rem;
    color: rgb(var(--c-fg-muted));
}

@media (max-width: 1100px) {
    #page-with-toc { display: block; }
    #page-toc { display: none; }
}

/* Mermaid diagrams sit on a card so the light diagram palette reads in dark mode too */
.mermaid {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgb(var(--c-surface));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-card);
    text-align: center;
}

@media only all and (max-width: 59.938em) {
    #body { margin-left: 230px; }
}
@media only all and (max-width: 47.938em) {
    #body { margin-left: 0; width: 100%; }
}
@media (min-width: 48em) {
    #body {
        margin-left: 0;
        flex: 1;
        min-width: 0;
    }
}

@media only all and (max-width: 47.938em) {
    #body { overflow-x: hidden; }
    #body table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
    #body pre { max-width: 100%; }
}
