@font-face {
	font-family: 'ToonAlias';
	src: url(/font/ToonAlias-v03.woff2);
	font-display: swap;
}

:root {
	--bg-page: #FAFAFA;
	--bg-soft-overlay: #F0F2F5;
	--bg-head-foot-nav: #242423;
	--text-body: #525252;
	--text-heading: #272822;
	--text-muted: #777777;
	--text-commentary: #272822;
	--color-link: #4273B8;
	--color-link-toc: #C06C34;
	--bg-card: #EDE8E4;
	--bg-card-hover: #e4e1df;
	--bg-toc: #EFEAE7;
	--bg-inline-code: #e4deda;
	--bg-blockquote: #F5F2F0;
	--bg-table-header: #EEEEEE;
	--bg-code-footer: #d4d1d0;
	--bg-source: #DDDDDD;
	--border-table: silver;
	--shadow-header: #EEEEEE;
	--highlight-mark: rgba(33, 66, 131, 0.85);
	--highlight-span: rgba(249, 241, 108, 0.5);
	--chapter-start: #5284C4;
	--chapter-end: #448CCB;
	--bg-best-practice: #d2c7b8;
	--link-best-practice: #6D5C45;
	--code-best-practice: #C0B09B88;
	--bg-for-the-nerds: #b8c9d2;
	--link-for-the-nerds: #45606D;
	--code-for-the-nerds: #98B1BE88;
	--bg-protip: #bcb8d2;
	--link-protip: #4B456D;
	--code-protip: #9E98BE88;
	--bg-btw: #b8d2c1;
	--link-btw: #456D53;
	--code-btw: #96BBA288;
	--bg-warning: #d2bab8;
	--link-warning: #6D4845;
	--code-warning: #BE9B9888;
	--button: #B55747;
}

[data-theme="dark"] {
	--bg-page: #222121;
	--bg-soft-overlay: #2a2828;
	--bg-head-foot-nav: #111111;
	--text-body: #b8b8b8;
	--text-heading: #e0e0dc;
	--text-muted: #888888;
	--text-commentary: #e8e8e4;
	--color-link: #7aaae8;
	--color-link-toc: #e8934a;
	--bg-card: #333333;
	--bg-card-hover: #404040;
	--bg-toc: #333333;
	--bg-inline-code: #404040;
	--bg-blockquote: #242424;
	--bg-table-header: #2a2a2a;
	--bg-code-footer: #404040;
	--bg-source: #282828;
	--border-table: #444444;
	--shadow-header: rgba(0, 0, 0, 0.5);
	--highlight-mark: rgba(52, 96, 180, 0.6);
	--highlight-span: rgba(200, 180, 50, 0.35);
	--chapter-start: #3d6494;
	--chapter-end: #3572a8;
	--bg-best-practice: #53412D;
	--link-best-practice: #c8a878;
	--code-best-practice: #6b5a4488;
	--bg-for-the-nerds: #254150;
	--link-for-the-nerds: #78b8d0;
	--code-for-the-nerds: #2c4a5888;
	--bg-protip: #2F2956;
	--link-protip: #9d96d8;
	--code-protip: #403c6888;
	--bg-btw: #1a3028;
	--link-btw: #78c898;
	--code-btw: #2c5a3c88;
	--bg-warning: #3a2020;
	--link-warning: #d08878;
	--code-warning: #582c2c88;
	--button: #D94226;
}

/* Inline SVGs: opt-in dark mode color adaptation.
   Tag SVG elements with data-tc-fill and/or data-tc-stroke to have them
   follow the theme text color. Untagged elements (e.g. cartoon outlines)
   are left unchanged. */
[data-theme="dark"] #content svg [data-tc-fill] {
	fill: var(--text-heading) !important;
}

[data-theme="dark"] #content svg [data-tc-stroke] {
	stroke: var(--text-heading) !important;
}

[data-theme="dark"] #content svg path.data-tc-fill {
	fill: var(--text-heading) !important;
}

html {
	font-family: 'Open Sans', sans-serif;
	font-size: 18px;
	font-weight: 400;
	min-height: 100%;
	height: 100%;
}

