[x-cloak] { display: none !important; }

:root {
    --c-white: #ffffff;
    --c-black: #333333;
    --c-theme1: #339f79;
    --c-theme2: #0080ff;
    --c-gray: #888888;
    --c-white-trans: rgba(255, 255, 255, 0.1);
    --c-black-trans: rgba(0, 0, 0, 0.05);
    --c-good: #4f9328;
    --c-bad: #932848;

    --s-xs: 0.25rem;
    --s-sm: 0.5rem;
    --s-md: 1rem;
    --s-lg: 2rem;
    --s-xl: 4rem;

    --f-xs: 0.8rem;
    --f-sm: 0.9rem;
    --f-md: 1rem;
    --f-lg: 1.4rem;
    --f-xl: 2rem;

    --lh-sm: 1.4;
    --lh-md: 1.5;
    --lh-lg: 1.6;

    --border: 1px solid var(--c-black-trans);

    --max-readable-width: 40rem;

    --br-sm: 0.25rem;

    --bxs-md: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1), 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1), 0 0.5rem 1rem rgba(0, 0, 0, 0.1), 0 1rem 2rem rgba(0, 0, 0, 0.1);
    --bxs-lg: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1), 0 0.5rem 1rem rgba(0, 0, 0, 0.1), 0 1rem 2rem rgba(0, 0, 0, 0.1), 0 2rem 4rem rgba(0, 0, 0, 0.1);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    line-height: 1;
}

html {
    font-family: system-ui;
    background: var(--c-white);
    color: var(--c-black);
}

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

body {
    display: flex;
    flex-direction: column;
}

h1 {
    display: flex;
    gap: var(--s-sm);
}

h1 img {
    height: 1em;
    display: inline-block;
    align-self: center;
}

h2 {
    font-size: var(--f-xl);
    line-height: var(--lh-lg);
}

h3 {
    font-size: var(--f-lg);
    line-height: var(--lh-lg);
    color: var(--c-theme1);
}

a {
    cursor: pointer;
}

a:hover {
    text-decoration: none;
}

a.goto-button {
    width: 100%;
    display: block;
    text-align: left;
    border-radius: var(--br-sm);
    padding: var(--s-md);
    padding-right: var(--s-xl);
    background: var(--c-theme2);
    color: var(--c-white);
    font-weight: bold;
    font-size: var(--f-sm);
    text-decoration: none;
    position: relative;
}
a.goto-button:after {
    content: "▸";
    line-height: 0;
    position: absolute;
    right: var(--s-md);
    font-size: var(--f-md);
    top: 50%;
    transform: translateY(-50%);
}

hr {
    border: none;
    border-top: var(--border);
}

button,
a.button {
    border: none;
    padding: var(--s-md);
    background: var(--c-gray);
    color: var(--c-white);
    cursor: pointer;
    font-weight: bold;
    border-radius: var(--br-sm);
    text-decoration: none;
    text-align: center;
}

button[type=submit] {
    background: var(--c-theme1);
}

button:hover,
a.button:hover {
    background: var(--c-theme2);
}

button.tiny,
a.button.tiny {
    padding: var(--s-sm);
    font-size: var(--f-xs);
}

button:disabled,
a.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

small {
    font-size: var(--f-xs);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
}

tr {
    border-bottom: var(--border);
}

th {
    font-weight: normal;
    font-size: var(--f-sm);
    font-style: italic;
    color: var(--c-theme1);
}

th,
td {
    text-align: left;
    padding: var(--s-sm) var(--s-md);
}

th:first-child,
td:first-child {
    padding-left: 0;
}

th:last-child,
td:last-child {
    padding-right: 0;
}

th.clickable,
td.clickable {
    cursor: pointer;
    text-decoration: underline;
}

input:not([type=radio]):not([type=checkbox]),
textarea,
select {
    border: none;
    background: linear-gradient(175deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
    padding: var(--s-sm);
    border-radius: var(--br-sm);
    box-shadow: inset 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1);
    width: 100%;
}

