﻿:root {
	--col-blue-dark: #448;
	--col-blue-light: #BBD;
	--col-yellow-orange: #FC0;
	--col-purple: #628;
	--col-gray-dark1: #111;
	--col-gray-dark1c: #1C1C1C;
	--col-gray-dark2: #222;
	--col-gray-dark4: #444;
	--col-gray-dark5: #555;
	--col-gray-light11: #BBB;
	--col-gray-light13: #DDD;

	--col-bkg: white;
	--col-ink: black;
	--col-alt: var(--col-blue-dark);
	--col-alt-flat: var(--col-blue-dark);
	--col-ink-alt: var(--col-yellow-orange);
	--col-link-visit: var(--col-purple);
	--col-link-hl: red;
	--col-tab-inactive: var(--col-gray-light11);
	--col-term-border: var(--col-gray-light11);
	--col-table-row-delim: #999;
	--col-code-bkg: #F0F0F8;
	--col-table-row-bkg-alt: #F6F6F6;
	--col-table-row-bkg-hl: #FFD;
	--col-term-bkg: black;
	--col-term-ink: var(--col-gray-light13);
	--col-term-bkg-hl: #A00;
	--col-pic-bg-dark: black;
	--col-pic-bg-light: white;
	--col-mark-bkg: yellow;
	--col-mark-ink: black;

	--width: 40rem;

	--sp-full: 1rem;
	--sp-small: 0.5rem;
	--sp-tiny: 0.25rem;
	--sq-3-4: 0.75rem;
	--sp-big: 1.5rem;
	--sp-bigger: 2rem;
	--sp-large: 2.5rem;
	--sp-larger: 3rem;
	--sp-huge: 4rem;

	--sz-title-main: 150%;
	--sz-title-main-big: 250%;
	--sz-title-main-aux: 125%;

	--align-paragraph: justify;
	--term-white-space: pre;
	--footer-grid-layout-more-col: auto;
}
@media (prefers-color-scheme: dark) {
	:root {
		--col-bkg: var(--col-gray-dark1c);
		--col-ink: var(--col-gray-light13);
		--col-alt: var(--col-blue-light);
		--col-link-hl: #D44;
		--col-tab-inactive: var(--col-gray-dark4);
		--col-term-border: var(--col-gray-dark4);
		--col-table-row-delim: var(--col-gray-dark5);
		--col-code-bkg: #223;
		--col-table-row-bkg-alt: var(--col-gray-dark2);
		--col-table-row-bkg-hl: #332;
		--col-term-bkg: var(--col-gray-dark1);
		--col-pic-bg-dark: var(--col-bkg);
		--col-pic-bg-light: var(--col-ink);
		--col-mark-bkg: #CC0;
		--col-mark-ink: black;
	}
}
@media screen and not (min-width: 35rem) {
	:root {
		--sz-title-main: 135%;
		--sz-title-main-big: 185%;
		--sz-title-main-aux: 115%;

		--align-paragraph: left;
		--term-white-space: pre-wrap;
		--footer-grid-layout-more-col: ; /* empty */
	}
}

@font-face {
	font-family: 'Proza';
	src: url('font/proza-libre/ProzaLibre-Light.woff2');
	font-weight: normal;
}
@font-face {
	font-family: 'Proza';
	src: url('font/proza-libre/ProzaLibre-LightItalic.woff2');
	font-weight: normal;
	font-style: italic;
}
@font-face {
	font-family: 'Proza';
	src: url('font/proza-libre/ProzaLibre-Bold.woff2');
	font-weight: bold;
}
@font-face {
	font-family: 'Proza';
	src: url('font/proza-libre/ProzaLibre-BoldItalic.woff2');
	font-weight: bold;
	font-style: italic;
}

*, ::before, ::after {
	box-sizing: border-box;
	margin: 0;
}

html {
	height: 100%;
	font-family: Proza,verdana,arial,helvetica,sans-serif;
	font-size: 16px;
	line-height: 1.25;
	margin: 0 1rem;
}

body {
	display: grid;
	grid-template-rows: max-content 1fr max-content;
	height: 100%;
	margin: 0 auto;
	max-width: var(--width);
	background-color: var(--col-bkg);
	color: var(--col-ink);
}

a         { color: var(--col-alt); }
a:link    { color: var(--col-alt); }
a:visited { color: var(--col-link-visit); }
a:hover   { color: var(--col-link-hl); }
a:active  { color: var(--col-link-hl); }

header {
	margin: 0.5rem 0 0 5%;
}
header nav {
	font-size: 115%;
	display: grid;
	grid-template-columns: repeat(3, auto);
	justify-content: start;
	text-align: center;
	font-weight: bold;
}

header nav > a {
	background-color: var(--col-tab-inactive);
	text-decoration: none;
	padding: 0.25rem 0.25rem 0.05rem;
	border-style: solid;
	border-width: 2px;
	border-color: var(--col-bkg);
	border-radius: 0.5rem 0.5rem 0 0;
}
@media screen and (min-width: 35rem) {
	header nav > a::before {
		content: '.:';
		padding-right: 0.75rem;
	}
	header nav > a::after {
		content: ':.';
		padding-left: 0.75rem;
	}
}
header nav > a.current {
	color: var(--col-ink-alt);
	background-color: var(--col-alt-flat);
	border-color: var(--col-alt-flat);
}