body {
	background-color: var(--bg-page);
	padding: 0;
	margin: 0;
	min-height: 100%;
	display: flex;
	flex-direction: column;
}

body.section-contact {
	background-color: var(--bg-head-foot-nav);
}

main {
	flex: 1;
}

#content {
	max-width: 1000px;
	padding: 0 1em;
	margin: 0.25em auto;
}

#content.article-content {
	max-width: 875px;
}

#slogan {
	font-family: 'Outfit', sans-serif;
	font-size: 3.5em;
	font-weight: 200;
	margin: 1em auto 1em auto;
}

#slogan code {
	font-family: 'JetBrains Mono';
	font-variant-ligatures: none;
}

h1, h2, h3, h4, h5 {
	font-family: 'Fira Sans', sans-serif;
	font-weight: 700;
	color: var(--text-heading);
}

h1 {
	font-size: 2em;
}

h2 {
	font-size: 1.5em;
	clear: left;
}

h3 {
	font-size: 1.25em;
	clear: left;
}

/* Thanks: https://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/ */

sup, sub {
	vertical-align: baseline;
	position: relative;
	top: -0.4em;
}

sub {
top: 0.4em;
}

img {
	object-fit: contain;
}

p, aside {
	line-height: 1.8;
	color: var(--text-body);
}

li code, p code, td code, aside.commentary > code, aside.commentary :not(pre) > code {
	font-family: 'JetBrains Mono', Hack, Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	padding: 0.25em;
	background: var(--bg-inline-code);
	border-radius: 0.25em;
	font-variant-ligatures: none;
}

div.code-toolbar pre code {
	font-size: 15px;
	font-family: 'JetBrains Mono', Hack, Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-variant-ligatures: none;
}

li {
	line-height: 2em;
	color: var(--text-body);
}

a, .link {
	 color: var(--color-link);
	 text-decoration: underline;
}

nav#main-navigation {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}


.nav-item {
	justify-content: flex-end;
}

.header-wrapper {
	align-items: center;
	margin: 0 auto;
	max-width: 1000px;
	display: flex;
	justify-content: space-between;
	gap: 100px;
}

footer {
	color: #FFFFFF;
	background-color: var(--bg-head-foot-nav);
	text-align: center;
	margin-top: 2em;
	padding: 1.5em 1em;
	font-size: 18px;
}

.footer-wrapper {
	align-items: center;
	margin: 0 auto;
	max-width: 1000px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

footer a {
	color: #FFFFFF;
	text-decoration: none;
}

body.section-start footer {
	margin-top: 0;
}

body > header {
	background-color: var(--bg-head-foot-nav);
	padding: 20px 0;
	color: white;
	box-shadow: 0 5px 5px var(--shadow-header);
	width: 100%;
}

header a {
	color: white;
	text-decoration: none;
}

.generic-button {
	background-position: center center;
	background-color: var(--button);
	border: none;
	display: inline-block;
	color: white;
	padding: 0.5em 2em;
	font-weight: 700;
	text-align: center;
	border-radius: 3em;
	text-decoration: none;
}

.generic-button:hover {
	filter: brightness(120%);
}

.secondary-button {
	background-position: center center;
	border: 0.2em solid var(--button);
	display: inline-block;
	color: var(--button);
	padding: 0.5em 2em;
	font-weight: 700;
	text-align: center;
	border-radius: 3em;
	text-decoration: none;
}

.secondary-button:hover {
	filter: brightness(120%);
}

.more-buttons {
	display: flex;
	justify-content: end;
	margin-top: 1em;
}

#hero {
	background: url(/img/bg-coroutines.jpg) no-repeat center bottom;
	background-size: cover;
	width: 100%;
	text-align: center;
	margin: 0;
}

.hero-content {
	max-width: 1000px;
	padding: 2em 1em;
	margin: 0 auto;
}

.hero-content.sidekick {
	padding: 0.5em;
}

.featured-content {
	max-width: 1000px;
	margin: 0 auto;
}

.section-contact footer {
	margin-top: 0;
}

