/* START RESET */

/* http://meyerweb.com/eric/tools/css/reset/ 
v2.0 | 20110126
License: none (public domain)
 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* END RESET */

/* START STYLES */

:root {
    --bg: 255, 255, 255;
    --fg: 0, 0, 0;

    --bg-red: 248, 223, 234;
    --fg-red: 180, 0, 0;

    --bg-orange: 255, 247, 242;
    --fg-orange: 200, 70, 0;

    --bg-yellow: 255, 252, 222;
    --fg-yellow: 125, 117, 0;

    --bg-green: 223, 248, 226;
    --fg-green: 0, 102, 14;

    --bg-blue: 223, 239, 248;
    --fg-blue: 0, 102, 100;

    --bg-purple: 231, 218, 251;
    --fg-purple: 63, 0, 115;

    --bg-pink: 255, 231, 253;
    --fg-pink: 208, 0, 125;
}

.app {
    overflow-x: hidden;
    font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.875rem; /* 14px */
    line-height: 175%;
    background: rgb(var(--bg));
    color: rgb(var(--fg));
}

.app > div {
    padding: 2rem 1.25rem 5rem; /* 32px 20px 80px */
}

.app--red {
    --bg: var(--bg-red);
    --fg: var(--fg-red);
}

.app--orange {
    --bg: var(--bg-orange);
    --fg: var(--fg-orange);
}

.app--yellow {
    --bg: var(--bg-yellow);
    --fg: var(--fg-yellow);
}

.app--green {
    --bg: var(--bg-green);
    --fg: var(--fg-green);
}

.app--blue {
    --bg: var(--bg-blue);
    --fg: var(--fg-blue);
}

.app--purple {
    --bg: var(--bg-purple);
    --fg: var(--fg-purple);
}

.app--pink {
    --bg: var(--bg-pink);
    --fg: var(--fg-pink);
}

h1, h2, h3, h4, h5, h6 {
    text-transform: uppercase;
}

h1 {
    margin-bottom: 1rem; /* 16px */
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
}

h2, h3 {
    margin: 1rem 0; /* 16px */
}

hr {
    width: 100vw;
    height: 0.0625rem; /* 1px */
    margin: 1.5rem -1.25rem 2rem; /* 24px -20px 32px*/
    background: repeating-linear-gradient(
        to right,
        rgb(var(--fg)) 0px,
        rgb(var(--fg)) 5px,
        rgb(var(--bg)) 5px,
        rgb(var(--bg)) 10px
    );
    border: none;
}

.app > div > hr:first-of-type {
    height: 0.375rem; /* 6px */
    margin-top: 1rem; /* 16px */
    margin-bottom: 1.5rem; /* 24px */
    border-top: 0.0625rem solid rgb(var(--fg)); /* 1px */
    border-bottom: 0.0625rem solid rgb(var(--fg)); /* 1px */
    background: none;
}

p {
    margin: 1rem 0; /* 16px */
}

a {
    color: rgb(var(--fg));
    text-decoration: none;
    box-shadow: 0 0.0625rem 0 0 rgb(var(--fg)); /* 1px */
    line-height: 120%;
    overflow-wrap: break-word;
}

a:hover {
    background: rgb(var(--fg));
    color: rgb(var(--bg));
}

a:focus {
    animation: 1000ms steps(1, end) infinite blink;
    outline: none;
}


em {
    font-style: italic;
}

strong {
    font-weight: bold;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: numeric;
}

li {
    margin: .25rem 0 0 1.5rem; /* 4px 0 0 24px */
}

pre {
    padding: 1rem; /* 16px */
    background: rgb(var(--fg), .15);
    overflow-x: scroll;
    margin: 0 -1rem; /* 16px */
}

code:not(pre > code) {
    padding: 0.125rem 0.25rem; /* 2px 4px */
    background: rgb(var(--fg), .15);
}

img {
    width: 100%;
    margin: 1rem 0; /* 16px */
}

blockquote {
    border-left: 0.125rem solid rgb(var(--fg)); /* 2px */
    background: rgb(var(--fg), .05);
    font-style: italic;
    padding: .001rem 1rem; /* whatver and 16px */
}

.app__theme {
    display: flex;
    align-items: center;
    gap: .5rem; /* 8px */
    margin: 1rem 0; /* 16px */
}

.app__checkbox {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    margin: 0;
    font: inherit;
    border-radius: 0;
    cursor: pointer;
    border: 1px solid black;
}

.app__checkbox--red {
    border-color: rgb(var(--fg-red));
    color: rgb(var(--fg-red));
    background: rgb(var(--bg-red));
}

.app__checkbox--orange {
    border-color: rgb(var(--fg-orange));
    color: rgb(var(--fg-orange));
    background: rgb(var(--bg-orange));
}

.app__checkbox--yellow {
    border-color: rgb(var(--fg-yellow));
    color: rgb(var(--fg-yellow));
    background: rgb(var(--bg-yellow));
}

.app__checkbox--green {
    border-color: rgb(var(--fg-green));
    color: rgb(var(--fg-green));
    background: rgb(var(--bg-green));
}

.app__checkbox--blue {
    border-color: rgb(var(--fg-blue));
    color: rgb(var(--fg-blue));
    background: rgb(var(--bg-blue));
}

.app__checkbox--purple {
    border-color: rgb(var(--fg-purple));
    color: rgb(var(--fg-purple));
    background: rgb(var(--bg-purple));
}

.app__checkbox--pink {
    border-color: rgb(var(--fg-pink));
    color: rgb(var(--fg-pink));
    background: rgb(var(--bg-pink));
}

.app__checkbox:checked:after {
    content: '✔︎';
}

.footnote-ref {
    vertical-align: top;
    font-size: 12px;
}

@media screen and (min-width: 720px) {
    hr {
        margin-left: -12rem; /* 192px */
    }

    h1 {
        max-width: 48ch;
    }

    .app {
        margin-left: 10rem; /* 160px */ 
    }

    .app > div > *:not(hr, h2, h1) {
        max-width: 65ch;
    }
    
    .app > div {
        padding-left: 2rem; /* 32px */
        background: repeating-linear-gradient(
            to bottom,
            rgb(var(--fg)) 0px,
            rgb(var(--fg)) 5px,
            rgb(var(--bg)) 5px,
            rgb(var(--bg)) 10px
        );
        background-size: 1px auto;
        background-repeat: no-repeat;
    }
    
    .app > div > h2 {
        float: left;
        margin-left: -10rem; /* 160px */
        margin-top: 0;
        max-width: 6rem; /* 96px */
    }
    
    .app__back {
        position: sticky;
        top: 2rem; /* 32px */
        float: left;
        margin-left: -10rem; /* 160px */
        margin-top: 2rem; /* 32px */
        box-shadow: none;
        line-height: 175%;
    }
}

@keyframes blink {
    0% {
        color: rgb(var(--bg));
        background: rgb(var(--fg));
    }

    50% {
        color: rgb(var(--fg));
        background: rgb(var(--bg));
    }
    
    100% {
        color: rgb(var(--bg));
        background: rgb(var(--f g));
    }
}
