:root {
    --color-console-text: #199515;
    --color-dark-blue: #325886;
    --color-blue: #447AB9;
    --color-light-blue: #82A7D6;
    --color-vault-suit-yellow: #fff773;
    --color-light-tan: #FEEED4;
    --color-tan: #ffe1ba;
    --color-brown: #8b5c29;
    --color-dark: #001423;
    --color-red: #8b1a1a;

    --font-family-header: "1942";
    --font-family-default: "Special Elite";
    --font-family-gothic: "Gothic821 Condensed Regular";
    --font-family-fallouty: "Fallouty";
    --font-family-stencil: "Stencil Standard Bold";

}
html {
    font-family: var(--font-family-default);
}
header, h1, h2, h3, h4, th {
    font-family: var(--font-family-stencil);
}
body {
    background-color: #f5f1ed;
    background: url('/images/background.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}
body > header {
    display: flex;
    flex-wrap: nowrap;
}
body > header .burger-menu {
    color: black;
    font-size: 60px;
    position: absolute;
    right: 20px;
    display: none;
    padding: 0;
}
body > header > nav {
    background-color: var(--color-light-tan);
    border: 1px solid var(--color-dark);
    opacity: 0.75;
    margin: 30px;
}
body > header > nav > .burger-menu {
    display: none;
}
body > header > nav > a {
    font-size: 20px;
    font-family: var(--font-family-fallouty);
    display: inline-block;
    padding: 20px;
    padding-top: 28px;
}
body > header > a {
    display: inline-block;
}
body > header > a > img.mobile {
    display: none;
}
.main {
    background-color: var(--color-light-tan);
    border: 1px solid var(--color-dark);
    opacity: 0.75;
    box-sizing: border-box;
    padding: 20px 30px;
    margin: 0 20px;
}
aside > h3, .main > h1 {
    margin-top: 30px;
}
.main > article > header, .main > header {
    font-size: 2em;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 21px;
}
header > p {
    font-size: 15px;
    display: inline-block;
    margin-left: 10px;
}
.main > article > section {
    line-height: 1.5em;
    background-color: white;
    border: 1px solid var(--color-dark);
    padding: 15px;
}
.container {
    display: flex;
    gap: 0.5%;
    margin-top: 10px;
}
.container.notes {
    margin: 0;
}
.container > .right, .container > .left {
    width: 50%;
    flex-wrap: wrap;
    display: flex;
}
.container fieldset {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    position: relative;
    /*align-self: flex-start;*/
}
.container fieldset a.edit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: url('/images/edit-icon.png') no-repeat center center;
}
.container fieldset a.edit:hover {
    background: url('/images/edit-icon-green.png') no-repeat center center;
}
fieldset.edit p > label {
    width: 15%;
    display: inline-block;
}
fieldset.perks.edit p > textarea {
    margin-top: 10px;
    height: 50px;
    width: 342px;
}
fieldset.perks.edit p > label { 
    vertical-align: super;
}
fieldset.perks.edit p > a {
    margin-left: 15%;
}

#perks-container > p:not(:last-of-type) {
    box-shadow: 0 1px 0 0 #94938E, 0 1px, 0 0 #D4D3CD;
}