body.section-about {
	background: linear-gradient(135deg, var(--bg-soft-overlay) 50%, var(--bg-page) 50%);
}

#about {
	max-width: 900px;
	margin: 3em auto;
	padding: 0 1.5em;
}

.about-photo {
	float: right;
	margin: 0 0 1.5em 2em;
}

.about-photo img {
	border-radius: 50%;
	width: 220px;
	height: 220px;
	object-fit: cover;
	display: block;
}

#about::after {
	content: "";
	display: table;
	clear: both;
}

@media (max-width: 600px) {
	.about-photo {
		float: none;
		margin: 0 auto 1.5em;
	}

	.about-photo img {
		margin: 0 auto;
	}
}

#hero code {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.35);
}

#contact-form {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
  max-width: 600px;
  margin: auto;
  padding: 3em;
}

#contact-form input, textarea {
	font-family: 'Open Sans', sans-serif;
}

#contact-form label {
  text-align: right;
  color: white;
  font-family: sans-serif;
}

#contact-form input,
#contact-form textarea {
  padding: 0.5em;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 4px;
}

#contact-form .button-row {
  grid-column: 2; /* align under inputs */
  justify-self: end;
}

#contact-form label[for="message"] {
  align-self: start;
  margin-top: 0.3em; /* optional — gives a little breathing room */
}

#hero h1, #hero h2, #hero h3, #hero h4, #hero h5, #hero p, #hero a {
	color: white;
}

#leanpub-button {
	background-position: center center;
	background-color: #B55747;
	display: block;
	color: white;
	padding: 1em;
	font-weight: bold;
	text-align: center;
	border-radius: 3em;
	box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
	text-decoration: none;
}

#leanpub-button:hover {
	text-decoration: underline;
}

#leanpub-announcement {
	float: right;
	margin: 0 0 0.5em 0.5em;
}

a.read-more {
	display: block;
	text-align: right;
}

.news-bullet {
	margin-top: 1em;
	display: flex;
	width: 100%;
}

.bullet-content {
	margin-left: 1em;
}

.bullet-content > p {
	margin: 0;
}

aside.toc {
	float: right;
	clear: right;
	margin-left: 1em;
	background: var(--bg-toc);
	font-size: 0.9rem;
	border-radius: 0.3em;
}

aside.toc a {
	color: var(--color-link-toc);
	text-decoration: none;
}

aside.toc a:hover {
	text-decoration: underline;
}

aside.toc #TableOfContents {
	margin: 1em;
}

#TableOfContents > ul {
	margin: 0;
	padding: 0;
}

#TableOfContents > ul > li {
	list-style-type: none;
	margin: 0;
}

#TableOfContents > ul > li > ul {
	list-style-type: disc;
}

#TableOfContents > ul > li > ul > li > ul {
	list-style-type: circle;
}

#TableOfContents > ul > li > ul {
	list-style-type: disc;
}


aside.toc h4 {
	margin: 1em;
}

aside.toc nav#TableOfContents li {
	line-height: 1.5em;
}

table.code-comparison-table {
	width: 100%;
}

table.code-comparison-table.diagram-with-code {
	width: inherit;
}

table.code-comparison-table td {
	width: 50%;
	vertical-align: top;
}

table.code-comparison-table.diagram-with-code td {
	width: inherit;
	vertical-align: middle;
}

table.code-comparison-table td > p:empty {
	display:none;
}

table.code-list-table tr {
	padding: 0;
}

table.code-list-table td:first-of-type {
	padding-right: 1em;
}

article.news-summary p {
	font-size: 18px;
	font-style: italic;
}

article .read-more {
	font-size: 18px;
	text-align: right;
}

article .article-header .article-metadata {
	height: 60px;
	vertical-align: middle;
	float: right;
	font-size: 14px;
	line-height: 1.5em;
	color: var(--text-muted);
	text-align: right;
	margin: 0 2em 0 2em;
}

article .article-header .author-profile-pic {
	float: right;
	height: 60px;
	width: 60px;
	border-radius: 50%;
}

