/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
   ========================================================================== */

/**
 * Remove the margin in all browsers.
 */

body {
  margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */

main {
  display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */

hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/* Text-level semantics
   ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */

a {
  background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */

b,
strong {
  font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
 * Add the correct font size in all browsers.
 */

small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
   ========================================================================== */

/**
 * Remove the border on images inside links in IE 10.
 */

img {
  border-style: none;
}

/* Forms
   ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */

button,
input { /* 1 */
  overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */

button,
select { /* 1 */
  text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 */

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */

fieldset {
  padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */

legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */

progress {
  vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */

textarea {
  overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */

[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/* Interactive
   ========================================================================== */

/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */

details {
  display: block;
}

/*
 * Add the correct display in all browsers.
 */

summary {
  display: list-item;
}

/* Misc
   ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */

template {
  display: none;
}

/**
 * Add the correct display in IE 10.
 */

[hidden] {
  display: none;
}
:root {
  /* Font sizes: https://type-scale.com/, Minor Third */
  --f1: 2.074rem;
  --f2: 1.728rem;
  --f3: 1.44rem;
  --f4: 1rem;
  --f5: 0.833rem;

  /* Colors */
  --c-h: 220;
  --c-s: 50%;
  --c-l: 42%;
  --c: hsl(var(--c-h), var(--c-s), var(--c-l));
  --c-text: #f4f4f4;
  --bg-l: 99%;
  --bg: hsl(var(--c-h), var(--c-s), var(--bg-l));
  --fg-l: 92%;
  --fg: hsl(var(--c-h), var(--c-s), var(--fg-l));
  --mg-l: 97%;
  --mg: hsl(var(--c-h), var(--c-s), var(--mg-l));

  /* Blacks to whites */
  --dark-gray: #222222;
  --light-gray: #555555;

  /* Spacings */
  --ls: 2.5rem;
  --hls: 1.25rem;
  --ms: 1rem;
  --hms: 0.5rem;

  /* Others */
  --max-width: 52rem;
  --border: 1px;
  --radius: 0.4rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  color: var(--dark-gray);
  background-color: var(--bg);
  background-attachment: fixed;
  line-height: 1.25;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui,
    helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}

code,
kbd,
samp,
pre {
  font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
}

.p-category,
:not(pre)>code {
  border-radius: calc(var(--radius) / 2);
  padding-inline: 0.15rem;
  background: var(--mg);
  border: var(--border) solid var(--fg);
}

.p-category {
  text-decoration: none;
  white-space: nowrap;
  color: var(--c);
  font-size: 90%;
}

svg,
video,
img {
  max-width: 100%;
}

.icon,
img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 .05em 0 .1em;
  vertical-align: -0.1em;
}

.icon {
  display: inline-block;
}

figure {
  margin: var(--ms) 0;
}

audio,
video,
figure img {
  width: 100%;
  display: block;
}

.footnotes::before,
h1,
h2,
h3,
h4,
h5 {
  font-weight: bold;
  line-height: 1.3;
  margin: 2rem 0 1rem 0;
}

h1 {
  font-size: var(--f1)
}

h2 {
  font-size: var(--f2);
}

h3 {
  font-size: var(--f3);
}

h4 {
  font-size: var(--f4);
  text-transform: uppercase;
}

code,
.small,
small {
  font-size: var(--f5);
}

a {
  color: inherit;
  text-decoration: underline;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  cursor: pointer;
}

li {
  margin: 0.25em 0;
}

::marker {
  color: var(--c)
}

.nl,
.nl:active,
.nl:visited {
  text-decoration: none;
  color: inherit;
}

.lh:hover {
  text-decoration: underline;
}

.dn {
  display: none !important;
}

.db {
  display: block;
}

.br {
  border-radius: var(--radius);
}

.lg {
  color: var(--light-gray);
}

.wn {
  font-weight: 400;
}

input,
select,
textarea {
  padding: .5rem;
  border: 1px solid var(--fg);
  outline: 0;
  min-width: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--dark-gray);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--c);
}

input:disabled,
select:disabled,
textarea:disabled {
  background-color: var(--mg);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

button {
  background-color: var(--c);
  border: var(--border) solid var(--c);
  font-weight: 700;
  padding: var(--hms);
  color: var(--c-text);
  cursor: pointer;
  border-radius: var(--radius);
  outline: 0;
}

button:hover {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
}

#footer {
  margin-top: 2rem;
  font-size: var(--f5);
}

#footer>div:not(.box) {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

#footer>div>div {
  margin-bottom: 0.5rem;
}

.pixelated {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

hr {
  border: 0;
  border-top: 1px solid var(--fg);
  margin: 1.2em auto;
}

ul,
ol {
  padding-left: 2em;
}

figcaption {
  text-align: center;
  font-size: var(--f5);
  color: var(--dark-gray);
  margin: 0.25rem 0;
}

main header {
  margin: var(--hls) 0;
}

main header h1,
main header h2 {
  margin: 0;
}

main header h1.bookmark {
  font-size: var(--f2);
}

main header p {
  font-size: var(--f5);
  color: var(--light-gray);
  font-weight: 500;
  margin: .25em 0;
}

main ol,
main p,
main figcaption,
main ul {
  line-height: 1.5;
}

table {
  width: 100%;
  margin: 1rem 0;
  overflow: auto;
  border-collapse: collapse;
}

table thead {
  background-color: var(--fg);
  font-weight: bold;
}

table th,
table td {
  padding: var(--hms);
  border: var(--border) solid var(--fg);
}

table tr {
  border-top: var(--border) solid var(--fg);
}

table tr:nth-child(2n) {
  background-color: var(--mg);
}

table img {
  background-color: transparent;
}

blockquote {
  padding-left: 0.75rem;
  margin: 1em 0 1rem 1rem;
  border-left: 0.2rem solid var(--fg);
}

details summary {
  cursor: pointer;
}

.youtube-player {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.fw {
  width: calc(100% + 2 * var(--ls));
  margin-left: calc(var(--ls) * -1);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

#header,
#header #home {
  display: flex;
  align-items: center;
}

#header form {
  margin-left: auto;
  font-size: var(--f5);
}

#header form input {
  width: 12rem;
}

#header form button {
  background: var(--mg);
  border-color: var(--fg);
  padding: var(--hms);
}

#header form button:hover {
  background: var(--fg);
}

#header p {
  margin: 0;
}

#header .avatar {
  width: 5rem;
  margin-right: var(--ms);
}

#header .avatar img {
  display: block;
}

#header .name {
  font-weight: bold;
  font-size: var(--f3);
}

