@font-face {
    font-family: window;
    src: url("/static/fonts/main.woff2") format("woff2");
}

@font-face {
    font-family: system;
    src: url("/static/fonts/window.otf");
}

* {
    box-sizing: border-box;
}

:root {
    font-size: 10px;
    --body-font: window;
    --font-size: 1.1rem;
    
    --text: #000000;
    --text-faint: #808080;
    --accent: #000080;
    --accent-negative: #ffffff;
    --background: #008080;

    --window-border: #c0c0c0;
    --window-frame: #000000;
    --window-background: #ffffff;

    --breadcrumb-text: #000000;
    --breadcrumb-background: #ffffff;
    --breadcrumb-active: #000080;
    --breadcrumb-active-text: #ffffff;

    --title-bar: #000080;    
    --title-text: #ffffff;
}

::selection {
    background-color: var(--accent);
    color: var(--accent-negative);
}

html {
    image-rendering: pixelated;
    zoom: 2;
    scrollbar-width: none;
    line-height: 1.3rem;
}

body {
    background-color: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    height: 50vh;
    width: 50vw;
}

.window {
    font-family: system;
    background-color: var(--window-border);
    padding: 0.2rem;
    border: 0.1rem solid var(--window-frame);
    display: flex;
    flex-direction: column;
}

.window-floating {
    max-width: min(50vw, 40rem);
    max-height: min(50vh, 30rem);
    min-width: min(50vw, 40rem);
    min-height: min(50vh, 30rem);
}

.window-reading {
    max-width: min(50vw, 35rem);
    max-height: 50vh;
    min-width: min(50vw, 35rem);
    min-height: 50vh;
}

.window-maximised {
    min-height: 50vh;
    max-height: 50vh;
    min-width: 50vw;
    max-width: 50vw;
}

.title {
    background-color: var(--title-bar);
    font-size: 1.3rem;
    text-align: center;
    border: 0.1rem solid var(--window-frame);
    width: 100%;
    color: var(--title-text);
    font-family: system;
    display: flex;
    flex-direction: row;
    min-height: 2rem;
    max-height: 2rem;
}

.title p {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    overflow-x: scroll;
    white-space: nowrap;
    padding-left: 0.2rem; 
    padding-right: 0.2rem;
}

.title button {
    padding: 0;
    border: 0;
    margin: 0;
    background-image: url("/static/icons/full_screen.png");
    width: 1.8rem;
    height: 1.8rem;
}

.content {
    color: var(--text);
    background-color: var(--window-background);
    padding: 0.4rem;
    border: 0.1rem solid var(--window-frame);
    font-family: var(--body-font);
    font-size: var(--font-size);
    text-align: left;
    flex-grow: 1;
    overflow: scroll;
    scrollbar-width: 0;
}

.breadcrumbs {
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    font-size: 1.3rem;
    background-color: var(--breadcrumb-background);
    border-left: 0.1rem solid var(--window-frame);
    border-right: 0.1rem solid var(--window-frame);
    overflow: scroll;
    scrollbar-width: 0;
    white-space: nowrap;
}

.breadcrumbs li {
    list-style: none !important;
}

.breadcrumbs li::marker {
    content: "";
}

.breadcrumbs li a {
    text-decoration: none;
    color: var(--breadcrumb-text);
    padding: 0 0.6rem;
}

.breadcrumbs li a:hover,
.breadcrumbs li a:focus,
.breadcrumbs li a:active {
    color: var(--breadcrumb-active-text);
    background-color: var(--breadcrumb-active);
    outline: none;
}

.grid {
    display: grid;
    gap: 0.6rem;
    padding: 0.6rem;
    width: 100%;
    grid-template-columns: repeat(auto-fill, 5.2rem);
    justify-content: start;
}

.grid img {
    width: 3.2rem;
    height: auto;
}

.grid a {
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    text-align: center;
}

.grid a p {
    padding: 0.2rem;
    margin: 0;
    display: inline-block;
}

.grid a:active p,
.grid a:hover p,
.grid a:focus p {
    color: var(--accent-negative);
    background-color: var(--accent);
    outline: none;
}

p {
    padding: 0;
    margin: 0;
    margin-bottom: 0.6rem;
}

table {
    gap: 0.2rem;
}

th, td {
    font-weight: normal;
    padding: 0;
    margin: 0;
    padding-right: 1.0rem;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 0.2rem solid var(--accent);
    padding-bottom: 0.2rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover, a:focus, a:active {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 0.1rem;
}

ul {
    list-style-type: "- ";
    box-sizing: border-box;
    margin: 0;
    padding-left: 1.1rem;
}

ul, ol {
    padding-top: 0.3rem;
    padding-bottom: 0.6rem;
}

ul li {
    list-style-type: square;
}

.list {
    background-size: 2rem;
}

h1, h2 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: normal;
    font-family: system;
    margin-bottom: 0.6rem;
}

h2 {
    color: var(--text-faint);
    margin-top: 1.2rem;
}

h3 {
    color: var(--text-faint); 
    margin-top: 0.6rem;
    margin-bottom: 0.3rem;
}

hr {
    color: var(--accent);
}

img {
    image-rendering: pixelated;
    max-width: 100%;
    float: right;
}

select {
    border: 0.1rem solid var(--accent);
    font: inherit;
    color: inherit;
    background-color: inherit;
}

.settings {
    display: flex;
    flex-direction: column;
    max-width: 50%;
}