#book-toc-cols {
	width: 100%;
	display: grid;
	grid-template-columns: calc(50% - 2em) calc(50%);
	column-gap: 2em;
}

.book-toc-col {
	margin-bottom: 2em;
}

#concept-index-cols {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
}

.concept-index-col {
	flex-grow: 1;
}

.concept-index-col > ul {
	margin-top: 0;
	margin-bottom: 0;
}

.concept-index-col > ul > li {
	list-style-type: none;
	font-family: 'Open Sans', sans-serif;
	color: var(--text-body);
	font-size: 2rem;
}

.concept-index-col > ul > li > ul {
	list-style-type: disc;
	color: var(--text-body);
	font-size: 18px;
}

.concept-parens {
	font-size: 16px;
}

div.code-toolbar {
	position: relative;
}

div.code-toolbar > .toolbar {
	position: absolute;
	top: .3em;
	right: .2em;
	transition: opacity 0.3s ease-in-out;
	opacity: 0;
}

div.code-toolbar:hover > .toolbar {
	opacity: 1;
}

div.code-toolbar > .toolbar .toolbar-item {
	display: inline-block;
}

div.code-toolbar > .toolbar a {
	cursor: pointer;
}

div.code-toolbar > .toolbar button {
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	line-height: normal;
	overflow: visible;
	padding: 0;
	-webkit-user-select: none; /* for button */
	-moz-user-select: none;
	-ms-user-select: none;
}

div.code-toolbar > .toolbar a,
div.code-toolbar > .toolbar button,
div.code-toolbar > .toolbar span {
	color: #bbb;
	font-size: .8em;
	padding: 0 .5em;
	background: #f5f2f0;
	background: rgba(224, 224, 224, 0.2);
	box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
	border-radius: .5em;
}

div.code-toolbar {
	clear: both;
}

div.code-toolbar .toolbar .toolbar-item span {
	color: #7C7F6C;
}

div.code-toolbar .toolbar .toolbar-item {
	text-align: right;
	font-size: 18px;
}

.truth-table > table {
	border-collapse: collapse;
}

.truth-table table,
.truth-table th,
.truth-table td {
	border: 1px solid var(--border-table);
}

.truth-table th,
.truth-table td {
	padding: 1em;
	text-align: center;
}

.truth-table table tr th {
	background: var(--bg-table-header);
}

.truth-table table tr td:first-of-type {
	background: var(--bg-table-header);
}

.no-header-column table tr td:first-of-type {
	background: inherit;
}

span.output-error {
	color: #FF6B68;
}

mark {
	color: inherit;
	background: var(--highlight-mark);
}

mark.error {
	color: inherit;
	background: transparent;
	outline: none;
	text-decoration-color: #B73F3C;
	text-decoration-line: underline;
	text-decoration-style: wavy;
	text-decoration-skip-ink: none;
}

span.highlight {
	background: var(--highlight-span);
}

blockquote {
	background: var(--bg-blockquote);
	padding: 0.25em 1em 0.25em 2em;
	margin: 0;
	border-left: 0.25em solid var(--chapter-start);
}

.side-image {
	float: right;
	margin: 0 0 1em 1em;
}

.side-image-left {
	float: left;
	margin: 0 1em 1em 0;
}

.footnotes {
	font-style: italic;
	font-size: 0.8em;
}

.footnotes li {
	line-height: 1.55em;
	margin-bottom: 1.25em;
}

.footnotes code {
	font-size: 0.8em;
}

.footnotes sup {
  vertical-align: baseline;
  position: relative;
  top: -0.35em;
}

img.constrained-width, svg.constrained-width {
	max-width: 100%;
	max-height: 100%;
	height: auto;
}

img.centered, svg.centered {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

img.code-anatomy, svg.code-anatomy {
	max-width: 100%;
	border-radius: 0.3em;
}

.elevated {
	box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3);
}

.latest-articles, .latest-videos {
	margin: 50px 0;
}

.latest-articles ul {
	padding-left: 0;
}

.latest-articles a {
	font-weight: bold;
}

.latest-articles .bullet-content p {
	font-style: italic;
}

