* {
	box-sizing: border-box;
}

html {
	overflow-y: scroll;
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: #fbfbfb;
}
body, textarea.variable {
	font-family: helvetica neue, arial, helvetica, sans-serif;
	font-size: 10pt;
}
code {
	font-size: 9pt;
}

textarea.variable {
	padding: 0.5em;
}

.na {
	color: gray;
	font-style: italic;
}

.inline {
	display: inline;
}

.fixed {
	font-family: monospace;
}

.right {
	text-align: right;
}

input,
select,
textarea,
a.btn {
	color: #555;
	line-height: 1.2em;
	padding: 4px 4px 5px 4px;
	margin-top: 4px;
	border-radius: 3px;
	box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
textarea {
	border: 1px solid #ccc;
}
input[type="text"].fixed_width,
input[type="search"].fixed_width,
input[type="password"].fixed_width,
input[type="email"].fixed_width,
textarea.fixed_width {
	font-family: monospace;
}

input[type="checkbox"] {
	margin-top: 10px;
}
select {
	border: 1px solid #ccc;
}
input:focus,
textarea:focus,
a:btn:focus {
	border-color: rgba(160,160,160,.8);
	color: #303030;
	outline: 0;
	box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 6px rgba(160,160,160,.6);
}

input ::-webkit-input-placeholder {
	color: gray;
	font-style: italic;
}
input:-moz-placeholder {
	color: gray;
	font-style: italic;
}

input[type="image"] {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
a.btn {
	background-color: #f0f0f0;
	border-top: 2px solid #f0f0f0;
	border-left: 2px solid #f0f0f0;
	border-bottom: 2px solid #ccc;
	border-right: 2px solid #ccc;
	box-shadow: 0pt 2px 0pt rgba(255, 255, 255, 0.2) inset, 0pt 2px 0px rgba(0, 0, 0, 0.05);
	color: #303030;
	padding: 8px 14px 8px 14px;
	text-decoration: none;
}
button:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active,
a.btn:active {
	border-left: 2px solid #ccc;
	border-top: 2px solid #ccc;
	border-right: 2px solid #f0f0f0;
	border-bottom: 2px solid #f0f0f0;
}

button.inline,
input[type="button"].inline,
input[type="reset"].inline,
input[type="submit"].inline,
a.btn.inline {
	padding: 1px 6px;
}

button.btn-warning,
input[type="button"].btn-warning,
input[type="reset"].btn-warning,
input[type="submit"].btn-warning,
.btn-warning,
a.btn.btn-warning {
	color: #ffffff;
	background-color: #faa732;
	border-color: #faa732 #f89406 #f89406 #faa732;
}

button.btn-danger,
input[type="button"].btn-danger,
input[type="reset"].btn-danger,
input[type="submit"].btn-danger,
.btn-danger,
a.btn.btn-danger {
	color: #ffffff;
	background-color: #da4f49 !important;
	border-color: #da4f49 #bd362f #802420 #da4f49;
}

button.btn-success,
input[type="button"].btn-success,
input[type="reset"].btn-success,
input[type="submit"].btn-success,
.btn-success,
a.btn.btn-success {
	color: #ffffff;
	background-color: #5bb75b !important;
	border-color: #51a351 #51a351 #387038;
}

select {
	background-color: white;
	margin-top: 3px;
	min-width: 100px;
}
select:focus {
	border-color: rgba(160,160,160,.8);
	color: #303030;
	outline: 0;
	box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 6px rgba(160,160,160,.6);
}
select::-moz-focus-inner {
	border: 0;
	outline: 0;
}

table th.left {
	text-align: left;
}


header,
nav,
main,
section,
footer {
	margin-left: auto;
	margin-right: auto;
}

header,
section,
footer {
	width: 960px;
}


header {
	color: #333;
	padding: 0.5em;
}

header h1 {
	margin: 0;
	font-size: 1.5em;
	line-height: 30px;
}

header h1 a {
	background-color: #333;
	color: white;
	text-decoration: none;
	padding: 0.5em;
}

#h1dot {
	color: orange;
	display: inline-block;
	margin-left: -0.1em;
	margin-right: -0.1em;
	z-index: 10;
}

nav #right {
	float: right;
	line-height: 38px;
	text-align: right;
}

nav #right a,
nav #leftish a {
	color: #333333;
	font-weight: bold;
	text-decoration: none;
}

nav #leftish {
	float: left;
	margin-left: 130px;
	margin-top: -2em;
}

nav #leftish select {
	border: 0;
	box-shadow: none;
	background-color: transparent;
	font-weight: bold;
	width: 12em;
}

nav #leftish #os_selector,
nav #leftish #year_selector {
	width: 5em;
}


main {
	min-height: auto;
	padding-top: 1em;
}

footer {
	font-family: monospace;
	font-size: 8pt;
	text-align: right;
	padding-bottom: 2em;
}
footer a {
	color: #ddd;
	text-decoration: none;
}

