@import url(https://fonts.googleapis.com/css?family=Arvo:400,700|Damion);

:root {
	--accent1: hsl(185, 40%, 50%); /* turquoise */
	--accent2: hsl(10, 50%, 40%); /* dark red */
	--base-color: hsl(40, 60%, 90%); /* beige */
}

body {
	font: 100%/1.5 Rockwell, Arvo, Helvetica Neue, sans-serif;
	margin: 0;
	display: flex;
	flex-flow: column;

}

code, pre {
	font-family: Consolas, Monaco, Ubuntu Mono, monospace;
}

input, textarea, select {
	border: 2px solid;
	padding: .1em .3em;
	font: inherit;
	background: transparent;
	color: inherit;
	box-sizing: border-box
}

input::placeholder, textarea::placeholder, select::placeholder {
		color: inherit;
		opacity: .6;
	}

h1 {
	margin: 0;
	font: 300% Damion, cursive;
}

a {
	color: inherit;
}

:where(h1, h2, h3, h4, h5, h6) a:not(:hover) {
	text-decoration: none;
}

header,
section,
footer,
body > md-block:not([rendered="remote"]) {
	max-width: 900px;
	padding: 1.5em calc(50% - 450px);
}

header, footer {
	background: var(--accent1);
	color: var(--base-color);
}

@media (max-width: 950px) {
	header, section, footer {
		padding: 1.5em 2em;
	}
}

header {
	display: flex
}

header > h1 {
		display: inline-block;
		width: 350px;
		margin-bottom: -.66em;
		margin-left: -2em;
	}

header iframe {
		display: block;
		width: 100%;
		border: 0;
	}

header > div {
		display: -webkit-flex;
		display: flex;
		-webkit-flex-flow: column;
		flex-flow: column;
		-webkit-flex: 1;
		flex: 1;
		text-align: right;
		margin: 0;
	}

header p {
			-webkit-flex: 1;
			flex: 1;
			margin: 0;
			font-size: 150%;
			line-height: 1.2;
			font-weight: bold;
			letter-spacing: -.03em;
		}

header nav {
			font: 160% Damion, cursive
		}

header nav ul {
				margin: 0;
			}

header nav li {
				display: inline;
				list-style: none;
			}

header nav a {
				display: inline-block;
				padding: .15em .4em .15em .3em;
				border-radius: .3em;
				text-decoration: none;
				border: .12em solid transparent;
				line-height: 1;
			}

header nav li:last-of-type a,
			header nav a:hover {
				border-color: var(--base-color);
			}

header nav a:hover {
				background: var(--base-color);
				color: var(--accent1);
			}

section section {
	padding: 0;
}

body > section,
body > md-block:not([rendered="remote"]),
md-block > section,
#features {
	background: var(--base-color);
	color: black;
	order: 3
}

body > section h1, body > md-block:not([rendered="remote"]) h1, md-block > section h1, #features h1 {
		color: var(--accent2);
	}

body > md-block:not([rendered="remote"]) {
	order: 1;
}

md-block > section:nth-of-type(odd),
#examples {
	padding-top: 2em;
	padding-bottom: 2em;
	--next-section-background: var(--base-color);
	--prev-section-background: var(--base-color);
	background: conic-gradient(from -45deg at bottom, var(--prev-section-background, transparent) 25%, transparent 0 100%) top,
	            conic-gradient(from -45deg at bottom, transparent 25%, var(--next-section-background, transparent) 0 100%) bottom;
	background-color: var(--accent2);
	background-size: 1em .5em;
	background-repeat: repeat-x;
	color: var(--base-color)
}

md-block > section:nth-of-type(odd) h1, #examples h1 {
		color: var(--base-color);
	}

md-block > section:last-of-type {
	--next-section-background: var(--accent1);
}



#features {
	order: 1
}



#features ul {
		padding: 0;
		list-style: none;
	}



@media (min-width: 600px) {
		#features ul {
			columns: 2;
		}
	}



#features li {
			position: relative;
			break-inside: avoid;
			-webkit-column-break-inside: avoid;
			font-size: 70%;
			margin: 0 0 1em 2.5em;
		}



#features li::before {
				content: "✓";
				position: absolute;
				top: .05em;
				right: 100%;
				margin-right: .1em;
				font-size: 320%;
				line-height: 1;
				color: var(--accent1);
			}



#features li strong {
				display: block;
				font-size: 150%
			}



#features li strong a:not(:hover) {
					text-decoration: none;
				}

#examples {
	order: 2;
	overflow: hidden
}

#examples label,
	#examples textarea {
		display: block;
	}

#examples label:first-of-type {
		float: right;
		margin-top: -.6em;
	}

#examples label {
		margin: 1em 0;
	}

footer {
	order: 4;
	background: var(--accent1) url(logo.svg#beige) right / auto 100% no-repeat;
	background-origin: content-box;
}

.github-ribbon {
	position: absolute;
	top: 0;
	left: 0;
	transform: rotate(90deg) translateX(70.71067814%) rotate(-90deg) rotate(-45deg) translateY(-100%);
	transform-origin: 0 0;
	padding: .4em 3em;
	background: var(--accent2);
	text-decoration: none;
	color: var(--base-color);
	box-shadow: 0 .1em 0 .1em rgba(0,0,0,.15)
}

.github-ribbon:hover {
		background: black;
		color: white;
	}

@media (min-width: 1150px) {
		.social-media {
			position: absolute;
			top: 1em;
			right: 1em;
			width: -webkit-min-content;
			width: -moz-min-content;
			width: min-content;
		}
	}

#carbonads {
    position: absolute;
    top: 75vh;
    right: 1em;
    max-width: 130px;
    padding: 1em;
    border: 1px solid silver;
    font-size: 50%;
    line-height: 1.5;
    background: hsla(0,0%,100%,.9);
}

@media (max-width: 950px) {
    #carbonads {
        display: none;
    }
}

.carbon-text {
    display: block;
    text-decoration: none;
}

md-block[rendered="remote"],
md-block[rendered="content"] {
	display: contents;
}

md-block header {
	display: none;
}

md-block:not([rendered]) {
	white-space: pre-line;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

th, td {
	border: 1px solid var(--accent1);
	padding: .3em .5em;
}

th {
	background: var(--accent1);
	color: var(--base-color);
}