html, body {
	font-family: sans-serif;
	line-height: 1.5;
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
}

h1, h2 {
	line-height: normal;
}

pre, code, tt, kbd, samp {
	font-family: monospace, "Courier"; /* normalize font size*/
}

button, input, select {
	font: inherit;
	margin-bottom: 0.5em;
}

input, select, .filter-rule-table {
	width: 100%;
}

/*input[type="checkbox"] {
	width: auto;
}*/

[type="checkbox"] {
	position: absolute;
	overflow: hidden;
	clip: rect(0 0 0 0);
	height: 1px;
	width: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
}

[type="checkbox"] + span::before {
	content: "";
	display: inline-block;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	width: 1.2em;
	height: 1.2em;
	border: 1px solid;
	border-radius: 5px;
	vertical-align: middle;
	text-align: center;
	line-height: 1;
	overflow: hidden;
	margin-right: 0.5em;
	margin-bottom: 0.5em;
}

[type="checkbox"]:checked + span::before {
	content: "✓";
}

[type="checkbox"]:focus + span::before {
	outline: 1px dotted;
}

dt {
	font-weight: bold;
}

dd {
	margin-left: 1em;
}

hr {
	border: 0;
	height: 1px;
	background: black;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

#info-banner {
	position: fixed;
	bottom: 0;
	height: 0;
	display: block;
	width: 100%;
	text-align: center;
	overflow: hidden;
	transition: height 0.5s;
	background-color: rgba(0,0,0,0.9);
	color: white;
}

#info-banner.visible {
	padding: 5px 0;
	height: 1.5em; /* auto doesn't work with transition */
}

section {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	background-color: white;
	color: black;
	transform: none;
}

section.hide-to-left {
	z-index: 10;
	transform: translateX(-100%);
	transition: transform 0.5s;
}

section.hide-to-right {
	z-index: 10;
	transform: translateX(100%);
	transition: transform 0.5s;
}

header {
	background-color: #e3702d;
	color: white;
	height: 3rem;
	line-height: 2;
	overflow: hidden;
	position: relative;
}

header h1 {
	line-height: 2;
	margin: 0 2em;
	height: 2em;
	font-size: 150%;
	text-align: center;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

header .left, header .right {
	position: absolute;
	top: 0;
	display: block;
	width: 3rem;
	height: 3rem;
	line-height: 3;
	cursor: pointer;
	color: white;
	text-align: center;
	text-decoration: none;
}

header :focus {
	outline: none;
}

header .right {
	right: 0;
}

header .left img,
header .right img {
	width: 20px;
	vertical-align: middle;
}

section .wrapper {
	height: calc((100% - 3rem) - (2 * 5px));
	padding: 5px;
	overflow: auto;
}

button,
.button {
	display: block;
	width: 100%;
	line-height: 2;
	margin-top: 0.75em;
	margin-bottom: 0.5em;
	border: none;
	border-radius: 2px;
	text-align: center;
	background-image: linear-gradient(-45deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 100%);
	background-color: blue;
	color: white;
	text-decoration: none;
	cursor: default;
}

.destructive {
	background-color: red;
}

button:disabled {
	background-color: gray;
}

.label-checkbox {
	line-height: 2.25;
}

#page-loading img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 512px;
	height: 512px;
	margin-left: -256px;
	margin-top: -256px;
}

@media (max-width: 512px) {
	#page-loading img {
		width: 256px;
		height: 256px;
		margin-left: -128px;
		margin-top: -128px;
	}
}

@media (max-width: 256px) {
	#page-loading img {
		display: none;
	}
}

#collection-list,
#feed-list {
	margin: 0;
	padding: 0;
	line-height: normal;
}

#collection-list li,
#feed-list li {
	display: block;
	border: 1px solid #555;
	border-left-width: 5px;
	border-radius: 1px;
	padding-left: 5px;
	margin: 10px 0;
	overflow: hidden;
	cursor: pointer;
}

#feed-list li {
	padding-right: 3px;
}

#collection-list li .title,
#feed-list li .title {
	display: inline-block;
	font-weight: bold;
}

