/* latin-ext */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url("/fonts/lato-v23-latin-ext_latin/lato-v23-latin-ext_latin-regular.woff2")
            format("woff2"),
        url("/fonts/lato-v23-latin-ext_latin/lato-v23-latin-ext_latin-regular.woff")
            format("woff");
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
        U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url("/fonts/lato-v23-latin/lato-v23-latin-regular.woff2")
            format("woff2"),
        url("/fonts/lato-v23-latin/lato-v23-latin-regular.woff") format("woff");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
        U+2215, U+FEFF, U+FFFD;
}

/* Shared by website pages and the website-only generated docs shell. */
#top-bar {
    --gray-bg: #f4f8f9;
    --top-bar-fg: #000;
    --primary-1: #9b6bf2;
    font-family: "Lato", sans-serif;
    font-size: 18px;
    line-height: 24px;
}
#top-bar a { text-decoration: none; }
#top-bar a:hover { text-decoration: underline; }
#top-bar a:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
#top-bar,
#top-bar nav {
    background-color: var(--gray-bg);
}

#top-bar {
    box-sizing: border-box;
    width: 100%;
}

#top-bar nav {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding-right: 9px;
}

#nav-home-link {
    display: inline-block;
    color: var(--top-bar-fg);
    font-size: 1.8rem;
    padding: 4px;
}

.home-link-text {
    padding: 8px;
    font-size: 24px;
    position: relative;
    top: -0.6rem;
}

#top-bar-links a,
#top-bar-links label {
    box-sizing: border-box;
    color: var(--top-bar-fg);
    display: inline-block;
    padding: 12px 16px;
    margin: 0 2px;
}

#top-bar .roc-logo {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    fill: var(--primary-1);
    text-shadow: 1px 1px 1px #010101;
    position: relative;
    top: -2px;
}

@media only screen and (max-width: 1023px) {
    .home-link-text {
        display: none; /* Don't show "Roc" in the header next to the logo, to save space */
    }
    #top-bar-links {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr; /* Three equal-width columns */
        grid-template-rows: auto auto; /* Two rows */
    }
    #top-bar-links > :nth-child(3n + 1) {
        text-align: left;
    }
    #top-bar-links > :nth-child(3n + 2) {
        text-align: center;
    }
    #top-bar-links > :nth-child(3n + 3) {
        text-align: right;
    }
    #top-bar-links a,
    #top-bar-links label {
        font-size: 1.2rem;
        padding: 12px 0.5rem;
        margin: 0;
    }
}

@media (prefers-color-scheme: dark) {
    #top-bar { --gray-bg: #202746; --top-bar-fg: #ccc; --primary-1: #9c7cea; }
}