#header label {
  display: none;
}

#navbar {
  display: flex;
  color: var(--c);
  margin-top: 0;
  margin-bottom: var(--hls);
  overflow: hidden;
  text-align: center;
  font-weight: bold;
}

#navbar label,
#navbar a {
  flex-grow: 1;
  display: block;
  padding: var(--hms);
}

#navbar label {
  display: none;
}

.container {
  width: 100%;
  background-color: var(--bg);
  max-width: var(--max-width);
  padding: var(--ms) var(--ls);
  margin: 0 auto;
}

.left,
.right {
  max-width: 20em;
  text-align: center;
  margin: 1rem auto;
  width: 100%;
}

.left {
  float: left;
  margin-right: 1.5rem;
}

.right {
  float: right;
  margin-left: 1.5rem;
}

.inline-form {
  display: flex;
}

.inline-form input:first-of-type {
  flex-grow: 1;
}

.inline-form button {
  margin-left: var(--hms);
}

.block-form>* {
  display: block;
  width: 100%;
  margin: var(--hms) 0;
}

#navbar,
.box,
.terms a,
.terms a:visited,
.highlight>pre,
main pre {
  border: var(--border) solid var(--fg);
  background-color: var(--mg);
  border-radius: var(--radius);
}

.card {
  margin: var(--ms) 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: var(--border) solid var(--fg);
}

.card>* {
  padding: 0 var(--ms);
}

.card header {
  margin: var(--ms) 0;
}

.card>div>.fw:last-child,
.card>div>.fw:last-child figure {
  margin-bottom: 0;
}

.card>div>.fw {
  width: calc(100% + 2 * var(--ms));
  margin-left: calc(var(--ms) * -1);
}

.card h2.bookmark {
  font-size: var(--f3);
}

.card .more {
  display: block;
  padding: var(--hms)var(--ms);
  font-size: var(--f5);
  text-align: center;
  font-weight: 700;
  clear: both;
  border-top: 1px solid var(--fg);
}

.box {
  padding: var(--hms) var(--ms);
  margin: 1rem 0;
}

.box>*:first-child {
  margin-top: 0;
}

.box>*:last-child {
  margin-bottom: 0;
}

.box.attrs {
  font-size: var(--f5);
}

.box.attrs>span:not(:last-child)::after {
  content: ' •';
}

.box p {
  margin: 0.5em 0;
}