#article-header-side {
	float: right;
}

#share-this-article p {
	margin: 0.5em 0;
	font-family: 'Open Sans', sans-serif;
}

.underline {
	outline: dotted 1px;
	padding: 1px;
}

.tt-yes {
	background-image: url(/img/yes.png);
	background-size: contain;
	background-repeat: no-repeat;
	padding-left: 1.5em;
}

.tt-no {
	background-image: url(/img/no.png);
	background-size: contain;
	background-repeat: no-repeat;
	padding-left: 1.5em;
}

.code-copyright {
	background-color: var(--bg-blockquote);
	padding: 1em;
	border-radius: 0.3em;
	font-size: 13px;
	font-style: italic;
}

aside.commentary {
	margin: 2em;
	padding: 1em;
	border: 0px solid;
	border-radius: 10px;
}

aside.commentary, aside.commentary > p, aside.commentary > h3 {
	color: var(--text-commentary);
}

aside.commentary h3 {
	margin-top: 0;
	padding: 0;
}

aside.commentary td {
	background-color: var(--bg-card);
}

aside.commentary div.truth-table code  {
	background: var(--bg-blockquote);
}

aside.commentary code {
	border-radius: 0.25em;
}

aside.commentary.best-practice {
	background: var(--bg-best-practice);
}

aside.commentary.best-practice a {
	color: var(--link-best-practice);
}

aside.commentary.best-practice > code, aside.commentary.best-practice :not(pre) > code {
	background-color: var(--code-best-practice);
}

aside.commentary.for-the-nerds {
	background: var(--bg-for-the-nerds);
}

aside.commentary.for-the-nerds a {
	color: var(--link-for-the-nerds);
}

aside.commentary.for-the-nerds > code, aside.commentary.for-the-nerds :not(pre) > code {
	background-color: var(--code-for-the-nerds);
}

aside.commentary.protip {
	background: var(--bg-protip);
}

aside.commentary.protip a {
	color: var(--link-protip);
}

aside.commentary.protip > code, aside.commentary.protip :not(pre) > code {
	background-color: var(--code-protip);
}

aside.commentary.btw {
	background: var(--bg-btw);
}

aside.commentary.btw a {
	color: var(--link-btw);
}

aside.commentary.btw > code, aside.commentary.btw :not(pre) > code {
	background-color: var(--code-btw);
}

aside.commentary.warning {
	background: var(--bg-warning);
}

aside.commentary.warning a {
	color: var(--link-warning);
}

aside.commentary.warning > code, aside.commentary.warning :not(pre) > code {
	background-color: var(--code-warning);
}

aside.commentary.source {
	background-color: var(--bg-source);
}

/*
:not(pre) > code[class*="language-"].error, pre[class*="language-"].error {
	background: #412c2c;
}
*/

pre[class*="language-"].listing {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	margin-bottom: 0;
}

pre[class*="language-"].listing .member {
	color: #9876AA;
}

pre[class*="language-"].listing .typeparam {
	color: #20999D;
}

pre[class*="language-"].listing .classname {
	color: #a9b7c6;
}

pre[class*="language-"].listing .number {
	color: #6897bb;
}

pre[class*="language-"].listing .label {
	color: #467cda;
}

.code-box {
	position: relative;
}

.compiler-error-label {
	position: absolute;
	top:1em;
	right:1em;
	border: 2px solid #C25C5C;
	padding: 0.5em;
	border-radius: 0.5em;
	color: #C25C5C;
	font-family: 'JetBrains Mono';
	font-size: 0.75em;

}

.code-listing-footer {
	color: var(--text-body);
	background-color: var(--bg-code-footer);
	padding: 0.75em;
	border-bottom-left-radius: 0.3em;
	border-bottom-right-radius: 0.3em;
	font-size: 13px;
	font-style: italic;;
}

.code-listing-footer span.error {
	text-align: left;
}

.code-listing-footer span.listing-number {
	text-align: right;
}

.screenshot {
	max-width: 100%;
	border-radius: 0.3em;
}