input:not([type=radio]):not([type=checkbox]):required:invalid,
textarea:required:invalid,
select:required:invalid {
    border-left: 1px solid var(--c-bad);
    border-right: 1px solid var(--c-bad);
}

input:not([type=radio]):not([type=checkbox]):required:valid,
textarea:required:valid,
select:required:invalid {
    border-left: 1px solid var(--c-good);
    border-right: 1px solid var(--c-good);
}

form {
    max-width: var(--max-readable-width);
}

label {
    display: flex;
    flex-direction: column;
    gap: var(--s-sm);
}

label.checkbox {
    flex-direction: row;
    align-items: center;
}

label > span {
    display: block;
    font-size: var(--f-sm);
    font-style: italic;
    color: var(--c-theme1);
}

label .id {
    font-size: var(--f-sm);
    color: var(--c-gray);
}

p,
li {
    line-height: var(--lh-lg);
}

ul,
ol {
    margin-left: var(--s-md);
}

#messageArea {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-md);
    z-index: 100;
}

#messageArea .message {
    padding: var(--s-md);
    box-shadow: var(--bxs-lg);
    font-weight: bold;
    background: var(--c-good);
    color: #fff;
    line-height: 1.6;
    border-radius: var(--br-sm);
}

#messageArea .message.error {
    background: var(--c-bad);
}

#top {
    display: flex;
    justify-content: space-between;
    padding: var(--s-md);
    background: var(--c-white);
    border-bottom: var(--border);
    border-top: 2px solid var(--c-theme2);
}

#top a {
    text-decoration: none;
}

.user-menu {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--c-white);
    border: var(--border);
    padding: var(--s-sm);
    z-index: 10;
    box-shadow: var(--bxs-md);
    border-radius: var(--br-sm);
    min-width: 10rem;
}

.dropdown-menu a {
    padding: var(--s-sm);
    display: block;
}

.dropdown-menu a:hover {
    background: var(--c-black-trans);
}

#path {
    display: flex;
    flex-wrap: wrap;
    font-size: var(--f-sm);
    padding: 0 var(--s-md);
    gap: var(--s-sm);
    border-bottom: var(--border);
}

#path > * {
    padding: var(--s-md) 0;
    display: block;
    text-decoration: none;
}

#path > *:last-child {
    color: var(--c-theme1);
}

#page {
    flex-grow: 1;
}

#headerImage {
    width: 100%;
    max-height: 40rem;
    object-fit: cover;
}

#footer {
    padding: var(--s-md);
    font-size: var(--f-xs);
    text-align: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.1) 50%);
}

.loader {
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 100%;
    border: 2px solid var(--c-black);
    border-left-color: transparent;
    border-right-color: transparent;
    animation: loader 1s infinite;
}

.clickable {
    cursor: pointer;
}

.item-box {
    display: flex;
    gap: var(--s-sm);
    justify-content: space-between;
    padding: var(--s-md);
    border: var(--border);
    border-radius: var(--br-sm);
    background: var(--c-black-trans);
}

.hBox {
    display: flex;
    align-items: center;
}

.vBox {
    display: flex;
    flex-direction: column;
}

.hBox.between {
    justify-content: space-between;
}

.vBox.between {
    align-items: center;
}

.vBox.center {
    align-items: center;
}

.grow {
    flex-grow: 1;
}

.smGap {
    gap: var(--s-sm);
}

.mdGap {
    gap: var(--s-md);
}

.lgGap {
    gap: var(--s-lg);
}

.smPad {
    padding: var(--s-sm);
}

.mdPad {
    padding: var(--s-md);
}

.lgPad {
    padding: var(--s-lg);
}

@keyframes loader {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (prefers-color-scheme: _dark) {
    :root {
        --c-white: #333;
        --c-black: #eee;
        --c-black-trans: rgba(0, 0, 0, 0.2);
        --c-panel-bg: rgba(68, 68, 68, 0.95);
    }

    button {
        background: var(--c-white);
        color: var(--c-black);
    }
}