fieldset.notes > section {
    padding: 10px;
}
fieldset.base {
    width: 60%;
    margin-right: 1%;
}
hr {
    margin: 5px 0;
}
fieldset.avatar {
    width: 39%;
    text-align: center;
    padding-top: 35px; /* not sure if this works for real pics... */
}
fieldset.avatar > img {
    width: 100%;
    max-width: 207px; /* not sure if this works for real pics... */
}
fieldset.perks {
    width: 100%;
}
fieldset.resistances {
    column-count: 3;
}
fieldset.resistances > header {
    column-span: all;
}
fieldset.resistances > p {
    break-after: column;
    text-align: center;
}
fieldset.resistances > p:last-of-type {
    break-after: auto;
}
fieldset.resistances > p > label {
    margin-bottom: 5px;
}
fieldset.resistances > p > label:after {
    content: "\a";
    white-space: pre;
}
fieldset.skills {
    width: 100%;
    /*container-type: inline-size;*/
    column-count: 2;
}
fieldset.skills > header, fieldset.skills > footer {
    column-span: all;
}
fieldset.skills > footer {
    margin: 0;
    padding: 0 10px;
}
fieldset.skills > footer > p {
    margin-top: 0;
    margin-bottom: 5px;
}
fieldset.skills > footer > p:last-of-type {
    margin-bottom: 0;
}
fieldset.health {
    display: flex;
    flex-wrap: wrap;
}
fieldset.health > img {
    opacity: 0.5;
    width: 25%;
    min-width: 125px;
    padding: 0;
    margin: 10px 0 10px 10px;
    object-fit: contain;
}
fieldset.health > section {
    width: 72%;
    padding: 0;
    margin: 0;
}
fieldset.health > section > header {
    padding: 10px 0;
    font-size: 21px;
}
fieldset.health > section > div {
    margin: 20px 0;
}
fieldset.health.edit section > div.bodyparts > div > p > label {
    width: auto;
}
fieldset.health.edit section > div.bodyparts > div {
    width: 100%;
}
fieldset.health.edit section > div.bodyparts > div,
fieldset.health section > div.bodyparts {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
}
fieldset.health section > div.bodyparts > p {
    margin: 0;
    margin-bottom: 15px;
    text-align: center;
    width: 25%;
}
fieldset.health.edit > form {
    width: 100%;
}
fieldset.health.edit section > div.bodyparts > p {
    margin: 0;
    margin-bottom: 15px;
    text-align: center;
    width: 20%;
}
fieldset.health.edit section > div.bodyparts > div > p > input {
    width: auto;
}
fieldset.health.edit section > div.bodyparts > div > p {
    margin: 0;
    margin-bottom: 15px;
    text-align: center;
    width: 20%;
}
fieldset.health.edit section, fieldset.health.edit section > p {
    display: inline-block;
    width: 100%;
}
fieldset.health.edit section > div.bodyparts > div > p > label,
fieldset.health.edit section > p > label,
fieldset.health section > div.bodyparts > p > label {
    font-family: var(--font-family-stencil);
}
fieldset.health > section > div > header {
    display: inline-block;
    margin-right: 5px;
}
fieldset.health > section > div > span {
    margin-right: 20px;
}
fieldset.inventory > div {
    padding: 10px;
}
fieldset.inventory > div > header > label {
    display: inline-block;
    width: 75%;
}
fieldset.inventory > div > header > label:last-of-type {
    text-align: right;
    width: 22%
}
fieldset.inventory > div > p > label {
    width: 75%;
    display: inline-block;
}
fieldset.inventory > div > p > span {
    width: 22%;
    display: inline-block;
    text-align: right;
}
fieldset.inventory.edit .values > div.value:nth-of-type(even),
fieldset.inventory.edit .items > div.item:nth-of-type(even) {
background-color: wheat;
}
fieldset.inventory > div.items > p {
    padding: 0.5em 0;
    margin-top: 0;
    margin-bottom: 0;
}
fieldset.inventory > div.items > p:nth-of-type(odd) {
    background-color: wheat;
}
fieldset.inventory > div.items > p:last-of-type > * {
    margin-top: 15px;
    font-weight: bold;
}
fieldset.inventory.edit section {
    padding: 10px;
}
fieldset.inventory.edit section > div:nth-of-type(1) > label {
    font-family: var(--font-family-stencil);
    margin-bottom: 5px;
}
fieldset.inventory.edit section > div:nth-of-type(1) > label > span {
    font-size: 10px;
    width: 80px;
    margin-left: 5px;
}
fieldset.inventory.edit section > header {
    margin-bottom: 10px;
}
fieldset.inventory.edit section > div {
    margin-bottom: 2px;
}
fieldset.inventory.edit section > div.custom-item > input:nth-of-type(1),
fieldset.inventory.edit section > div.custom-value > input:nth-of-type(1) {
    margin-right: 4px;
}
fieldset.inventory.edit section > div.custom-item > input:nth-of-type(2) {
    margin-right: 5px;
}
fieldset.inventory.edit section > div.custom-item > a,
fieldset.inventory.edit section > div.custom-value > a {
    margin-left: 5px;
}
fieldset.inventory.edit section > div:last-of-type {
    margin-bottom: 10px;
}
fieldset.inventory.edit section > div * {
    display: inline-block;
    margin: 0;
    box-sizing: border-box;
}
fieldset.inventory.edit section > div *:nth-child(1) {
    width: 25%;
}
fieldset.inventory.edit section > div *:nth-child(2) {
    width: 20%;
}
fieldset.inventory.edit section > div *:nth-child(3) {
    width: 20%;
}
fieldset.weapons > div > p {
    display: flex;
    padding: 5px 10px;
    margin: 0;
    line-height: 16px;
}
fieldset.weapons > div {
    margin-bottom: 20px;
}
fieldset.weapons > div > p > label {
    display: inline-block;
    text-align: right;
    min-width: 20%;
    width: auto;
    margin-right: 10px;
    font-family: var(--font-family-stencil);
}
fieldset.weapons > div > p > span {
    min-width: 10%;
}
fieldset.weapons > .ammo {
    padding: 5px 10px;
}
fieldset.weapons > .ammo > label {
    margin-right: 10px;
    display: inline-block;
    width: auto;
    min-width: 9%;
    text-align: right;
}
fieldset.weapons > .ammo > span {
    min-width: 7%;
    display: inline-block;
}
fieldset.weapons > .ammo > span:nth-of-type(1) {
    min-width: 30%;
}
fieldset.weapons.edit div.ammo > p > a {
    display: inline-block;
    width: auto;
    margin-left: 5px;
}
fieldset.weapons.edit .firearms > .firearm > p:last-of-type > a {
    margin-left: 5px;
}
fieldset.weapons.edit .firearms > .firearm:not(:last-of-type),
fieldset.weapons.edit .ammo > .ammo:not(:last-of-type),
fieldset.weapons.edit .melee > .melee:not(:last-of-type) {
    box-shadow: 0 1px 0 0 #94938E, 0 1px, 0 0 #D4D3CD;
    padding-bottom: 3px;
}
fieldset.weapons.edit .melee > .melee > p:last-of-type > a,
fieldset.weapons.edit .melee > .melee > p:last-of-type > label,
fieldset.weapons.edit .firearms > .firearm > p:last-of-type > a,
fieldset.weapons.edit .firearms > .firearm > p:last-of-type > label {
    vertical-align: super;
}
fieldset.weapons.edit .ammo > .ammo label,
fieldset.weapons.edit .melee > .melee label,
fieldset.weapons.edit .firearms > .firearm label {
    margin-right: 5px;
}
fieldset.weapons.edit > .firearms > .firearm .name {
    width: 40%;
}
fieldset.weapons.edit label {
    text-align: right;
}
fieldset.weapons.edit section > div {
    margin-bottom: 15px;
}
fieldset.weapons.edit textarea {
    width: 300px;
    height: 50px;
    margin-right: 5px;
}
fieldset.weapons.edit .ammo > div > p > * {
    width: 10%;
}
fieldset.weapons.edit .ammo > div > p > input:nth-of-type(1) {
    width: 15%;
}
fieldset.impairments {
    display: flex;
    flex-wrap: wrap;
}
fieldset.impairments > div {
    width: 25%;
}
fieldset.impairments > div > p.header {
    font-family: var(--font-family-stencil);
}   
fieldset.impairments > div > p {
    text-align: center;
    min-width: 20px;
    min-height: 20px;
}
fieldset.impairments > div > p.box {
    /* set checkbox icon background */
    background: url('/images/checkbox-icon.png') no-repeat center center;
    background-size: 20px 20px;
}
fieldset.impairments > div > p.checkedbox {
    /* set red cross checkbox icon background */
    background: url('/images/checkbox-cross-red-icon.png') no-repeat center center;
    background-size: 20px 20px;
}
fieldset.symptoms.edit p > label {
    text-align: right;
    vertical-align: super;
    width: 12%;
}
fieldset.symptoms.edit p > textarea {
    height: 50px;
    width: 35%;
    margin-left: 5px;
}
fieldset.symptoms.edit > form > a {
    margin-top: 20px;
    display: inline-block;
}
fieldset.symptoms.edit p:not(:last-of-type) {
    box-shadow: 0 1px 0 0 #94938E, 0 1px, 0 0 #D4D3CD;
}
fieldset.symptoms.edit p > a {
    margin-left: 12.5%;
}
.stat {
    margin: 20px 40px 40px 20px;
}
.primary_stats > form > .stat:nth-of-type(6),
.stat:nth-of-type(6) {
    break-after: column;
}
.stat > header, .stat > p {
    text-align: right;
}
.stat > p {
    margin: 7px 0;
}
.stat > p > span, 
.stat > header > span {
    margin-left: 7px;
    border-bottom: 1px solid var(--color-dark);
    padding: 0 10px;
}
/* This screams for refactoring... *cough* */
fieldset.notes,
fieldset.inventory,
fieldset.weapons,
fieldset.health,
fieldset.impairments,
fieldset.resistances,
fieldset.perks,
fieldset.descriptions, 
fieldset.secondaries,
fieldset.symptoms, 
fieldset.traits {
    width: 100%;
    margin-top: 7px;
    box-sizing: border-box;
}
fieldset.descriptions > div {
    margin: 0 10px;
}
fieldset.descriptions label {
    width: auto;
}
fieldset.descriptions.edit label {
    width: 25%;
}
fieldset.descriptions.edit p {
    margin-bottom: 20px;
}
fieldset.secondaries {
    display: flex;
    flex-wrap: wrap;
}
fieldset > header {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 21px;
}
fieldset.secondaries > p {
    width: 50%;
    box-sizing: border-box;
}
fieldset.traits > p, 
fieldset.perks > p,
fieldset.symptoms > p,
fieldset.secondaries > p {
    padding: 5px 10px;
}
fieldset {
    border: 1px solid var(--color-dark);
    background-color: rgba(255, 255, 255, 0.5);
    margin: 10px 0;
}
fieldset > p {
    margin: 0;
    padding: 10px;
}
fieldset > p > * {
    line-height: 21px;
}
fieldset > p > span {
    font-size: 17px;
    display: inline-block;
}
fieldset > p > label {
    font-family: var(--font-family-stencil);
    font-weight: bold;
    width: 15%;
    min-width: 120px;
    display: inline-block;
    vertical-align: top;
}
fieldset p > input[type="text"], fieldset p > input[type="password"] {
    width: 30%;
}
.primary_stats > form {
    column-count: 2;
}
.primary_stats.edit .stat > p {
    text-align: left;
    font-family: var(--font-family-stencil);
}
.primary_stats.edit .stat > p > label, .primary_stats.edit .stat > .skills label {
    width: 35%;
}
.primary_stats > form > footer {
    column-span: all;
}
.primary_stats.edit .custom-skill-name {
    width: 30%;
    margin-right: 4%;
}
.tox-promotion {
    display: none;
}
table {
    border-collapse: separate;
    border-spacing: 0px;
    border: 1px solid var(--color-brown);
    margin-bottom: 20px;
}
thead, tbody {
    background-color: white;
    box-sizing: border-box;
}
table th, table td {
    text-align: left;
    background-color: white;
    border: none;
    padding: 15px;
}
.character table {
    border: none;
}
.character table th, .character table td, .character thead, .character tbody {
    background: none;
}
.character table th:first-of-type, .character table td:first-of-type {
    padding-left: 0;
}
.character table th:last-of-type, .character table td:last-of-type {
    padding-right: 0;
}
thead th {
    border-bottom: 1px solid var(--color-brown);
    background-color: var(--color-light-blue);
}
tbody tr:nth-of-type(even) > td {
    background-color: var(--color-light-tan);
}
a {
    font-size: 1.1em;
    line-height: 1.1em;
    font-family: var(--font-family-fallouty);
    color: var(--color-console-text);
    text-decoration: none;
}
a {
    cursor: pointer;
}
form > p {
    margin: 0.5em 0;
}
form > p > label {
    width: 10%;
    display: inline-block;
}
.error, .info {
    border: 1px solid var(--color-dark);
    color: var(--color-dark);
    padding: 1em;
    margin: 0.5em 0;
    width: 50%;
}
.error {
    background-color: #b48776;
}
.info {
    background-color: var(--color-vault-suit-yellow);
}
.hide {
    display: none;
}
.red {
    color: var(--color-red);
}
.hint {
    color: var(--color-dark-blue);
}
footer {
    margin-top: 30px;
}
#page_footer > blockquote {
    font-size: 1.3em;
    width: 70%;
    margin: 50px auto;
    font-family: var(--font-family-gothic);
    font-style: italic;
    font-weight: 100;
    color: var(--color-dark);
    padding: 25px 60px;
    border-left: 8px solid var(--color-blue) ;
    line-height: 1.6;
    position: relative;
    background: var(--color-light-tan);
    opacity: 0.75;
}
#page_footer > blockquote::before {
    font-family: Arial;
    content: "\201C";
    color: var(--color-blue);
    font-size: 4em;
    position: absolute;
    left: 10px;
    top: -10px;
}
#page_footer > blockquote::after{
    content: '';
    background: url('/images/pipboy_small.png') no-repeat;
    margin: 0;
    position: absolute;
    right: 10px;
    width: 40px;
    height: 53px;
}

