p.download { padding-left: 3rem; position: relative; }
ul.downloads { padding-left: 3rem; }
ul.downloads li { list-style-type: none; position: relative; }
p.download::before { display: inline-block; height: 2.5rem; left: 0; position: absolute; text-align: center; top: 0.25rem; vertical-align: middle; width: 2.5rem; }
ul.downloads li::before { display: inline-block; height: 2.5rem; left: -3rem; position: absolute; text-align: center; top: 0.25rem; vertical-align: middle; width: 2.5rem; }
p.download::before { content: url(icons/download.svg#download-dark); }
ul.downloads li.amo::before { content: url(icons/puzzle.svg#puzzle-dark); }
ul.downloads li.dos::before { content: url(icons/dos.svg#dos-dark); }
ul.downloads li.srccpp::before { content: url(icons/source.svg#source-dark); }
ul.downloads li.srcpas::before { content: url(icons/source.svg#source-dark); }
ul.downloads li.srcpy::before { content: url(icons/python.svg#python-dark); }
ul.downloads li.srcscpt::before { content: url(icons/applescript.svg#applescript-dark); }
ul.downloads li.win::before { content: url(icons/windows.svg#win-dark); }

@media (prefers-color-scheme: dark)
{
	p.download::before { content: url(icons/download.svg#download-light); }
	ul.downloads li.amo::before { content: url(icons/puzzle.svg#puzzle-light); }
	ul.downloads li.dos::before { content: url(icons/dos.svg#dos-light); }
	ul.downloads li.srccpp::before { content: url(icons/source.svg#source-light); }
	ul.downloads li.srcpas::before { content: url(icons/source.svg#source-light); }
	ul.downloads li.srcpy::before { content: url(icons/python.svg#python-light); }
	ul.downloads li.srcscpt::before { content: url(icons/applescript.svg#applescript-light); }
	ul.downloads li.win::before { content: url(icons/windows.svg#win-light); }
}

#site-content section
{
	overflow-y: hidden;
}

#site-content section img + div.description
{
	padding-left: 344px;
	padding-top: 1em;
}


#site-content table.news td {
	padding-bottom: 1ex;
	padding-top: 1ex;
	vertical-align: middle;
}

#site-content ul.short,
#site-content ul.short li,
#site-content ul.short li ul
{
	line-height: 100%;
	margin: 1ex 0;
}

#site-content ul.short li ul
{
	padding-left: 2em;
}

/* Page watching service */

.entry {
	font-size: 80%;
	margin-bottom: 1ex;
}

.entry .changed {
	color: red;
	font-weight: bold;
}

div.error {
	background: silver;
	color: red;
	line-height: 1.5;
	margin: 1em 0;
	padding: 1em;
}

div.message {
	background: silver;
	color: black;
	line-height: 1.5;
	margin: 1em 0;
	padding: 1em;
}

label.error {
	color: red;
	font-weight: bold;
}

/* Source code */

code
{
	overflow-x: auto;
}

code.cpp
{
	white-space: pre;
}

code.cpp .kw
{
	color: blue;
}

code.cpp .pp,
code.cpp .pp .kw,
code.cpp .pp .string
{
	color: purple;
}

code.cpp .rem,
code.cpp .rem .kw,
code.cpp .rem .string
{
	color: green;
}

code.cpp .string,
code.cpp .string .kw,
code.cpp .string .rem
{
	color: maroon;
}

code.css,
code.javascript,
code.json,
code.sql,
code.xml
{
	white-space: pre;
}

code.xml .prolog,
code.xml .prolog span
{
	color: green;
	font-style: italic;
}

code.xml .element
{
	color: purple;
}

code.xml .entity
{
	color: maroon;
}

code.xml .attr
{
	color: brown;
}

code.xml .value,
code.xml .value span
{
	color: navy;
}

code.xml .cdata
{
	color: teal;
}

/* Keyboard text */

kbd
{
	background-color: #E2E2E2;
	background-image: linear-gradient(left,  white 0%,#E2E2E2 25%);
	border : 1px solid gray;
	border-radius: 3px;
	box-shadow: 1px 0 1px 0 #fff, 0 2px 0 2px silver, 0 2px 0 3px #333;
	color: black;
	font-family: monospace;
	margin: 0 5px;
	padding: 1px 5px;
	text-transform : uppercase;
}

/* Quote */

blockquote {
	background-image: url(quote.png);
	background-repeat: no-repeat;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 110%;
	font-style: italic;
	line-height: 140%;
	margin: 1em;
	padding-left: 30px;
}

/* Twitter feed */

#twitter ul {
	padding: 0 !important;
}

#twitter li {
	color: black;
	display: block;
	font-size: x-small !important;
	margin: 1ex 0;
	overflow: hidden;
}

#twitter li img
{
	border: 1px solid white;
	-moz-box-shadow: 1px 1px 2px black;
	-webkit-box-shadow: 1px 1px 2px black;
	box-shadow: 1px 1px 2px black;
	float: left;
	margin-right: 1ex;
}

#twitter li .date
{
	color: silver;
	display: block;
}

/* Images in title */

h2 img
{
	vertical-align: middle;
}

/* Sidebars in blog posts */

section.sidebar
{
	background-color: var(--light-bkg);
	color: var(--dark-frg);
	display: block;
	margin-top: 1rem;
	padding: 1rem;
}

section.sidebar > h2:first-child
{
	margin-top: 0;
}

/* Illustrations in blog posts */

p.illustration
{
	margin: 1em;
	padding-left: 1em;
}

p.illustration img
{
	border: 2px solid white;
	-moz-box-shadow: 2px 2px 5px black;
	-webkit-box-shadow: 2px 2px 5px black;
	box-shadow: 2px 2px 5px black;
	margin-bottom: 1ex;
	margin-left: -1em;
}

/* Screenshots */

.shot-container
{
	background: black;
	box-shadow: 2px 2px 5px black;
	height: 0;
	position: relative;
	width: 100%;
}

.ar-16x9
{
	padding: 0 0 56.25%;
}

.ar-16x10
{
	padding: 0 0 62.5%;
}

.ar-4x3
{
	padding: 0 0 75%;
}

.shot-container img.shot
{
	bottom: 0;
	box-shadow: none;
	height: 100%;
	left: 0;
	margin: 0;
	max-width: none;
	object-fit: contain;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
}

img.shot
{
	-moz-box-shadow: 2px 2px 5px black;
	-webkit-box-shadow: 2px 2px 5px black;
	box-shadow: 2px 2px 5px black;
	height: auto;
	margin: 1em;
	max-width: calc(100% - 2em);
}

img.shot.left
{
	display: block;
	float: left;
}

td > img.shot
{
	max-width: none;
}

table.shots
{
	margin: auto;
}

table.shots img
{
	margin: 1em;
}


/* Gallery */

#gallery_filter select
{
	margin-right: 2em;
}

#gallery_zoomed
{
	background: white;
	border: 1px solid silver;
	cursor: pointer;
	display: none;
	left: 50%;
	padding: 10px;
	position: fixed;
	top: 50%;
}

#gallery_zoomed img#zoomed
{
	margin-bottom: 10px;
}

#gallery .shot
{
	border: 1px solid #EEE;
	cursor: pointer;
	float: left;
	margin: 1em;
	overflow: hidden;
	padding: 1em;
	width: 160px;
}

#gallery .shot:hover {
	background: #EEE;
	border: 1px solid #DDD;
}

#gallery .shot img {
	margin: auto;
}

#gallery .shot span {
	display: none;
}

/* Database result table */

.db_result
{
	border-spacing: 3px;
	color: black;
	empty-cells: show;
	margin: 1em 1px;
	outline: 1px solid silver;
}

.db_result th
{
	background: #D3DCE3;
	font-weight: bold;
	padding: 0.5ex 1em;
	text-align: center;
}

.db_result td
{
	background: #E5E5E5;
	padding: 0.5ex 1em;
	text-align: left;
	vertical-align: top;
}

.db_result tr:nth-child(odd) td
{
	background: #D5D5D5;
}

/* Spoilers, used in blog post about puzzles */

.spoiler
{
	border: 1px dashed #808080;
	border-radius: 4px;
	color: transparent;
	padding-left: 4px;
	padding-right: 4px;
}

.spoiler:hover
{
	color: inherit;
}

/* Support table, used in blog post */

.support
{
	cursor: default;
	empty-cells: show;
	font-size: x-small;
	width: 100%;
}
.support td
{
	background-color: #FEE;
	background-image: url(/images/icons/cross.png);
	background-repeat: no-repeat;
	background-position: center center;
	height: 16px;
	min-width: 16px;
	text-align: center;
}
.support .yes
{
	background-color: #EFE;
	background-image: url(/images/icons/tick.png);
}
.support .maybe
{
	background-color: #FFE;
}
.support .info
{
	background-image: url(/images/icons/information.png);
}
.support .bug
{
	background-color: #FFE;
	background-image: url(/images/icons/bug.png);
}
.support .na
{
	background-color: #DDD;
	background-image: url(/images/icons/bullet_black.png);
}
.support thead th
{
	border-right: 1px solid silver;
	padding: 0 2px;
	vertical-align: top;
}
.support tbody th
{
	border-top: 1px solid silver;
	padding: 8px;
	text-align: right;
}
.support .note
{
	background-color: #FFE;
	border: 1px solid black;
	-moz-box-shadow: grey 2px 2px 10px;
	-webkit-box-shadow: grey 2px 2px 10px;
	box-shadow: grey 2px 2px 10px;
	display: none;
	margin-left: 3em;
	margin-top: 1em;
	padding: 1em;
	position: absolute;
}
.support td:hover .note
{
	display: block;
}

/* Portfolio */

.portfolio-section
{
	border-color: #CCCCCC;
	border-style: solid none none;
	border-width: 1px 0 0;
	overflow: hidden;
	padding-top: 1em;
	margin: 1em 0;
}

.portfolio-section .portfolio-link
{
	background: none !important;
	float: left;
	padding: 0 !important;
}

.portfolio-section .description
{
	overflow: hidden;
	padding-left: 1em;
}

/* Embeded YouTube */

.youtube-container
{
	height: 0;
	margin: 1.5em 0;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.youtube-container .youtube-embed
{
	bottom: 0;
	height: 100%;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
}

/* Embedded Steam */

.steam-iframe
{
	margin: 1em 0;
	width: 100%;
}


/* Search results */

.search-result
{
	display: flex;
}

.search-result .index
{
	color: var(--light-frg);
	flex: 0 0 2em;
	font-size: 200%;
	line-height: 1;
	margin-right: 1ex;
	text-align: right;
}

.search-result .summary
{
	flex: 1 1 auto;
	margin-bottom: 1em;
	overflow: hidden;
}

/* Resume */

#resume p, #resume table {
	margin-bottom: 1em;
	margin-left: 1em;
}

#resume td {
	font-size: 100%;
}

/* ###### Google Ads ##### */
#ads {
	height: 600px;
	margin-bottom: 1em;
	position: absolute;
	right: 1em;
	width: 120px;
}