#collection-list li .title {
	padding: 0.5em 0;
}

#feed-list li .title {
	padding: 5px 0;
	width: 100%;
	line-height: 1.2;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

#feed-list li .feed {
	float: right;
	background-color: #555;
	border-radius: 2px;
	color: #fff;
	padding: 2px 5px;
	margin: 2px;
	border: 1px solid;
	border-left-width: 4px;
	font-size: 81%;
	max-width: 45%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

#feed-list li .feed:empty {
	display: none;
}

#feed-list li .date {
	display: block;
	font-size: 81%;
	padding-bottom: 5px;
}

#collection-list li .count {
	float: right;
	font-weight: bold;
	padding: 0.5em 5px;
	min-width: 1em;
	text-align: right;
}

#collection-list li.updated,
#feed-list li.updated {
	border-color: blue;
}

#collection-list li.updated .count {
	background-color: blue;
	color: white;
}

#collection-list li.unread,
#feed-list li.unread {
	border-color: red;
}

#collection-list li.unread .count {
	background-color: red;
	color: white;
}

#collection-list li.updating {
	color: #888;
	border-color: #888;
}

#collection-list + p {
	display: none;
}

#collection-list:empty + p {
	display: block;
}

#feed-list + p {
	display: none;
}

#feed-list:empty + p {
	display: block;
}

#show-timeline,
.show-all {
	border: 1px solid #555;
	border-radius: 1px;
	margin: 25px 0;
	padding: 0 0.375em;
	height: 2em;
	line-height: 2em;
	cursor: pointer;
}

#show-timeline {
	position: relative;
	padding: 0;
}

#show-timeline img {
	display: block;
	width: 1.25em;
	position: absolute;
	top: 0.375em;
}

#show-timeline img:first-child {
	left: 0.375em;
}

#show-timeline img:last-child {
	right: 0.375em;
}

#show-timeline span {
	padding-left: 2.25em;
}

#page-feed .last-update,
#page-feed .counts {
	font-size: 87.5%;
	color: #333;
}

#page-feed .last-update {
	float: right;
}

#page-feed .counts {
	border-bottom: 1px solid #333;
}

#page-feed .counts .unread {
	color: red;
}

#page-feed .counts .updated {
	color: blue;
}

#page-entry .date {
	text-align: center;
	font-size: 81%;
}

#page-entry .navigation {
	text-align: center;
	font-weight: bold;
}

#navigate-prev:not(.disabled),
#navigate-next:not(.disabled) {
	cursor: pointer;
}

#page-entry .update {
	padding: 0 1em;
}

#page-entry .disabled {
	color: #aaa;
}

#page-entry .title {
	text-align: center;
}

#page-entry .author {
	text-align: center;
	font-style: italic;
}

#page-entry .wrapper {
	padding: 5px 0.5em;
}

#page-entry .content * {
	width: auto;
	max-width: 100%;
	overflow: auto;
}

#page-entry .content li {
	overflow: visible;
}

#page-entry .content img,
#page-entry .content video,
#page-entry .content iframe {
	height: auto;
	margin: 0 auto;
}

/*reset styles from above*/
#page-entry .content section,
#page-entry .content header {
	position: static;
	width: auto;
	height: auto;
	background-color: transparent;
	color: inherit;
}

pre {
	border-left: 4px solid #39d;
	padding: 0.4em;
	background-color: #eee;
	color: #000;
/*duplicated from above for source code, which isn't in #page-entry .content*/
	width: auto;
	max-width: 100%;
	overflow: auto;
}

.tag-list {
	margin: 1em 0 0 0;
	padding: 0;
}

.tag-list li {
	font-size: 75%;
	display: inline-block;
	white-space: nowrap;
	border: solid thin;
	margin: 0.2em 0.4em;
	padding: 0.1em 0.3em;
	border-radius: 1em;
}

del,
ins {
	text-decoration: none;
	white-space: pre-wrap;
}

