/* The Compendium — index + chapter pages (info/knowledge-base/compendium.php)
   Palette: the site's scheme-01 (--primary #5623d8, --secondary #6a79fa, --tertiary #e615af). */

.cmp-hero .subtitle a { color: inherit; text-decoration: none; }
.cmp-hero .subtitle a:hover { text-decoration: underline; }
.cmp-hero h1 { font-size: clamp(30px, 4.4vw, 52px); }
.cmp-meta { opacity: .7; font-size: 14px; letter-spacing: .02em; }

/* ── Index ─────────────────────────────────────────────── */
.cmp-lead {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 32px;
    align-items: center;
    justify-content: space-between;
    padding: 26px 30px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), .18), rgba(var(--secondary-color-rgb), .06));
}
.cmp-lead p { flex: 1 1 380px; margin: 0; font-size: 17px; line-height: 1.7; }

.cmp-group {
    margin: 46px 0 16px;
    font-size: 15px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--secondary-color);
}
.cmp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}
.cmp-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: baseline;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    color: inherit;
    text-decoration: none;
    transition: border-color .2s, background .2s, transform .2s;
}
.cmp-card:hover, .cmp-card:focus-visible {
    border-color: rgba(var(--secondary-color-rgb), .7);
    background: rgba(var(--secondary-color-rgb), .08);
    transform: translateY(-2px);
    color: inherit;
}
.cmp-card-num {
    grid-row: span 2;
    font-family: var(--title-font);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: rgba(var(--secondary-color-rgb), .85);
}
.cmp-card-title { font-family: var(--title-font); font-size: 17px; font-weight: 600; line-height: 1.3; color: #fff; }
.cmp-card-meta { margin-top: 6px; font-size: 13px; opacity: .6; }

/* ── Chapter nav ───────────────────────────────────────── */
/* The theme's #wrapper { overflow: hidden } makes it a scroll container, which stops any
   position: sticky inside it. clip hides the same overflow without that side effect.
   (This stylesheet loads only on Compendium pages.) */
#wrapper { overflow: clip; }

/* The theme collapses EVERY <nav> below 992px (style.css: nav { height: 0 }) for its mobile
   menu; that would stack the chapter list and the prev/next bar on top of the text. */
nav.cmp-nav, nav.cmp-pager { height: auto; }

/* Sticky on the <nav>: its parent <aside> spans the full row height, so it has room to stick. */
@media (min-width: 992px) {
    .cmp-nav { position: sticky; top: 96px; }
}
.cmp-nav-desktop {
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
}
.cmp-nav-home {
    display: block;
    margin-bottom: 12px;
    font-family: var(--title-font);
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--secondary-color);
    text-decoration: none;
}
.cmp-nav-list { list-style: none; padding: 0; margin: 0; }
.cmp-nav-list > li > a {
    display: flex;
    gap: 10px;
    padding: 6px 10px;
    border-left: 2px solid rgba(255, 255, 255, .08);
    font-size: 13.5px;
    line-height: 1.35;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    transition: color .15s, border-color .15s, background .15s;
}
.cmp-nav-list > li > a .n { flex: none; width: 1.4em; text-align: right; opacity: .55; font-variant-numeric: tabular-nums; }
.cmp-nav-list > li > a:hover { color: #fff; }
.cmp-nav-list > li.current > a {
    color: #fff;
    font-weight: 600;
    border-left-color: var(--secondary-color);
    background: rgba(var(--secondary-color-rgb), .1);
}
.cmp-nav-sections { list-style: none; margin: 4px 0 10px; padding: 0 0 0 34px; }
.cmp-nav-sections a {
    display: block;
    padding: 3px 8px;
    font-size: 12.5px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .5);
    text-decoration: none;
    border-left: 1px solid rgba(255, 255, 255, .08);
}
.cmp-nav-sections a:hover, .cmp-nav-sections a.active { color: #fff; border-left-color: var(--tertiary-color); }

.cmp-nav-mobile {
    margin-bottom: 26px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
}
.cmp-nav-mobile summary { padding: 12px 16px; cursor: pointer; font-weight: 600; }
.cmp-nav-mobile[open] summary { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.cmp-nav-mobile .cmp-nav-list { padding: 8px 6px 10px; }

/* ── Chapter content ───────────────────────────────────── */
.compendium-content { font-size: 16.5px; line-height: 1.75; max-width: 78ch; }
.compendium-content p { margin: 0 0 16px; }
.compendium-content h2 {
    margin: 46px 0 16px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 23px;
    scroll-margin-top: 100px;
}
.compendium-content > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.compendium-content [id] { scroll-margin-top: 100px; }
.compendium-content a { color: var(--secondary-color); text-underline-offset: 3px; }
.compendium-content a:hover { color: #fff; }
.compendium-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; }
.compendium-content b, .compendium-content strong { color: #fff; font-weight: 700; }

/* Lists rebuilt from Word's list paragraphs */
.compendium-content ul, .compendium-content ol { margin: 4px 0 18px; padding-left: 1.6em; }
.compendium-content li { margin: 0 0 7px; padding-left: .3em; }
.compendium-content li > ul, .compendium-content li > ol { margin: 8px 0 4px; }
.compendium-content ul > li::marker { color: var(--secondary-color); }
.compendium-content ul ul > li::marker { color: rgba(var(--secondary-color-rgb), .7); }
.compendium-content ol > li::marker { color: var(--secondary-color); font-weight: 700; }
.compendium-content ul ul { list-style-type: circle; }
.compendium-content ul ul ul { list-style-type: square; }
/* Top-level step lists read as a sequence: a quiet rail on the left */
.compendium-content > ul, .compendium-content > ol {
    padding: 14px 18px 8px 2.4em;
    border-left: 2px solid rgba(var(--secondary-color-rgb), .35);
    border-radius: 0 10px 10px 0;
    background: rgba(255, 255, 255, .025);
}

/* Terminal commands — Word marks them black; force them readable */
.compendium-content code, .compendium-content pre {
    background: #10151d;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 5px;
    font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    color: #e8edf3;
}
.compendium-content code { padding: 2px 7px; font-size: 14px; font-weight: 500; white-space: pre-wrap; }
.compendium-content code * { color: #e8edf3 !important; font: inherit !important; }
.compendium-content .code-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 4px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 5px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.compendium-content .code-copy:hover, .compendium-content .code-copy:focus-visible {
    background: var(--secondary-color);
    color: #fff;
    outline: none;
}
.compendium-content .code-copy.copied { background: #2e8b57; color: #fff; }

/* ── Models table ──────────────────────────────────────── */
.cmp-table {
    max-height: 78vh;
    overflow: auto;
    margin: 20px 0 28px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: #0d1118;
}
.cmp-table:focus-visible { outline: 2px solid var(--secondary-color); outline-offset: 2px; }
.compendium-content table { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; font-size: 12.5px; line-height: 1.4; }
.compendium-content td, .compendium-content th {
    padding: 7px 9px;
    vertical-align: top;
    border-right: 1px solid rgba(255, 255, 255, .06);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .82);
}
.compendium-content td p, .compendium-content th p { margin: 0; }
.compendium-content table a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); }
.compendium-content table a:hover { color: #fff; text-decoration-color: currentColor; }
/* Header row stays visible while the table scrolls */
.compendium-content tr:first-child > * {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #1a1530;
    color: #fff;
    font-family: var(--title-font);
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(var(--secondary-color-rgb), .5);
}
.compendium-content td.st-none { background: #151a24; color: #fff; font-weight: 600; }
.compendium-content td.st-no    { background: rgba(214, 64, 82, .22);  box-shadow: inset 3px 0 0 #d64052; }
.compendium-content td.st-maybe { background: rgba(240, 168, 40, .2);  box-shadow: inset 3px 0 0 #f0a828; }
.compendium-content td.st-yes   { background: rgba(80, 190, 110, .2);  box-shadow: inset 3px 0 0 #50be6e; }

/* ── Prev / next ───────────────────────────────────────── */
.cmp-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 56px 0 10px; max-width: 78ch; }
.cmp-pager-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}
.cmp-pager-link.next { text-align: right; }
.cmp-pager-link .dir { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary-color); }
.cmp-pager-link .t { font-family: var(--title-font); font-size: 17px; font-weight: 600; color: #fff; }
.cmp-pager-link:hover, .cmp-pager-link:focus-visible { border-color: rgba(var(--secondary-color-rgb), .7); background: rgba(var(--secondary-color-rgb), .08); }

@media (max-width: 767px) {
    .compendium-content { font-size: 16px; }
    .compendium-content > ul, .compendium-content > ol { padding: 12px 12px 6px 2em; }
    .cmp-pager { grid-template-columns: 1fr; }
    .cmp-pager-link.next { text-align: left; }
    .cmp-lead { padding: 20px; }
}

/* ── Callouts (2026-10-22: the site is the source; replaces Word's colour coding) ── */
.compendium-content .cmp-updated {
    padding: 10px 14px;
    margin-bottom: 22px;
    border-left: 3px solid var(--secondary-color);
    border-radius: 0 8px 8px 0;
    background: rgba(var(--secondary-color-rgb), .1);
    font-size: 14.5px;
    line-height: 1.6;
}
.compendium-content .cmp-updated strong { color: #fff; }
.compendium-content .cmp-status {
    padding: 18px 22px;
    margin: 0 0 30px;
    border: 1px solid rgba(240, 168, 40, .45);
    border-radius: 12px;
    background: rgba(240, 168, 40, .08);
}
.compendium-content .cmp-status h2 { margin-top: 0; padding-top: 0; border-top: 0; font-size: 20px; }
.compendium-content .cmp-status ul { margin-bottom: 6px; }
/* Warnings were RED TEXT in Word */
.compendium-content .cmp-warn { color: #ff6b7a; font-weight: 700; }
/* Planned improvements were green-highlighted in Word */
.compendium-content mark.cmp-planned {
    padding: 0 4px;
    border-radius: 3px;
    background: rgba(80, 190, 110, .22);
    color: inherit;
}