.article-preview {
	border-radius: 1em;
	background-color: var(--bg-card);
	max-width: 32%;
	transition: background 0.25s;
	position: relative;
}

#support-list {
	clear: both;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-content: center;
	justify-content: center;
}

.support-item {
	padding: 1.5em;
	background-color: var(--bg-card);
	transition: background 0.25s;
	position: relative;
	border-radius: 1em;
	margin: 0.5em;
	flex-grow: 1;
	flex-basis: 40%;
	min-width: 300px;
}

.support-item img {
	float: right;
	margin: 1em;
}

.support-kaig-cover {
	transform: rotate(5deg);
	box-shadow:3px 3px 3px rgba(0, 0, 0, 0.15);
}

.article-preview-content {
	padding: 1.5em;
}


.article-preview a {
	text-decoration: none;
	font-weight: normal;
}

.article-preview p {
	line-height: 1.5em;
	margin: 1.5em 0;
	max-height: calc(1.5em * 3);
	text-overflow: ellipsis;
	overflow: hidden;
	-webkit-box-orient: vertical;
	display: block;
	display: -webkit-box;
	overflow: hidden !important;
	-webkit-line-clamp: 3;
}

.article-preview h3 {
	margin-top: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	line-height: 1.3em;
	min-height: calc(1.3em * 2);
}

.ribbon-wrapper + .article-preview-content h3 {
	padding-right: 2.5em;
}

.article-preview:hover {
	background: var(--bg-card-hover);
	transition: background 0.25s;
}

.article-preview .bullet-preview-image img {
	max-width: 100%;
	margin: auto;
	display: block;
}

.latest-articles-container {
	clear: both;
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	justify-content: space-between;
}

#chapter-intro {
	border-top: 1px solid rgba(255, 255, 255, 0.85);
	background: linear-gradient(90deg, var(--chapter-start), var(--chapter-end));
}

#chapter-intro-contents {
	max-width: 1000px;
	padding: 1em 1em 2em 1em;
	margin: auto;
}

#chapter-footer-contents {
	max-width: 1000px;
	padding: 1em 1em 1em 1em;
	margin: 2em auto 0em auto;
}

#chapter-label {
	font-family: 'Open Sans', sans-serif;
	color: white;
	font-size: 1.75em;
}

#chapter-intro-contents h1 {
	color: white;
	font-size: 3em;
	margin: 0 0 0.25em 0;
	line-height: 1.25em;
	padding-bottom: 1em;
}

#chapter-cover-image {
	display: block;
	margin: auto;
}

#chapter-caption {
	color: rgba(255, 255, 255, 0.75);
	font-weight: 200;
	font-style: italic;
	text-align: center;
	margin-top: 1em;
}

.chapter-nav {
	padding: 0;
	list-style-type: none;
	display: flex;
	width: 100%;
	justify-content: space-between;
	margin: 0;
}

#chapter-intro-contents .chapter-nav {
	padding-bottom: 1em;
	margin-bottom: 1em;
	border-bottom: 2px dashed rgba(255, 255, 255, 0.75);
}

.chapter-nav li {
	color: rgba(255, 255, 255, 0.75);
}

.chapter-nav a {
	color: rgba(255, 255, 255, 0.75);
}

#chapter-footer {
	background: linear-gradient(90deg, var(--chapter-start), var(--chapter-end));
}

.toc-translations-list {
	display: inline;
	padding: 0;
}

.toc-translations-list li {
	display: inline;
}

.toc-translations-list li::after {
	content: ' | '
}

.toc-translations-list li:last-of-type::after {
	content: unset;
}

#chapter-translations a {
	color: rgba(255, 255, 255, 0.75);
}

#chapter-translations {
	margin: 0;
	padding: 0;
	float: right;
	list-style-type: none;
}

#chapter-translations li {
	border: 1px solid rgba(255, 255, 255, 0.75);
	border-radius: 0.75em;
	margin: 0.5em;
	text-align: center;
}

#chapter-translations li a {
	padding: 0.25em 1em;
	text-decoration: none;
}

#share-this-article ul {
	padding: 0;
	margin: 0;
	display: flex;
}

