:root {
    --btn-bg: #ddddfd;
    --btn-bg-hover: #b2b2ec;
    --btn-border: #9a9adb;
    --toolbar-height: 40px;
}

html,
body {
    border: 0;
    box-sizing: border-box;
    font-size: 62.5%; /* reset base font-size to 10px */
    margin: 0;
    padding: 0;
}
html.fill-vp,
html.fill-vp body {
    height: 100%;
}
body {
    background-color: #abbaff;
    padding: 3vw;
}
body * { box-sizing: border-box; }

nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
nav button {
    background-color: black;
    height: auto;
    padding: 9px 15px;
}
nav button a {
    text-decoration: none;
    color: white;
}

div#main-cont {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    margin-top: 25px;
    padding: 5px 20px 15px 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: sans-serif;
}
h1,
input.h1 {
    font-size: 3.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px white;
}
h2 { font-size: 2.4rem; }
h2 > span {
    font-size: 85%;
    list-style: none;
    margin: 3px 0 0 39px;
}

header {
    align-items: center;
    background-color: #333333;
    border-bottom: 1px solid black;
    display: flex;
    height: var(--toolbar-height);
    left: 0;
    justify-content: space-between;
    position: fixed;
    top: 0;
    width: 100%;
}
header > * {
    background: none !important;
    border: none !important;
    font-size: 2rem !important;
    margin: 0 !important;
    min-width: 36px;
}
header h1 {
    color: white;
    font-family: sans-serif;
    font-size: 2rem;
    text-shadow: 1px 1px 1px black;
}

button {
    background: var(--btn-bg);
    border: 1px solid black;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.6rem;
    height: 30px;
    margin: 10px;
    text-align: center;
    transition: all 0.2s;
}
button[disabled] {
    cursor: default;
    opacity: 0.5;
}
button.add {
    background-color: #8a3cd8;
    border: 1px solid #5800af;
    border-radius: 9px;
    color: white;
    height: auto;
    font-weight: bold;
    margin-bottom: 12px;
    padding: 5px 10px 7px 10px;
    width: auto;
}
button.add:hover { transform: scale(1.07); }

#menu-list {
    background-color: #d3d3d3;
    border-right: 1px solid #777;
    height: calc(100% - var(--toolbar-height));
    left: 0;
    list-style: none;
    margin: 0;
    overflow: scroll;
    padding: 0;
    position: absolute;
    transition: left 0.2s;
    top: var(--toolbar-height);
    width: 310px;
    z-index: 1;
}
#menu-list.shut {
    left: -310px;
}
#menu-list.super {
    left: 0;
    box-shadow: 0px 5px 10px #888888;
}
#menu-list h2 {
    background: linear-gradient(180deg, #667eea 0%, #2653c8 100%);
    border-bottom: 1px solid #777777;
    color: white;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 1.6rem;
    font-weight: bold;
    margin: 0;
    padding: 9px 30px 9px 12px;
    position: relative;
}
#menu-list h2.no-go select { font-size: 1.6rem; }
#menu-list h2.no-go { padding: 7px 12px 7.5px 12px; }
#menu-list h2:not(.no-go)::after {
    content: '>';
    font-family: monospace;
    line-height: 1rem;
    position: absolute;
    right: 12px;
    top: calc(50% - 0.64rem);
}
#menu-list h2 a {
    color: white;
    text-decoration: none;
}
#menu-list .minor {
    font-size: 1.2rem;
    font-style: italic;
}
#menu-list div:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#menu-list h2.selected {
    background: linear-gradient(180deg, #374ca9 0%, #0a266d 100%);
}

div#main { font-size: 1.6rem; }

main {
    background-color: white;
    font-size: 1.6rem;
    height: calc(100% - (var(--toolbar-height) * 2));
    overflow: scroll;
    padding: 1vw 3vw 3vw 3vw;
    position: absolute;
    right: 0;
    top: calc(var(--toolbar-height) * 2);
    transition: width 0.2s;
    width: calc(100% - 310px);
}
main.no-toolbar {
    height: calc(100% - var(--toolbar-height));
    top: var(--toolbar-height);
}
#toolbar {
    align-items: center;
    background-color: var(--btn-bg);
    border-bottom: 1px solid var(--btn-border);
    display: flex;
    height: var(--toolbar-height);
    right: 0;
    justify-content: flex-start;
    padding: 0;
    position: absolute;
    transition: width 0.2s;
    top: var(--toolbar-height);
    width: calc(100% - 310px);
}
#toolbar button {
    border-bottom: none;
    border-left: none;
    border-radius: 0;
    border-top: none;
    border-right: 1px solid var(--btn-border);
    height: 100%;
    padding-left: 10px;
    padding-right: 10px;
    margin: 0;
}
#toolbar select {
    background: none;
    border-bottom: none;
    border-left: none;
    border-radius: 0;
    border-right: 1px solid var(--btn-border);
    border-top: none;
    font-size: 1.6rem;
    font-weight: bold;
    height: 100%;
    padding-left: 10px;
    transition: all 0.2s;
    width: auto;
}
#toolbar button:not([disabled]):hover {
    background-color: var(--btn-bg-hover);
    transform: none;
}
#toolbar select:hover {
    background-color: var(--btn-bg-hover);
}

