@font-face {
    font-family: Geometria;
    src:
        url('Geometria.ttf') format('truetype'),
        url('Geometria.otf') format('opentype'),
        url('Geometria.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--body-bg);
    font-family: Geometria, Arial, Helvetica, sans-serif;
    color: var(--content-fg);
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-frame {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.site-width-fixed .site-frame {
    max-width: var(--site-max-width);
}

.site-width-full .site-frame {
    max-width: none;
}


/* HEADER */

.header {
    flex: 0 0 auto;
    background: var(--header-bg);
}

.navheader {
    min-height: var(--header-height);
    padding:
        var(--header-pad-t)
        var(--header-pad-r)
        var(--header-pad-b)
        var(--header-pad-l);

    display: grid;
    grid-template-columns:
        minmax(0, var(--logo-w))
        minmax(0, 1fr)
        max-content;

    gap: var(--header-gap);
    align-items: center;
}

.header-logo {
    min-width: 0;
    display: flex;
    align-items: center;
}

.header-logo img {
    display: block;
    max-width: var(--logo-w);
    max-height: var(--logo-h);
    width: auto;
    height: auto;

    margin:
        var(--logo-mt)
        var(--logo-mr)
        var(--logo-mb)
        var(--logo-ml);
}

.header-name {
    min-width: 0;
    padding-top: var(--header-name-top);
    text-align: var(--header-name-align);
    overflow: hidden;
}

.mlogo,
.llogo {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.mlogo {
    font-size: var(--title-size);
    line-height: 1.15;
    font-weight: var(--title-weight);
    color: var(--title-color);
}

.llogo {
    margin-top: var(--slogan-gap);
    font-size: var(--slogan-size);
    line-height: 1.25;
    font-weight: var(--slogan-weight);
    color: var(--slogan-color);
}

.header-tools {
    justify-self: end;
    min-width: 0;
}

.seestyle {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: var(--access-size);
    color: var(--access-color);
    text-decoration: none;
    white-space: nowrap;
}

.seestyle img {
    width: 22px;
    height: 22px;
}


/* BODY */

.bodysite {
    flex: 1 0 auto;
}

.middle {
    display: flex;
    align-items: flex-start;
    position: relative;
    min-height: 100%;
}


#search_form {
    text-align: left;
}

#search_form > label {
    display: grid;
    grid-template-columns: 180px minmax(0, 250px);
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

#search_form > label > input {
    position: static;
    width: 100%;
    min-width: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

@media (max-width: 600px) {
    #search_form > label {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }
}

/* SIDEBAR */

.sidebar {
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);

    font-size: var(--sidebar-fs);

    padding:
        var(--sidebar-pt)
        var(--sidebar-pr)
        var(--sidebar-pb)
        var(--sidebar-pl);
}

.sidebar-right .sidebar {
    order: 2;
}

.sidebar-right .container-main {
    order: 1;
}

.sidebar-left .sidebar {
    order: 1;
}

.sidebar-left .container-main {
    order: 2;
}

.sidebar a {
    display: block;
    text-decoration: none;
    margin-bottom: var(--sidebar-gap);
    line-height: 1.45;
}


/* SIDEBAR — LEVEL 1 */

.sidebar .menu-level-1 {
    padding: 8px;
    background: var(--sb1-bg);
    color: var(--sb1-fg);
}

.sidebar .menu-level-1:hover {
    background: var(--sb1-hbg);
    color: var(--sb1-hfg);
}

.sidebar .menu-level-1.activeitem {
    background: var(--sb1-abg);
    color: var(--sb1-afg);
    font-weight: 700;
}


/* SIDEBAR — LEVEL 2 */

.sidebar .menu-level-2 {
    padding: 7px 8px 7px 25px;
    background: var(--sb2-bg);
    color: var(--sb2-fg);
}

.sidebar .menu-level-2:hover {
    background: var(--sb2-hbg);
    color: var(--sb2-hfg);
}

.sidebar .menu-level-2.activeitem {
    background: var(--sb2-abg);
    color: var(--sb2-afg);
    font-weight: 700;
}


/* MAIN CONTENT */

.container-main {
    flex: 1 1 auto;
    min-width: 0;
}

.content {
    font-size: var(--content-fs);
    font-weight: var(--content-fw);
    color: var(--content-fg);
    line-height: var(--content-lh);
    text-align: var(--content-align);

    padding:
        var(--content-pt)
        var(--content-pr)
        var(--content-pb)
        var(--content-pl);
}

.content p {
    text-indent: var(--paragraph-indent);
}

.content ul,
.content ol {
    padding-left: calc(24px + var(--list-indent));
}


/* HEADINGS */

.content h1 {
    font-size: var(--h1-fs);
    font-weight: var(--h1-fw);
    color: var(--h1-fg);
    text-align: var(--h1-align);

    margin:
        var(--h1-mt)
        var(--h1-mr)
        var(--h1-mb)
        var(--h1-ml);

    border-bottom:
        var(--h1-line-width, 0px)
        solid
        var(--h1-line-color, #034EA2);
}

.content h2 {
    font-size: var(--h2-fs);
    font-weight: var(--h2-fw);
    color: var(--h2-fg);
    text-align: var(--h2-align);

    margin:
        var(--h2-mt)
        var(--h2-mr)
        var(--h2-mb)
        var(--h2-ml);
}


/* CONTENT ELEMENTS */

.content a {
    color: #034EA2;
}

.content img {
    max-width: 100%;
    height: auto;
}

.content table td,
.content table th {
    border:
        var(--table-bw)
        var(--table-bs)
        var(--table-bc);

    padding: var(--table-pad);
}


/* FOOTER */

.footer {
    flex: 0 0 auto;
    background: var(--footer-bg);
    color: var(--footer-fg);
}

.footer-inner {
    min-height: var(--footer-h);

    padding:
        var(--footer-pt)
        var(--footer-pr)
        var(--footer-pb)
        var(--footer-pl);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    font-size: var(--footer-fs);
    font-weight: var(--footer-fw);
    text-align: center;
}

.footer_url a {
    font-size: var(--footer-link-fs);
    font-weight: var(--footer-link-fw);
    color: var(--footer-link-fg);
    text-decoration: none;
}


/* MOBILE MENU BUTTON */

.buttonmenu {
    display: none;
}


/* HIGH CONTRAST MODE */

html.contrastColors body,
html.contrastColors .header,
html.contrastColors .sidebar,
html.contrastColors .footer {
    background: #000 !important;
    color: #fff !important;
}

html.contrastColors a,
html.contrastColors .mlogo,
html.contrastColors .llogo {
    color: #ff0 !important;
}


/* MOBILE */

@media (max-width: 750px) {

    .navheader {
        min-height: var(--header-height-mobile);

        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;

        gap: 10px;
        align-content: center;
    }

    .header-logo,
    .header-name,
    .header-tools {
        justify-self: start;
    }

    .header-name {
        text-align: left;
    }

    .header-tools {
        white-space: normal;
    }

    .middle {
        display: block;
    }

    .buttonmenu {
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 30;

        background: #f1f1f1;
    }

    .obtn {
        display: block;
        padding: 12px 16px;

        font-size: 22px;
        color: #034EA2;
        text-decoration: none;
    }

    .sidebar {
        display: none;

        position: absolute;
        left: 0;
        top: 0;
        z-index: 20;

        width: min(90%, var(--sidebar-w));

        background: var(--sb1-bg);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    }

    .sidebar.open {
        display: block;
    }

    .container-main {
        width: 100%;
    }

    .content {
        padding-top: 50px;
    }
}
