:root {
    --color-text: #111;
    --color-body-bg: #f8f8f8;
    --color-header-bg: white;
    --color-page-bg: white;
    --color-code-bg: #f8f8f8;
    --color-border: #111;
    --color-link: blue;
}

* { box-sizing: border-box; }
html { font-family: -apple-system, system-ui, sans-serif; font-size: 14px; }
body { margin: 0; padding: 0; color: var(--color-text); background: var(--color-body-bg); }
.page-wrap { max-width: 800px; margin: 2rem auto; border: 1px solid var(--color-border); background: var(--color-page-bg); }
article { padding: 0rem 1.2rem 1.2rem 1.2rem; }
h1 { font-size: 1.4rem; font-weight: bold; margin: 0; padding: 1rem 1.2rem; background: var(--color-header-bg); border-bottom: thin solid var(--color-border); text-align: center; letter-spacing: 2px; }
h2 { font-size: 1.2rem; font-weight: bold; margin: 1.5rem 0 1rem 0; }
article > h2:first-child { margin-top: 1rem; }
h3 { font-size: 1.0rem; font-weight: 500; margin: 1.5rem 0 0.5rem 0; }
h2 + h3 { margin-top: 0; }
h3 + p { margin-top: 0; }
p { line-height: 1.5; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.4rem; }
ul:last-child { margin-bottom: 0; }
li { line-height: 1.4; margin-bottom: 0.5rem; }
a { color: var(--color-link); cursor: pointer; }
a:not(:hover) { text-decoration: none; }
img { display: block; max-width: 100%; border: thin solid var(--color-border); }
img + h2 { margin-top: 1.5em; }
figure { margin: 0; padding: 0; }
pre { font-size: 0.7rem; border: thin solid var(--color-border); padding: 1em; margin-bottom: 1.5em; overflow-x: auto; background: var(--color-code-bg); }
code { background: var(--color-code-bg); }
p > code { padding: 1px 3px; font-size: 0.8rem; }
footer { margin-top: 0; padding: 1rem 1.2rem 1.2rem 1.2rem; border-top: thin solid var(--color-border); }
footer a:before, footer a:after { display: inline-block; color: var(--color-text); text-decoration: none; }
footer a:before { content: "["; margin-right: 1px; }
footer a:after { content: "]"; margin-left: 1px; }
.made-by-human { display: inline-block; font-style: italic; margin-bottom: 0; position: relative; }
.made-by-human[title] { cursor: help; }
.made-by-human:after { content: "✍"; font-size: 1.5em; position: absolute; top: -6px; right: -24px;}
.nowrap { white-space: nowrap; }
.warning-box { border: thin solid var(--color-border); background: var(--color-code-bg); padding: 0.5rem 0.7rem; font-size:0.8rem; }
.about { display: flex; flex-direction: row; gap: 1rem; }
.about-img { margin-top: 1.3rem; width: 300px; flex-shrink: 0; }
.about-img img { border: none; }
.gallery { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 0.8rem; }
.gallery figcaption { display: block; font-size: 0.7rem; margin-top: 0.2rem; text-align: center; }
h1 > a.github { float: right; margin-left: -24px; }
h1 > a.github svg { width: 24px; height: 24px; }
#icon-github path { fill: var(--color-text); }

.v86-container { width: fit-content; margin: auto; background: black; overflow: hidden; }
.v86-text { white-space: pre; font: 12px monospace; }
.v86-canvas { image-rendering: pixelated; }
body:not(.v86-active) .v86-container { display: none; }
body.v86-active .v86-activator-container { display: none; }

.v86-desktop { display: block; }
.v86-mobile { display: none; }

@media (max-width: 760px) {
    html { font-size: 15px; }
    .page-wrap { margin: 0.5rem; }
    .gallery { grid-template-columns: 1fr 1fr; }
    .about { flex-direction: column; align-items: center; gap: 0.5rem; }
    .about-img { margin: 0; }
    .v86-desktop { display: none; }
    .v86-mobile { display: block; }
}

.page-index ul { list-style-type: none; padding-left: 0; }

.page-gentleos32 {
    --color-body-bg: #36a;
    --color-header-bg: #fc0;
    --color-page-bg: #ccc;
    --color-code-bg: #bbb;
    --color-link: #05b;
}
.page-gentleos32 .v86-container { border: thin solid var(--color-border); }

.page-gentleos16 {
    --color-body-bg: #080808;
    --color-header-bg: #111;
    --color-page-bg: #111;
    --color-border: #080;
    --color-text: #bbb;
    --color-code-bg: #222;
    --color-link: #0a0;
}
.page-gentleos16 img { border-color: black; }