@media (max-width: 500px) {
    button .button-text { display: none; }
}

#menu-list.shut + #toolbar,
#menu-list.shut + #toolbar + main,
#menu-list.shut + main {
    width: 100%;
}

#profile-btn {
    text-shadow: 0 0 5px white;
}
#profile-menu {
    background-color: #333;
    display: none;
    font-size: 1.6rem;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: fixed;
    right: 0;
    top: 40px;
    transition: all 0.2s;
}
#profile-menu li {
    font-family: sans-serif;
    padding: 5px 20px;
}
#profile-menu a {
    color: white;
    text-decoration: none;
}

dl {
    font-family: sans-serif;
    font-size: 1.6rem;
}
dt, dd {
    display: inline-block;
    margin-bottom: 5px;
}
dt {
    font-weight: bold;
    width: 110px;
}
dd {
    margin-left: 0;
    width: calc(100% - 119px);
}

dl.user,
div.well {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 5px 0 black;
    padding: 1px 15px 10px 15px;
}
div.well { margin-bottom: 15px; }
div.well button {
    margin-left: 0;
    margin-right: 0;
}
dl.user button {
    background: none;
    border: none;
    height: 18px;
    margin: -3px 0 0 0;
    padding: 0;
    text-shadow: 1px 0px 1px white;
}
dl.user h2 span { margin: 0; }

table { border-collapse: collapse; }
th, td {
    border-bottom: 1px solid black;
    border-right: 1px solid black;
    font-family: sans-serif;
    font-size: 1.6rem;
    padding: 7px 12px;
}
th:last-child,
td:last-child { border-right: none; }
tbody > tr:last-child > td { border-bottom: none; }

label {
    display: block;
    font-family: sans-serif;
    font-size: 1.6rem;
}
input, select { width: 100%; }
input[type="checkbox"] {
    margin: 0;
    width: auto;
}
textarea {
    width: 100%;
    min-height: 320px;
}

figure.practice-op {
    background-color: #71c3ff;
    border: 1px solid blue;
    border-radius: 12px;
    box-shadow: 0 2.5px 1px 4px blue;
    margin: 0 auto;
    max-width: 500px;
    padding: 12px;
}
figure.practice-op figcaption {
    background-color: blue;
    border-radius: 9px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 3px 0 #a1d8ff;
    color: white;
    display: inline-block;
    font-family: sans-serif;
    font-size: 1.7rem;
    padding: 9px 14px;
    text-shadow: 1px 1px 1px black;
}
figure.practice-op p {
    background-color: white;
    border: 1px solid black;
    border-radius: 9px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0;
    font-size: 1.7rem;
    margin: -1px 0 0 0;
    padding: 18px 20px 20px 20px;
}
figure.practice-op div.practice-btns {
    align-items: center;
    display: flex;
    justify-content: center;
}
figure.practice-op div.practice-btns button {
    background-color: #444444;
    border: 1px solid black;
    border-radius: 0;
    font-size: 4rem;
    height: auto;
    margin: 0;
    padding: 1px 0 6px 0;
    text-shadow: 0 0 4px white;
    width: 33.333%;
}
figure.practice-op div.practice-btns button:hover {
    background-color: #222222;
    text-shadow: 0 0 5px white;
}
figure.practice-op div.practice-btns button:first-child {
    border-bottom-left-radius: 9px;
}
figure.practice-op div.practice-btns button:last-child {
    border-bottom-right-radius: 9px;
    border-right: none;
}

#login-cont {
    align-items: center;
    display: flex;
    font-size: 1.6rem;
    height: 100%;
    justify-content: center;
    width: 100%;
}
form {
    background: white;
    border: 1px solid navy;
    border-radius: 15px;
    box-shadow: 0 0 20px 0 #7878ff;
    max-width: 400px;
    padding: 30px;
}
form h1 {
    margin-top: 0;
}
p.authError {
    background-color: #ee3d3d;
    border: 1px solid #a60000;
    color: white;
    font-family: sans-serif;
    font-size: 1.6rem;
    padding: 9px 11px;
    text-shadow: 1px 1px 1px black;
}
input.userField {
    font-size: 1.6rem;
    margin-bottom: 18px;
    padding: 7px 9px;
}
form button {
    margin: 0 auto;
}
form a {
    font-size: 1.6rem;
}