/* The kaas-rs bar, for an mdBook book: the styles for kaas-rs-nav.js, which
   says what this is and where the canonical copy lives (kaas-rs/kaas-landing-page
   mdbook/). Colours come from mdBook's own theme variables, so the block
   follows whichever theme the reader picked: rust, light, coal, navy or ayu. */

.sidebar .kaasrs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 14px 10px 12px;   /* 10px: the TOC's own inset, so the two line up */
    border-bottom: 1px solid var(--sidebar-spacer);
    background-color: var(--sidebar-bg);
}
/* the TOC scrolls in the space under the block (its height is set by the script) */
.sidebar .kaasrs ~ .sidebar-scrollbox {
    top: var(--kaasrs-height, 0px);
}

.kaasrs__home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-fg);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-decoration: none;
}
.kaasrs__home img { display: block; }
.kaasrs__home:hover { color: var(--sidebar-active); text-decoration: none; }

/* two by two: four labels don't fit one row at mdBook's 300px sidebar, and a
   grid wraps tidily where a wrapping row strands the last link alone */
.kaasrs__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-top: 10px;
}
.kaasrs__links a {
    color: var(--sidebar-fg);
    opacity: 0.85;
    text-decoration: none;
}
.kaasrs__links a:hover { color: var(--sidebar-active); opacity: 1; text-decoration: none; }
.kaasrs__links a[aria-current] { color: var(--sidebar-active); opacity: 1; font-weight: 600; }

/* the logo among the menu bar's icons, sized and spaced like them */
#menu-bar .kaasrs-menu-home {
    display: inline-flex;
    align-items: center;
    height: var(--menu-bar-height);
    padding: 0 8px;
    vertical-align: top;
}
#menu-bar .kaasrs-menu-home img { display: block; transition: transform 0.2s; }
#menu-bar .kaasrs-menu-home:hover img { transform: scale(1.1); }
@media only screen and (max-width: 420px) {
    #menu-bar .kaasrs-menu-home { padding: 0 5px; }
}
@media print {
    .kaasrs, .kaasrs-menu-home { display: none; }
}