@media (max-width: 950px) {

    body > header {
        display: block;
    }
    body > header > .burger-menu {
        display: inline-block;
    }
    body > header > nav.show {
        width: 100%;
        left: 0;
    }
    body > header > nav.show {
        left: 0;
        width: 100%;
    }
    body > header > nav {
        position: absolute;
        width: 0;
        overflow: hidden;
        transition: 0.5s ease;
        left: 100%;
        top: 0;
        bottom: 0;
        z-index: 2;
        opacity: 1;
        margin: 0;
        background-color: var(--color-light-tan);
    }
    body > header > nav > .burger-menu {
        display: block;
        position: static;
        text-align: right;
        padding-right: 28px;
        padding-top: 8px;
    }
    body > header > nav > a {
        display: block;
    }
    .main {
        margin: 0;
        padding: 10px;
    }
    .container {
        display: block;
    }
    .container > .right, .container > .left {
        width: 100%;
    }
    .container > .right {
        margin-top: 7px;
    }
    fieldset.health > img {
        display: none;
    }
    fieldset.health > section {
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
    .stat {
        margin: 10px;
    }
    .stat > p {
        font-size: 14px;
    }
    .resistances > p {
        padding: 10px 0;
    }
    /* Table conversion on mobile */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
    }
    table td {
        border: none;
        position: relative;
        padding-left: 50%;
    }
    table td:before {
        position: absolute;
        left: 6px;
        content: attr(data-label);
        font-weight: bold;   
    }   
}