@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjsGyN.woff2) format('woff2');
    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;
}
@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvmyNL4U.woff2) format('woff2');
    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;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyPN4E.woff2) format('woff2');
    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;
}
@font-face {
    font-family: 'Ubuntu';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyBN4Ffgg.woff2) format('woff2');
    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;
}

html {
    height: 100%;
    scroll-padding-top: 128px;
}

body {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 100%;
    grid-template-rows: auto 1fr auto;
    min-height: 100%;
    max-width: 100%;
    margin: 0;
    font-family: sans-serif;
}
header {
    display: grid;
    grid-template: "b a c d" / auto 1fr auto auto;
    align-items: center;
    justify-content: space-between;
    background: #eee;
    text-align: center;
    padding: 5px;
    max-width: 100%;
    top: 0;
    height: 37px;
}
.logo {
    grid-area: a;
    display: inline;
    margin: 0 5px;
    border: none;
    font-weight: 700;
    font-family: 'Ubuntu', sans-serif;
    font-size: 2rem;
}

.logo > a, .logo > a:link, .logo > a:visited {
    margin: 5px;
    text-decoration: none;
    color: black;
}

.logo > a:hover {
    text-decoration: underline;
    color: black;
}

header, footer {
    font-family: sans-serif;
}

@media (width < 720px), (max-width: 720px) {
    header {
        grid-template: "a b" "c d" / 1fr auto;
        height: 55px !important;
    }
    .title {
        top: 55px !important;
    }
    #cont-nav > .nav-list, #lang-nav > .nav-list {
        text-align: right !important;
    }
}

@media (250px <= width < 500px), ((max-width: 499px) and (min-width: 250px)) {
    .logo {
        font-size: 6.4vw;
    }
}

@media (width < 250px), (max-width: 250px) {
    .logo {
        font-size: 1em;
    }
}

a, a:link {
    color: #36c;
    text-decoration: none;
}
a:hover, a:active {
    color: #25b;
    text-decoration: underline;
}
a:visited {
    color: #76a;
}

hr {
    width: 100%;
}
form#string-search {
    grid-area: c;
}
form#string-search > input {
    width: 180px;
}
#cont-nav, #lang-nav {
    position: relative;
    left: 0;
    margin: 0 5px;
    text-align: left;
}
#cont-nav {
    grid-area: b;
}
#lang-nav {
    grid-area: d;
}
ul.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.nav-list > li {
    display: inline;
    white-space: nowrap;
    word-break: keep-all;
}
ul.nav-list > li:first-child::before {
    content: "";
}
ul.nav-list > li:before {
    content: "| ";
}
ul.nav-list > li:after {
    content: " ";
}
footer {
    display: block;
    background: #eee;
    text-align: right;
    padding: 5px;
}

a.link-top:before {
    content: "↑ ";
}

a.go-back:before {
    content: "← ";
}

.contain {
    display: flex;
    flex-direction: column;
    position: relative;
    background: #f8f8f8;
    width: calc(100% - 12px);
    max-width: 720px;
    clear: both;
    margin-left: auto;
    margin-right: auto;
    padding: 0 5px;
    border-left: 1px solid #bbb;
    border-right: 1px solid #bbb;
}
.contain.intro {
    height: 100%;
    min-width: 400px;
    background-image: url(img/mila.png);
    background-repeat: no-repeat;
    background-size: 512px;
    background-position: bottom;
    background-blend-mode: multiply;
}

@media (height < 700px), (max-height: 700px) {
    .contain.intro {
        background-image: none;
    }
}

h1, h2, h3, h4, h5, h6 {
    color: black;
    border-bottom: 1px solid #999;
}

.title {
    min-height: 49px;
    background: inherit;
    font-family: sans-serif;
}

.section {
    position: relative;
    font-family: sans-serif;
}

.intro > .title {
    position: absolute;
    top: 0;
}

.intro > .back {
    position: absolute;
    bottom: 0;
}

.lists {
    margin-top: 8px;
    margin-bottom: 16px;
}

.grid-lists {
    display: flex;
    flex: 1 1 64px;
    flex-wrap: wrap;
    margin: 8px 0 16px 0;
    align-items: stretch;
    padding: 0;
    justify-content: center;
}

.grid-list-item {
    display: flex;
    list-style: none;
    flex-direction: column;
    align-items: center;
    margin: 5px;
}

.grid-list-image {
    display: inline-block;
    min-width: 64px;
    min-height: 64px;
    background-repeat: no-repeat;
}

li.search-result, li > .search-result {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media print {
    #cont-nav, #lang-nav, #string-search, .link-top, .audio-narr {
        display: none;
    }

    .talkbox, .diagbox, .transbox, .endingbox {
        break-inside: avoid-page;
    }

    #top, .title {
        break-after: avoid-page;
    }

    body {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        
    }

    a, a:link, a:visited {
        color: unset;
        text-decoration: none;
    }
}