#share-this-article ul li {
	list-style-type: none;
	display: block;
	width: 52px;
	height: 52px;
	padding-right: 4px;
}

.ribbon-wrapper {
	width: 7em;
	height: 8em;
	overflow: hidden;
	position: absolute;
	float: right;
	display: block;
	top: 0;
	right: 0;
}

.ribbon {
    text-align: center;
    transform: rotate(45deg);
    position: relative;
    padding: 0.25em 0;
    right: 1em;
    top: 2em;
    width: 11em;
    background-color: #B55747;
    color: white;
}

.hamburger {
	display: none;
}

.all-articles-container {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	justify-content: space-between;
}

.article-item {
	background: var(--bg-card);
	border-radius: 1em;
	padding: 1em;
	transition: background 0.25s;
	position: relative;
}

.article-item:hover {
	background: var(--bg-card-hover);
}

.article-item > a {
	text-decoration: none;
	display: flex;
	flex-direction: row;
	gap:2em;
}

.article-item h3 {
	margin-top: 0;
	padding-top: 0;
}

.article-item p:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
}

.pagination {
	display:flex;
	gap: 0.5em;
}

.pagination a {
	text-decoration: none;
	padding: 0.5em 1em;
	border-radius: 0.5em;
	background: var(--bg-card);
	color: var(--text-body);
}

.pagination a.current {
	text-decoration: none;
	padding: 0.5em 1em;
	background: #B55747;
	color: white;
	border-radius: 0.5em;
}

/* Dark mode toggle */

#theme-toggle {
	display: none;
}

#theme-toggle:hover {
	background: rgba(255, 255, 255, 0.1);
}

#theme-toggle svg {
	width: 20px;
	height: 20px;
	display: block;
}

.icon-sun {
	display: none;
}

.icon-moon {
	display: block;
}

[data-theme="dark"] .icon-sun {
	display: block;
}

[data-theme="dark"] .icon-moon {
	display: none;
}

@media (max-width: 400px) {
	.article-preview .ribbon-wrapper {
		display: none;
	}

	#slogan {
		font-size: 2.5em;
	}
}

@media (max-width: 625px) {

	#article-header-side {
		display: inline;
	}

	.latest-articles-container > .article-preview {
		max-width: 100%;
		width: 100%;
	}

	.more-buttons {
			flex-direction: column;
	}

	.article-item > a {
		flex-direction: column;
		gap:1em;
	}
}

@media (max-width: 700px) {
	aside.toc {
		width: 100%;
	}
}

@media (max-width: 750px) {

	#book-toc-cols {
		display: block;
	}

	.hamburger {
        display: block;
        z-index: 2;
    }

	nav#main-navigation {
		flex-direction: column;
		position: absolute;
		width: 100%;
		background: var(--bg-head-foot-nav);
		top: 80px;
		display:none;
	}

	nav#main-navigation.active {
		display: flex;
	}

	nav#main-navigation .nav-item {
		justify-content: center;
		padding: 1em 1em;
	}

	nav#main-navigation .nav-item a {
		display: inline-block;
		text-align: center;
		margin: auto;
	}

	.header-wrapper {
		gap: 0;
	}

	.footer-wrapper {
		flex-direction: column;
		row-gap: 1em;
	}

	.latest-articles-container {
		justify-content: center;
	}
}

@media (max-width: 950px) {
	.side-by-side {
		flex-direction: column;
	}

	.side-by-side p {
		margin-left: 5em;
		margin-right: 5em;
	}

	.article-preview {
		max-width: 48%;
		width: 48%;
	}

	body > header .header-wrapper {
		padding: 0 20px;
	}

	table.code-comparison-table {
		display: inline;
	}

	table.code-comparison-table tbody {
		display:inline;
	}

	table.code-comparison-table tr {
		display: flex;
		flex-wrap: wrap;
	}

	table.code-comparison-table td {
		display: block;
		flex-grow: 1;
		max-width: 100%;
	}

	table.code-comparison-table.diagram-with-code td {
		flex-grow: 0;
	}
}