.terms ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.terms li {
  display: inline-block;
  margin: 0 var(--hms) var(--hms) 0;
}

.terms a,
.terms a:visited {
  text-decoration: none;
  font-size: var(--f5);
  padding: var(--hms);
  display: inline-block;
}

#navbar a:hover,
#navbar a[aria-current="page"],
.terms a:hover {
  background-color: var(--fg);
}

.terms.bold a,
.terms.bold a:visited {
  font-weight: bold;
}

.highlight>pre,
main pre {
  overflow: auto;
  padding: var(--ms);
  /* needs !important because Chroma adds background inline */
  background-color: var(--mg) !important;
}

#preview,
#preview::after {
  left: 0;
  width: 100%;
}

#preview {
  position: fixed;
  top: 0;
  z-index: 9999;
  padding: 2.5rem var(--ls);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#preview::after {
  content: 'tap anywhere to close';
  position: absolute;
  bottom: 0;
  text-align: center;
  line-height: 2.5rem;
  font-size: var(--f5);
}

#preview img {
  max-height: 100%;
}

.fg {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.fg figure {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.fg figure picture {
  flex-grow: 1;
}

.fg figure img {
  object-fit: cover;
  height: 100%;
}

.tab {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.012em;
  white-space: pre;
}

.tbh {
  position: sticky;
  top: 0;
  margin: 0;
  padding: var(--hms) 0;
  background: var(--bg);
  border-bottom: calc(2 * var(--border)) solid var(--c);
  color: var(--c);
}

.tbh small {
  font-weight: normal;
}

ul.tb,
.tb ul {
  padding: 0;
  margin: 0;
  list-style-type: none;
  line-height: 1.25;
}

.tb li {
  display: grid;
  margin: 0;
  grid-gap: 1rem;
  align-items: center;
}

.tb li:not(:last-of-type) {
  border-bottom: var(--border) solid var(--fg);
}

.tb li:hover {
  background-color: var(--mg);
}

.tb li > * {
  display: block;
  margin: var(--hms) 0;
}

.tb li > *:first-child {
  font-weight: 600;
}

.pagination {
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--mg);
  display: flex;
}

.pagination a {
  flex-grow: 1;
  padding: var(--hms);
  text-align: center;
  text-decoration: none;
}

.pagination a:hover {
  background-color: var(--fg);
}

.pagination a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination a[aria-current="page"] {
  background-color: var(--fg);
  font-weight: bold;
}

#skip-to-content {
  position: absolute;
  top: -20em;
}

#skip-to-content:hover,
#skip-to-content:focus {
  left: 0;
  right: 0;
  top: 0;
  margin-inline: auto;
  width: max-content;
  background: var(--fg);
  color: var(--c);
  padding: var(--hms);
  font-weight: bold;
}

:root.dark {
  --c-h: 220;
  --c-s: 50%;
  --c-l: 50%;
  --fg-l: 15%;
  --mg-l: 9%;
  --bg-l: 5%;
  --dark-gray: #ddd;
  --light-gray: #bbb;
}

.dark #navbar {
  color: var(--c-text);
}

/* This can likely be improved. */
.dark .highlight>pre code,
.dark main pre code {
  color: #212121;
  filter: invert(1);
}

.only-light,
.dark .only-dark {
  display: revert;
}

.only-dark,
.dark .only-light {
  display: none;
}

@media screen and (max-width: 53rem) {
  :root {
    --ls: 1rem;
    --hls: 1rem;
  }

  body {
    background: var(--bg);
  }

  #header {
    padding: 0 var(--ls);
  }

  #navbar {
    width: 100%;
    margin-left: 0;
  }
}

@media screen and (max-width: 44rem) {
  :root {
    --f1: 1.728rem;
    --f2: 1.44rem;
    --f3: 1.2rem;
    --f4: 1rem;
    --f5: 0.833rem;
  }

  .lh {
    text-decoration: underline;
  }

  #navbar,
  #navbar label,
  #toggler:checked+#navbar a {
    display: block;
    text-align: left;
  }

  #header .avatar {
    max-width: 4rem;
    margin-right: var(--hms);
  }

  #navbar a,
  #header form input {
    display: none;
  }

  .tb li {
    display: flow-root;
  }

  .fg {
    grid-gap: 0.5rem;
  }
}

@media print {
  html,
  body {
    background: white !important;
    font-size: 11pt;
    border: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  #header,
  #navbar,
  #footer {
    display: none;
  }

  a:hover {
    background: none;
  }
}