footer {
	padding: 4rem 0 2rem;
}
.delim, h2, #pagetop
{
	font-size: 135%;
	font-weight: bold;
	color: var(--col-ink-alt);
	background-color: var(--col-alt-flat);
	padding: 0.20rem 0.5rem 0.05rem;
	border-radius: 0.1rem 0.5rem 0.1rem 0.5rem;
}
.txtline {
	padding: 0.06rem 0 0 1rem;
	display: grid;
	grid-template-columns: auto var(--footer-grid-layout-more-col);
	grid-row-gap: 0.5rem;
}
.txtline nav {
	text-align: left;
	font-weight: bold;
}
.txtline nav > a {
	text-decoration: none;
	padding: 0 0.25rem;
	border-radius: 0 0 0.25rem 0.25rem;
}
@media screen and (min-width: 35rem) {
	.txtline nav > a::before {
		content: '[';
		padding-right: 0.15rem;
	}
	.txtline nav > a::after {
		content: ']';
		padding-left: 0.15rem;
	}
}
.txtline nav > a.current {
	color: var(--col-ink-alt);
	background-color: var(--col-alt-flat);
}
.credit
{
	color: var(--col-tab-inactive);
	text-align: right;
}

img, picture, video {
	max-width: 100%;
}
img.bgd {
	background-color: var(--col-pic-bg-dark, black);
}
img.bgl {
	background-color: var(--col-pic-bg-light, white);
}

p, blockquote, figure {
	margin: 0 0 1rem;
}
p, blockquote, li {
	text-align: var(--align-paragraph);
}
p {
	text-indent: 1.5em;
}

mark {
	background-color: var(--col-mark-bkg);
	color: var(--col-mark-ink);
}

h1 {
	font-size: var(--sz-title-main);
	font-weight: bold;
	text-align: center;
	margin: 2rem 0 2rem;
}
.big {
	font-size: var(--sz-title-main-big);
	margin: 2.5rem 0 1.5rem;
}
.aux {
	margin-top: -1rem;
	font-size: var(--sz-title-main-aux);
}

h2 {
	margin: 2rem 0 1.5rem;
}
.top, #pagetop {
	margin-top: 0;
}

h3 {
	font-size: 125%;
	font-weight: bold;
	color: var(--col-alt);
	margin: 2rem 0 1.5rem;
	line-height: 1;
	border-style: solid;
	border-width: 0 0 1px;
	border-image: linear-gradient(to right, var(--col-alt), transparent 80%, transparent) 1;
}

h4 {
	font-size: 115%;
	font-weight: bold;
	margin: 1.5rem 0 1rem;
}

code, tt, pre {
	font-family: Courier, mono;
	hyphens: none;
}
code, tt, pre.src, pre.proto {
	background-color: var(--col-code-bkg);
}
pre {
        padding: 0.5rem;
	margin: 1rem 0;
}
.src, .term, .termhl, .proto {
	font-size: 85%;
	white-space: var(--term-white-space);
}
.src, .term {
	border-style: solid;
	border-color: var(--col-term-border);
	border-width: 0 1px;
}
.term, .termhl, .proto {
	font-weight: bold;
}
.term, .termhl {
	color: var(--col-term-ink);
}
.term {
	background-color: var(--col-term-bkg);
}
.termhl {
	background-color: var(--col-term-bkg-hl);
	border-style: solid;
	border-width: 0;
}

ul, ol {
	padding-left: 2rem;
}

ul.sp li, ol.sp li {
	margin-bottom: 0.5rem;
}

li {
	padding-left: 0.5rem;
}
ul {
	list-style-type: '◾';
	margin: 0 0 1rem;
}
.cont {
	margin: 0;
}
ul li ul {
	list-style-type: '◽';
}
ul li ul li ul {
	list-style-type: '▸';
}
ul li ul,
ul li ul li ul,
ol li ol,
ol li ol li ol {
	padding-left: 1.5rem;
}

blockquote {
	margin-left: 1.5rem;
	font-style: italic;
	border-style: solid;
	border-width: 0 0 0 0.25rem;
	border-color: var(--col-alt-flat);
	padding-left: 0.5rem;
}

figure {
	text-align: center;
}
figcaption {
	font-style: italic;
}

table.c {
	margin: 1rem 0;
	line-height: 135%;
	border: 0;
	border-collapse: collapse;
	text-align: left;
}
tr.c:nth-child(odd) {
	background: var(--col-table-row-bkg-alt);
}
tr.c:hover {
	background: var(--col-table-row-bkg-hl);
}
th.c, td.c {
	padding: 0.25rem 0.5rem;
	border-bottom: 1px solid var(--col-table-row-delim);
}
th.c {
	vertical-align: bottom;
	padding-top: 0;
	font-weight: bold;
}
td.c {
	vertical-align: baseline;
	border-top: 1px solid var(--col-table-row-delim);
}
th.c:nth-child(1), td.c:nth-child(1) {
	padding-left: 0;
}
th.c:nth-last-child(1), td.c:nth-last-child(1) {
	padding-right: 0;
}

td ul, td ol {
	margin: inherit;
	padding-left: inherit;
}

audio {
	height: 2rem;
}

#invisible {
	color: transparent;
}
