@font-face {
    font-family: Charter;
    src: url(files/charter/charter_regular.woff2);
}

@font-face {
    font-family: Charter;
    src: url(files/charter/charter_bold.woff2);
    font-weight: bold
}

@font-face {
    font-family: Charter;
    src: url(files/charter/charter_italic.woff2);
    font-style: italic
}

@font-face {
    font-family: Charter;
    src: url(files/charter/charter_bold_italic.woff2);
    font-weight: bold;
    font-style: italic
}


:root {
    --bg: #123;
    --text: #eee;
    --hover: #234;
    --selected: #345;
    --selected-hover: #456;
    --clicky-text: #aaa;
    --contents-padding: 10px;
    --darkened-text: #567;
}
html {
    height: 100%; }

body {
    background-color: var(--bg);
    font-family:  'Charter';
    font-size: 18px;
    color: var(--text);
    line-height: 150%;
}

a:link {
    color: #bdf;
}

a:visited {
    color: #dbf;
}

a:hover {
    color: #fdd;
}

.header {
    background-color: var(--bg);
    z-index: 1;
}

.header a {
    float: left;
    color: var(--clicky-text);
    text-align: center;
    padding-top: 14px;
    padding-right: 16px;
    padding-bottom: 20px;
    padding-left: 16px;
    text-decoration: none;
    font-size: 20px;
    line-height: normal;
    border-right: 1px solid black;
}

.header a.last_a {
    border-right: 0px;
}

.header a:hover {
    background-color: var(--hover);
    color: var(--text);
}

.header .icon {
    display: none;
}

.table-of-contents {
    padding: 0px;
}

.table-of-contents * {
    margin: 0;
}

.table-of-contents a:hover {
    background-color: var(--hover);
    color: var(--text);
}

.table-of-contents a {
    text-decoration: none;
    color: var(--clicky-text);
}

.table-of-contents a > div {
    position: relative;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 10px;
    padding-right: 10px;
}

.table-of-contents h3 {
    color: var(--text);
    line-height: normal;
}

.date {
    position: absolute;
    right: 0;
    top: 0;
    padding: var(--contents-padding);
    line-height: normal;
}

@media screen and (max-width: 600px) {
    /* .header a:not(:first-child) { */
    /*     display: none; */
    /* } */
    .header a.icon {
        float: right;
        display: block;
    }
}

@media screen and (max-width: 600px) {
    .header.responsive {position: relative;}
    .header.responsive a.icon {
        position: absolute;
        right: 0;
        top: 0;
    }
    .header.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
}

.sticky {
    position: fixed;
    top: 0;
    width: 100%;
}

.main {
    padding-top: 60px;
    width: 100%;
    flex: 1 0 auto;
}

.centered {
    width: 800px;
    margin: auto;
}

@media screen and (max-width: 800px) {
    .centered {
        width: 100%;
    }
}


.toggle {
    background-color: var(--bg);
    border: none;
    display: block;
    text-decoration: none;
    text-align: center;
    width: 100%;
    padding: 14px 16px;
    font-size: 20px;
    color: var(--clicky-text);
}

.toggle:hover {
    background-color: var(--hover);
    color: var(--text);
}

.toggle.selected {
    background-color: var(--selected);
}

.toggle.selected:hover {
    background-color: var(--selected-hover);
}

.clickable {
    list-style-type: none;
}

.clickable a {
    float: left;
    color: var(--clicky-text);
    text-align: center;
    padding: 14px 16px;
    width: 100%;
    text-decoration: none;
    font-size: 20px;
}

.clickable a:hover {
    background-color: var(--hover);
    color: var(--text);
}

footer {
    position: fixed;
    bottom: 0;
    padding-bottom: 15px;
    padding-top: 15px;
    width: 100%;
    text-align: center;
    font-size: 15px;
    background-color: var(--bg);
    line-height: normal;
}

.footer-content p {
    margin: 0px;
}
.tree{
    --spacing : 1.25rem;
    --radius  : 8px;
    line-height: normal;
}

.tree li{
    display      : block;
    position     : relative;
    padding-left : calc(2 * var(--spacing) - var(--radius) - 2px);
}

.tree ul{
    margin-left  : calc(var(--radius) - var(--spacing));
    padding-left : 0;
}

.tree ul li{
    border-left : 2px solid #ddd;
}

.tree ul li:last-child{
    border-color : transparent;
}

.tree ul li::before{
    content      : '';
    display      : block;
    position     : absolute;
    top          : calc(var(--spacing) / -2);
    left         : -2px;
    width        : calc(var(--spacing) + 2px);
    height       : calc(var(--spacing) + 1px);
    border       : solid #ddd;
    border-width : 0 0 2px 2px;
}

.tree summary{
    display : block;
    cursor  : pointer;
}

.tree summary::marker,
.tree summary::-webkit-details-marker{
    display : none;
}

.tree summary:focus{
    outline : none;
}

.tree summary:focus-visible{
    outline : 1px dotted #000;
}

.tree summary::before{
    content       : '';
    display       : block;
    position      : absolute;
    top           : calc(var(--spacing) / 2 - var(--radius));
    left          : calc(var(--spacing) - var(--radius) - 1px);
    width         : calc(2 * var(--radius));
    height        : calc(2 * var(--radius));
    border-radius : 50%;
    z-index    : 1;
    background : #579 url('/files/expand-collapse.svg') 0 0;
    background-size : 200%;
}

.tree details[open] > summary::before{
    background-position : calc(-2 * var(--radius)) 0;
}

.centered-image{
    display: block;
    margin-left: auto;
    margin-right: auto;
}

div.table-of-contents .blog {
    display:none;
}

body:has(#all-button:checked) .blog {
    display:inherit;
}

body:has(#stories-button:checked) .blog-stories {
    display:inherit;
}

body:has(#math-button:checked) .blog-math {
    display:inherit;
}

body:has(#puzzles-button:checked) .blog-puzzles {
    display:inherit;
}

body:has(#coding-button:checked) .blog-coding {
    display:inherit;
}

.filter-buttons {
    display: flex;
    label {
        line-height: normal;
        color: var(--text);
        background-color: var(--bg);
        border: none;
        padding: var(--contents-padding);
        padding-bottom: calc(var(--contents-padding) + 4px);
        font-size: 18px;
        font-family: 'Charter'; /* Not sure why this is necessary but it doesn't appear without it */
        &:has(input:checked) {
            background-color: var(--selected);
            &:hover {
                background-color: var(--selected-hover);
            }
        }
        &:hover {
            background-color: var(--hover);
        }
    }
    input {
        opacity: 0;
        position: absolute;
        pointer-events: none;
    }
}

pre {
    background-color: #cbc;
    color: var(--bg);
    line-height: normal;
    padding: 15px;
    overflow-x:auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
}