/* ideally something like
del:has(block element) { display: block; }
and the other styles just for del
*/
del,
del > p,
del > h1,
del > h2,
del > h3,
del > h4,
del > h5,
del > h6,
del > ul,
del > ol,
del > li {
	background-color: #fcc;
	border: 1px solid #f00;
	border-radius: 5px;
	padding: 3px 1px;
	line-height: 2;
}

ins,
ins > p,
ins > h1,
ins > h2,
ins > h3,
ins > h4,
ins > h5,
ins > h6,
ins > ul,
ins > ol,
ins > li {
	background-color: #cfc;
	border: 1px solid #0f0;
	border-radius: 5px;
	padding: 3px 1px;
	line-height: 2;
}

mark {
	background-color: #ffc;
	border: 1px solid #ff0;
	border-radius: 5px;
	padding: 3px 1px;
	line-height: 2;
	color: inherit; /*override browser style*/
	white-space: pre-wrap;
}

#feed-list mark {
	line-height: inherit;
	white-space: pre;
}

/*Themes*/
/*large*/
body.theme-large section > .wrapper {
	font-size: 120%;
}

/*dark*/
body.theme-dark section {
	background-color: #333;
	color: #ccc;
}

body.theme-dark a {
	color: #88f;
}

body.theme-dark a:visited {
	color: #daf;
}

body.theme-dark  .button {
	color: white;
}

body.theme-dark #collection-list li,
body.theme-dark #feed-list li,
body.theme-dark #show-timeline,
body.theme-dark .show-all {
	border-color: #aaa;
}

body.theme-dark #collection-list li.updated,
body.theme-dark #feed-list li.updated {
	border-color: #39d;
}

body.theme-dark #collection-list li.updated .count {
	background-color: #39d;
}

body.theme-dark #page-feed .counts .updated {
	color: #39d;
}

body.theme-dark #collection-list li.unread,
body.theme-dark #feed-list li.unread {
	border-color: #d00;
}

body.theme-dark #collection-list li.unread .count {
	background-color: #d00;
}

body.theme-dark #page-feed .counts .unread {
	color: #d00;
}

body.theme-dark #collection-list li.updating {
	color: #888;
	border-color: #888;
}

body.theme-dark #show-timeline img {
	filter: invert(100%);
}
/* fallback for browsers without invert filter */
body.theme-dark #show-timeline img:first-child {
	background-color: #ccc;
	border-radius: 50%;
}

body.theme-dark #show-timeline img:last-child {
	background-color: #ccc;
	border-radius: 40% 60%;
}

body.theme-dark #page-feed .last-update,
body.theme-dark #page-feed .counts {
	color: #aaa;
}

body.theme-dark #page-feed .counts {
	border-color: #aaa;
}

body.theme-dark #page-entry .disabled {
	color: #555;
}

body.theme-dark #page-entry .content pre {
	background-color: #555;
	color: #ccc;
}

body.theme-dark del,
body.theme-dark del > p,
body.theme-dark del > h1,
body.theme-dark del > h2,
body.theme-dark del > h3,
body.theme-dark del > h4,
body.theme-dark del > h5,
body.theme-dark del > h6,
body.theme-dark del > ul,
body.theme-dark del > ol,
body.theme-dark del > li {
	background-color: #500;
}

body.theme-dark ins,
body.theme-dark ins > p,
body.theme-dark ins > h1,
body.theme-dark ins > h2,
body.theme-dark ins > h3,
body.theme-dark ins > h4,
body.theme-dark ins > h5,
body.theme-dark ins > h6,
body.theme-dark ins > ul,
body.theme-dark ins > ol,
body.theme-dark ins > li {
	background-color: #050;
}

body.theme-dark mark {
	background-color: #550;
}

body.theme-expandurl #page-entry a[href]:not([href=""]):not([href^="#"]):not(.noexpand)::after {
	content: " (" attr(href) ")";
	font-size: 90%;
	word-wrap: break-word;
}

body.theme-expandurl #page-entry .author[data-url]:not([data-url=""])::after {
	content: " (" attr(data-url) ")";
	font-size: 90%;
	word-wrap: break-word;
}