details {
	margin-left: 3em;
}
details summary {
	cursor: pointer;
	margin-left: -3em;
}


/* forms */
fieldset {
	border: 0;
	margin-left: auto;
	margin-right: auto;
	padding: 0;
}

fieldset legend {
	font-weight: bold;
	padding-left: 0;
	margin-bottom: 0.5em;
}

input.link {
	background: none;
	border: none;
	cursor: pointer;
	font-weight: bold;
	margin: 0;
	padding: 0;
}

.field-group {
	line-height: 2.5em;
	margin-bottom: 0.5em;
	vertical-align: top;
}

.field-group label {
	display: inline-block;
	vertical-align: top;
	width: 160px;
}

.bold-labels .field-group label {
	font-weight: bold;
}

.help-inline {
	padding-left: 0.5em;
}

.field-group button,
.field-group input,
.field-group select,
.field-group textarea {
	width: 160px;
	vertical-align: top;
}

.field-group button.wide,
.field-group input.wide,
.field-group select.wide,
.field-group textarea.wide {
	min-width: 240px;
}

.field-group button.wide2,
.field-group input.wide2,
.field-group select.wide2,
.field-group textarea.wide2 {
	min-width: 320px;
}

.field-group button.wide3,
.field-group input.wide3,
.field-group select.wide3,
.field-group textarea.wide3 {
	min-width: 480px;
}

.with-errors input[type="text"],
.with-errors input[type="text"]:focus,
.with-errors input[type="email"],
.with-errors input[type="email"]:focus,
.with-errors input[type="password"],
.with-errors input[type="password"]:focus,
.with-errors textarea,
.with-errors select {
	border-color: #c43c35;
}
.with-errors .help-inline {
	color: #c43c35;
}

fieldset .error_hint {
	margin-left: 1em;
	color: #c43c35;
}


.gravatar {
	border: 2px solid black;
	border-radius: 100% 100%;
	float: right;
}
.gravatar img {
	border-radius: 100% 100%;
	height: 100px;
	margin: 10px 10px 6px 10px;
	width: 100px;
}

/* specifics */

aside {
	grid-row: 3;
	padding: 1em;
}

section a {
	color: #111;
}

section .program_category {
	color: gray;
}

article {
	padding: 1em 0;
	margin-left: auto;
	margin-right: auto;
	width: 960px;
}
article.wide {
	display: block;
	padding: 1em 1em;
	padding-bottom: 0;
	width: calc(100% - 2em);
}
article.flash_holder {
	padding-bottom: 0;
}
article.flash_holder .flash {
	grid-column-end: 8 span;
	margin-bottom: 0;
}
article.center {
	text-align: center;
}

div.desktop_frame {
	position: relative;
	display: inline-block;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

img.desktop {
	max-width: 100%;
	height: auto;
}

div.describer {
	color: #999;
	margin-top: 0.5em;
}
div.describer a {
	font-weight: bold;
	color: #888;
	text-decoration: none;
}

.about-box {
	display: inline-block;
}
.about-box p {
	margin-top: 0;
}

.navsep {
	padding-left: 0.5em;
	padding-right: 0.5em;
}

img#canvas {
	overflow: none;
}

.annotation {
	border: 4px solid transparent;
	box-sizing: content-box;
	cursor: pointer;
	display: none;
	position: absolute;
	margin-left: -6px;
	margin-top: -6px;
	padding-right: 6px;
	padding-bottom: 6px;
	z-index: 2;
}
.annotation:before {
	background-color: rgba(255, 255, 255, 0.1);
	border: 1px solid white;
	bottom: 4px;
	content: "";
	display: block;
	left: 4px;
	outline: 2px solid black;
	position: absolute;
	right: 4px;
	top: 4px;
}

body.visible_annotations .annotation {
	display: block;
}

.annotation.visible {
	display: block;
}

#annotation_info {
	background-color: #fafafa;
	border: 1px solid black;
	color: #444;
	position: absolute;
	max-width: 350px;
	padding: 6px;
	z-index: 100;
}
#annotation_info p {
	margin-bottom: 0;
	margin-top: 0.5em;
}
#annotation_info p:first-child {
	margin-top: 0;
}
#annotation_info a {
	color: #333;
}

#annotation_panel {
	border: 1px solid white;
	display: grid;
	grid-template-areas: "label select"
						 "new_program_category_label new_program_category"
						 "new_program_name_label new_program_name"
						 "comment comment"
						 "splitter splitter";
	grid-template-columns: 80px auto;
	grid-gap: 4px 6px;
	outline: 2px solid black;
	padding: 6px;
	position: absolute;
	background-color: #fcfcfc;
	text-align: left;
	z-index: 101;
}

#annotation_panel #new_program_category_label,
#annotation_panel #panel_new_program_category,
#annotation_panel #new_program_category_label,
#annotation_panel #new_program_name_label,
#annotation_panel #panel_new_program_name {
	display: none;
}

#annotation_panel.new_program #new_program_category_label,
#annotation_panel.new_program #panel_new_program_category,
#annotation_panel.new_program #new_program_category_label,
#annotation_panel.new_program #new_program_name_label,
#annotation_panel.new_program #panel_new_program_name {
	display: inline;
}

#annotation_panel #program_label {
	grid-area: label;
	align-self: center;
}
#annotation_panel #program_id {
	grid-area: select;
}
#annotation_panel #panel_program_id {
	grid-area: select;
}
#annotation_panel #panel_comment {
	grid-area: comment;
}

#annotation_panel #panel_splitter {
	grid-area: splitter;
	display: grid;
	padding-top: 4px;
	grid-template-columns: 32% 3% 32% 2% 32%;
}

#annotation_panel #panel_save {
	grid-column: 1;
}
#annotation_panel #panel_cancel {
	grid-column: 3;
}
#annotation_panel #panel_delete {
	grid-column: 5;
}


.thumb-holder {
	display: flex;
	flex-wrap: wrap;
}

.thumb-holder .desktop-thumb {
	padding: 10px;
	text-align: center;
	width: calc(50% - 20px);
}

.thumb-holder .desktop-thumb img {
	height: 300px;
	object-fit: contain;
}


.page_nav {
	font-weight: bold;
	text-align: center;
	margin-top: 3em;
	color: #555;
}
.page_nav .page {
	background-color: #ddd;
	border-radius: 100%;
	border: 1px solid #ddd;
	color: #333;
	display: inline-block;
	height: 3em;
	margin-left: 0.5em;
	padding: 10px 0px;
	text-align: center;
	text-decoration: none;
	width: 3em;
}
.page_nav span {
	display: inline-block;
	margin-left: 0.25em;
	line-height: 0.5em;
}
.page_nav .page.cur_page {
	background-color: #f7f7f2;
	font-weight: bold;
}


.tree,
.tree ul {
	margin: 0 0 0 0.5em;
	padding: 0;
	list-style: none;
	position: relative;
}

.tree ul {
	margin-left: 0.5em;
}

.tree:before,
.tree ul:before {
	border-left: 1px solid #bbb;
	bottom: 0;
	content: "";
	display: block;
	left: 0;
	position: absolute;
	top: 0;
	width: 0;
}

.tree li {
	margin: 0;
	padding: 0 1.1em;
	position: relative;
}

.tree li:before {
	border-top: 1px solid #bbb;
	content: "";
	display: block;
	height: 0;
	left: 0;
	margin-top: -1px;
	position: absolute;
	top: 0.8em;
	width: 8px;
}

.tree li:last-child:before {
    background-color: #fbfbfb;
	border-left: 0;
	bottom: 0;
	height: auto;
}

li.noparent:before,
ul.noparent:before {
	border-top: 0 !important;
	border-left: 0 !important;
}

ul.user_tree {
	color: #888;
}


/* flash messages */

.flash {
	border-radius: 4px;
	border-style: solid;
	border-width: 1px;
	color: white;
	margin-bottom: 1em;
	padding: 0.5em 1em;
}
.flash p {
	margin-bottom: 0;
}

.flash p:first-child {
	margin-top: 0;
}

.flash a {
	font-weight: bold;
	color: white;
}
.flash-error {
	background-color: #c43c35;
	border-color: #c43c35 #c43c35 #882a25;
}
.flash-success {
	background-color: #57a957;
	border-color: #57a957 #57a957 #3d773d;
}
.flash-notice {
	background-color: #339bb9;
	border-color: #339bb9 #339bb9 #22697d;
}

@media only screen and (max-width: 830px) {
	nav #leftish {
		display: block;
		margin-top: 1em;
		margin-left: 1em;
		margin-bottom: 1em;
		width: 100%;
	}
}

@media only screen and (max-width: 960px) {
	main {
		padding-left: 1em;
		padding-right: 1em;
	}

	article.wide {
		padding-left: 0;
		padding-right: 0;
	}

	header,
	section,
	footer {
		width: auto;
	}

	article {
		width: 100%;
	}

	header {
		padding: 0.5em 1em 0 0;
	}

	article.wide {
		width: auto;
	}

	.thumb-holder .desktop-thumb {
		width: 100%;
	}
}


@media (prefers-color-scheme: dark) {
	body {
		background-color: #222;
		color: #aaa;
	}

	header {
		color: #888;
	}

	header h1 a {
		background-color: #bbb;
		color: #333;
	}

	nav #right a,
	nav #right input.link {
		color: #aaa;
	}

	section a {
		color: #bbb;
	}

	div.describer {
		color: #888;
	}
	div.describer a {
		color: #777;
	}

	.page_nav .page {
		background-color: #888;
		border: 1px solid #666;
	}
	.page_nav .page.cur_page {
		background-color: #bbb;
	}

	.tree:before,
	.tree ul:before {
		border-left-color: #777;
	}
	.tree li:before {
		border-top-color: #777;
	}

	.tree li:last-child:before {
		background-color: #222;
	}

	footer a {
		color: #555;
	}
}
