
:root {
  color-scheme: dark;
  --bg: #100e17;
  --ink: #dcd7e8;
  --dim: #857e9c;
  --rule: #2a2540;
  --ac: #a58be6;
  --hi: #eeea8a;
  --select: #eeea8a;

  --mask-ink: #fff;
  --mask-blend: darken;
  --curtain-blend: screen;
  --curtain-opacity: .85;

  --g-curtain: linear-gradient(90deg, #4a30c0, #a58be6 28%, #eeea8a 50%, #a58be6 72%, #4a30c0);
  --g-wordmark: linear-gradient(#eeea8a, #ff9fc0 35%, #b79bf0 65%, #5a35d0);
  --g-logo: linear-gradient(#eeea8a, #ff9fc0 35%, #b79bf0 65%, #5a35d0);
  --g-rule: linear-gradient(90deg, #5a35d0, #b79bf0 25%, #ff9fc0 50%, #eeea8a 75%, #5a35d0);
  --g-heading: linear-gradient(90deg, #b79bf0, #eeea8a 40%, #ff9fc0 75%, #b79bf0);
  --g-kopimi: linear-gradient(90deg, #b79bf0, #eeea8a 50%, #ff9fc0);

  --ink-strong: #fff;
  --panel: rgba(0, 0, 0, .28);
  --tint: rgba(165, 139, 230, .14);
  --tint-soft: rgba(165, 139, 230, .06);
  --code-ink: #e3d9ff;
  --key-bg: #17141f;
  --key-edge: #4a4268;
  --warn: #ff9fc0;
  --warn-bg: rgba(255, 159, 192, .07);
  --warn-edge: #4a2f45;
  --g-quote: linear-gradient(#eeea8a, #ff9fc0, #b79bf0);

  --dashes: repeating-linear-gradient(90deg, var(--rule) 0 6px, transparent 6px 9px) top left / 100% 2px no-repeat;

  --f-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Pixelify Sans", system-ui, sans-serif;
  --f-pixel: "Tiny5", "DotGothic16", ui-monospace, Menlo, monospace;
  --f-screen: "DotGothic16", ui-monospace, Menlo, Consolas, monospace;
  --f-blocks: Menlo, Consolas, "DejaVu Sans Mono", "Courier New", monospace;
}

:root[data-theme=light] {
  color-scheme: light;
  --bg: #fff;
  --ink: #2a2440;
  --dim: #6a6582;
  --rule: #f3b6c8;
  --ac: #1487c8;
  --hi: #c7336d;
  --select: #f5a9b8;

  --ink-strong: #14101f;
  --panel: #f5f9fc;
  --tint: rgba(20, 135, 200, .1);
  --tint-soft: rgba(20, 135, 200, .05);
  --code-ink: #0f5f8f;
  --key-bg: #fff;
  --key-edge: #b9c7d6;
  --warn: #c7336d;
  --warn-bg: rgba(245, 169, 184, .16);
  --warn-edge: #f3b6c8;
  --g-quote: linear-gradient(#5bcefa, #f5a9b8, #5bcefa);

  --mask-ink: #000;
  --mask-blend: lighten;
  --curtain-blend: multiply;
  --curtain-opacity: 1;

  --g-curtain: linear-gradient(90deg, #5bcefa, #f5a9b8 27%, #fff 50%, #f5a9b8 73%, #5bcefa);
  --g-wordmark: linear-gradient(#2aa7e6, #f07fa4 34%, #f9c3d1 50%, #f07fa4 66%, #2aa7e6);
  --g-logo: linear-gradient(#2aa7e6, #f07fa4 34%, #f9c3d1 50%, #f07fa4 66%, #2aa7e6);
  --g-rule: linear-gradient(90deg, #5bcefa, #f5a9b8 30%, #fbdbe3 50%, #f5a9b8 70%, #5bcefa);
  --g-heading: linear-gradient(90deg, #0f74b8, #cf3f78 42%, #e0608f 62%, #0f74b8);
  --g-kopimi: linear-gradient(90deg, #0f74b8, #cf3f78);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

::selection { background: var(--select); color: #000; }

p { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ac);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--hi); }
a:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  z-index: 9;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ac);
  transform: translateY(-300%);
}
.skip:focus { transform: none; }

.shade {
  margin: 0;
  font: 13px/1 var(--f-blocks);
  white-space: pre;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.mask {
  position: relative;
  isolation: isolate;
  contain: paint;
  overflow: hidden;
  background: var(--bg);
}
.mask > .shade { position: absolute; inset: 0; }
.mask-text {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--mask-ink);
  mix-blend-mode: var(--mask-blend);
}

#curtain {
  position: absolute;
  z-index: 5;
  top: -3px;
  left: 0;
  right: 0;
  height: 117px;
  opacity: var(--curtain-opacity);
  mix-blend-mode: var(--curtain-blend);
  background-image: var(--g-curtain);
}

.control {
  position: fixed;
  z-index: 6;
  top: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ac);
  border: 1px solid var(--rule);
  border-radius: 0;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.control:hover { color: var(--hi); border-color: var(--ac); }
.control:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }
.control svg { display: block; width: 14px; height: 14px; fill: currentColor; }
#pause { right: 12px; }
#theme { right: 60px; }

#pause .icon-play,
#pause[data-paused=true] .icon-pause,
#theme .icon-moon,
[data-theme=light] #theme .icon-sun { display: none; }
#pause[data-paused=true] .icon-play,
[data-theme=light] #theme .icon-moon { display: block; }

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7vh 22px 0;
}
.wordmark > .shade { background-image: var(--g-wordmark); }
.wordmark .mask-text {
  font-size: 0;
  font-weight: normal;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.wordmark .mask-text span {
  display: inline-block;
  padding: 0 .03em .08em;
  font: 700 100px/1 "Pixelify Sans", "Tiny5", monospace;
  letter-spacing: -.01em;
}
.wordmark a,
.wordmark a:hover { display: block; color: inherit; text-decoration: none; }
.wordmark a:focus-visible { outline-offset: -4px; }
.tagline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--dim);
  font: 12px/1.5 var(--f-pixel);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tagline a {
  display: inline-block;
  margin: -10px 0;
  padding: 10px 0 10px 14px;
  text-decoration: none;
}
.rule {
  height: 13px;
  opacity: .9;
  background-image: var(--g-rule);
}

.wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 7vh 22px 90px;
}
.hero .rule { margin-top: 16px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 56px;
  align-items: start;
}
main {
  max-width: 38em;
  font: 1.0625rem/1.7 var(--f-body);
}
main:focus { outline: none; }
aside {
  position: sticky;
  top: 64px;
  font-size: 15px;
}

.heading { margin: 0 0 .5em; }
.heading > .shade { background-image: var(--g-heading); }
.heading .mask-text {
  padding: 2px 0 4px;
  font: 700 28px/1.15 var(--f-display);
}
.heading.sub { margin: 1.6em 0 .5em; }
.heading.sub .mask-text { font-size: 24px; }
main > * + .heading,
aside > * + .heading { margin-top: 2.2em; }

aside .heading { margin-bottom: .35em; padding-bottom: 4px; }
aside .heading .mask-text { padding-bottom: 7px; }

#temporary { text-decoration-style: dashed; }
#temporary:hover { text-decoration-style: solid; }

#allthings .flicker { position: relative; color: transparent; }
#allthings .flicker::after {
  content: attr(data-block);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ac);
  font-family: var(--f-blocks);
  font-size: .76em;
}
#allthings .flicker.hot::after { color: var(--hi); }

.links { margin: 0; padding: 0; list-style: none; }
.links > li + li { background: var(--dashes); }
.link-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  text-decoration: none;
}
.link-row small {
  display: block;
  color: var(--dim);
  font: 12px/1.5 Verdana, Tahoma, sans-serif;
}
.glyph {
  color: var(--ac);
  font: 15px/1 Menlo, Consolas, monospace;
  transition: color .2s;
}
.external { display: block; width: 12px; height: 12px; color: var(--dim); }
.link-row:hover .glyph,
.link-row:hover .external { color: var(--hi); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  margin-top: 60px;
  padding-top: 18px;
  background: var(--dashes);
}
.kopimi {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink);
  text-decoration: none;
}
.kopimi:focus-visible { outline-offset: 4px; }
.kopimi-logo {
  --shape: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%27-72%200%20760%20792%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M%20441.07873%2C720.52422%20L%20347.83986%2C787.1277%20L%20-69.186171%2C492.03434%20L%20-69.186171%2C240.99589%20L%2024.052701%2C175.42161%20L%20173.64996%2C279.93086%20L%20173.64996%2C69.884463%20L%20266.89405%2C3.2796868%20L%20361.15821%2C69.884463%20L%20361.15821%2C279.92955%20L%20428.78306%2C232.79617%20L%20508.7127%2C289.15717%20L%20589.64549%2C231.77349%20L%20683.91486%2C298.37826%20L%20683.91486%2C549.4115%20L%20589.64549%2C614.98708%20L%20508.7127%2C557.60861%20L%20441.07873%2C605.76208%20L%20441.07873%2C720.52422%20z%20M%20-43.573458%2C240.99589%20L%2024.052701%2C289.15717%20L%2092.702847%2C240.99589%20L%2024.052701%2C192.83982%20L%20-43.573458%2C240.99589%20z%20M%2037.374959%2C298.37826%20L%20104.99981%2C346.53173%20L%20173.65127%2C298.37826%20L%20106.0251%2C250.21438%20L%2037.374959%2C298.37826%20z%20M%20117.29678%2C355.75413%20L%20185.94433%2C403.91019%20L%20254.59578%2C355.75413%20L%20185.94433%2C307.59806%20L%20117.29678%2C355.75413%20z%20M%20266.89405%2C21.724487%20L%20198.2426%2C69.884463%20L%20266.89405%2C118.03533%20L%20335.53638%2C69.884463%20L%20266.89405%2C21.724487%20z%20M%20266.89405%2C136.48403%20L%20198.2426%2C184.6401%20L%20266.89405%2C232.79617%20L%20334.52151%2C183.61742%20L%20266.89405%2C136.48403%20z%20M%20266.89405%2C250.21568%20L%20198.2426%2C298.37957%20L%20266.89405%2C346.53303%20L%20334.52151%2C298.37957%20L%20266.89405%2C250.21568%20z%20M%20198.2426%2C413.13259%20L%20266.89405%2C460.26598%20L%20334.52151%2C412.11251%20L%20266.89405%2C364.97262%20L%20198.2426%2C413.13259%20z%20M%20279.18971%2C469.48317%20L%20347.83986%2C517.63923%20L%20415.4582%2C469.48317%20L%20347.83986%2C421.33492%20L%20279.18971%2C469.48317%20z%20M%20428.78437%2C250.21568%20L%20360.12901%2C298.37957%20L%20427.76168%2C346.53303%20L%20496.40792%2C298.37957%20L%20428.78437%2C250.21568%20z%20M%20589.64679%2C250.21568%20L%20522.01672%2C298.37957%20L%20589.64679%2C346.53303%20L%20658.29563%2C298.37957%20L%20589.64679%2C250.21568%20z%27/%3E%3C/svg%3E");
  position: relative;
  width: 96px;
  aspect-ratio: 760 / 792;
  overflow: hidden;
  -webkit-mask: var(--shape) center / contain no-repeat;
  mask: var(--shape) center / contain no-repeat;
}
.kopimi-logo .shade { position: absolute; inset: 0; background-image: var(--g-logo); }
.kopimi-text { font: 700 21px/1.2 var(--f-display); }
.kopimi-text b {
  color: transparent;
  background-image: var(--g-kopimi);
  -webkit-background-clip: text;
  background-clip: text;
}
.kopimi:hover .kopimi-text { color: var(--hi); }
.cabin {
  color: var(--dim);
  font: 12px/1.6 var(--f-screen);
  text-align: right;
}
.cabin a { color: var(--ink); text-decoration: none; }
.cabin a:hover { color: var(--hi); text-decoration: underline; }

.article > .heading:first-child .mask-text { font-size: 32px; }
.article p { margin: 0 0 1.1em; }
.article .meta {
  margin: -.2em 0 1.6em;
  color: var(--dim);
  font: 12px/1.6 var(--f-screen);
}
.article .meta a { color: var(--ink); text-decoration: none; }
.article .meta a:hover { color: var(--hi); text-decoration: underline; }
.article .lede { font-size: 1.1em; color: var(--ink-strong); }
.article strong { color: var(--ink-strong); }
.article :is(a, summary, input):focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }

.article a.ext::after {
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M5 1.5H1.5v9h9V7M7.5 1.5h3v3M10.5 1.5L5.5 6.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
  content: "";
  display: inline-block;
  width: .62em;
  height: .62em;
  margin-left: .25em;
  background: currentColor;
  opacity: .7;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
}

.article code,
.article kbd,
.article samp { font: .86em/1.4 ui-monospace, Menlo, Consolas, "Courier New", monospace; }
.article :not(pre) > code { padding: .12em .38em; background: var(--tint); color: var(--code-ink); }
.article kbd {
  display: inline-block;
  padding: .1em .45em;
  background: var(--key-bg);
  color: var(--ink);
  border: 1px solid var(--key-edge);
  border-bottom-width: 3px;
}
.article mark { padding: 0 .2em; background: var(--hi); color: var(--bg); }
.article del { color: var(--dim); }
.article ins { color: var(--hi); text-decoration: none; border-bottom: 1px dashed var(--hi); }
.article abbr { text-decoration: underline dotted var(--ac); cursor: help; }
.article small { font-size: .8em; color: var(--dim); }
.article q { font-style: italic; }
.article sup.fn a { padding: 0 .15em; color: var(--hi); text-decoration: none; }

.article h3 { margin: 1.7em 0 .5em; color: var(--ac); font: 700 21px/1.25 var(--f-display); }
.article h4 {
  margin: 1.7em 0 .5em;
  color: var(--dim);
  font: 12px/1.5 var(--f-pixel);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.article ul,
.article ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.article li { margin-bottom: .3em; }
.article li > ul,
.article li > ol { margin: .3em 0 .1em; }
.article ul { list-style: none; }
.article ul > li { position: relative; }
.article ul > li::before {
  content: "\2593";
  position: absolute;
  top: .5em;
  left: -1.45em;
  color: var(--ac);
  font: .72em/1 Menlo, Consolas, monospace;
}
.article ul ul > li::before { content: "\2591"; }
.article ol > li::marker { color: var(--ac); font: 700 .9em var(--f-display); }
.article ul.tasks { padding-left: .1em; }
.article ul.tasks > li::before { content: none; }
.article ul.tasks input { width: 1em; height: 1em; margin: 0 .6em 0 0; vertical-align: -.12em; accent-color: var(--ac); }
.article dl { margin: 0 0 1.1em; }
.article dt { color: var(--hi); font: 700 17px/1.4 var(--f-display); }
.article dd { margin: 0 0 .7em 1.5em; }

.article blockquote {
  margin: 1.4em 0;
  padding: .1em 0 .1em 1.1em;
  border-left: 2px solid var(--hi);
  border-image: var(--g-quote) 1;
  font-style: italic;
}
.article blockquote p { margin: 0 0 .5em; }
.article blockquote footer { color: var(--dim); font: 12px/1.6 var(--f-screen); }

.article pre:not(.shade) {
  position: relative;
  max-width: 100%;
  margin: 0 0 1.3em;
  padding: 12px 14px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--rule);
  font: 12.5px/1.55 ui-monospace, Menlo, Consolas, "Courier New", monospace;
}
.article pre code { font: inherit; }
.article pre[data-lang] { padding-top: 26px; }
.article pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 8px;
  color: var(--dim);
  border-left: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font: 11px/1.5 var(--f-pixel);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.article table { display: block; margin: 0 0 1.3em; overflow-x: auto; border-collapse: collapse; font-size: .9em; }
.article th {
  padding: 6px 18px 6px 0;
  color: var(--dim);
  border-bottom: 2px solid var(--rule);
  font: 12px/1.5 var(--f-pixel);
  letter-spacing: .14em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.article td { padding: 8px 18px 8px 0; white-space: nowrap; }
.article tbody tr + tr td { background: var(--dashes); }
.article .num { padding-right: 0; text-align: right; font-variant-numeric: tabular-nums; }
.article td.num { color: var(--dim); }
.article th.num { padding-left: 18px; }

.article figure { margin: 1.5em 0; }
.article figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); }
.article figure.wide img { width: 100%; }
.article figure.small img { width: 96px; }
.article figure.on-white img { background: #fff; }
.article img.pixelated { image-rendering: pixelated; }
.article figcaption { margin-top: 8px; color: var(--dim); font: 12px/1.6 var(--f-screen); }

.article .embed { margin: 0 0 1.3em; aspect-ratio: 16 / 9; background: var(--panel); border: 1px solid var(--rule); }
.article .embed iframe { display: block; width: 100%; height: 100%; border: 0; }

.article .note {
  margin: 1.4em 0;
  padding: 12px 16px 2px;
  background: var(--tint-soft);
  border: 1px solid var(--rule);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.article .note > b {
  display: block;
  margin-bottom: 4px;
  color: var(--ac);
  font: 12px/1.5 var(--f-pixel);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.article .note.warn { background: var(--warn-bg); border-color: var(--warn-edge); }
.article .note.warn > b { color: var(--warn); }

.article details { margin: 1.4em 0; padding: 8px 0; border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
.article summary { cursor: pointer; list-style: none; font: 700 17px/1.4 var(--f-display); }
.article summary::-webkit-details-marker { display: none; }
.article summary::before { content: "\2591"; margin-right: .7em; color: var(--ac); font: 14px/1 Menlo, Consolas, monospace; }
.article details[open] summary::before { content: "\2593"; }
.article summary:hover { color: var(--hi); }
.article details > p { margin: .6em 0 .4em; }

.article hr { height: 2px; margin: 2em 0; border: 0; background: var(--dashes); }
.article .rule { margin: 2em 0; }

.article .footnotes { padding-left: 1.4em; color: var(--dim); font-size: .85em; }
.article .footnotes a { color: var(--hi); text-decoration: none; }
.article .pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 3em; padding-top: 16px; background: var(--dashes); }
.article .pager a { max-width: 46%; font: 700 17px/1.3 var(--f-display); text-decoration: none; }
.article .pager a + a { text-align: right; }
.article .pager small {
  display: block;
  color: var(--dim);
  font: 400 11px/1.6 var(--f-pixel);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.error-page {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  max-width: none;
}
.error-page .big-arrow { width: 300px; height: 300px; image-rendering: pixelated; }
.error-page .message { max-width: 34em; }
.error-page .heading .mask-text { font-size: 34px; }
.error-page .go { display: inline-block; margin-top: .4em; font: 700 19px/1.3 var(--f-display); }

@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  aside { position: static; max-width: 38em; }
  .cabin { text-align: left; }
}

@media (max-width: 760px) {
  :root[data-theme=light] { --g-wordmark: linear-gradient(#0f74b8, #cf3f78 50%, #0f74b8); }
  .hero { padding: 68px 16px 0; }
  .wrap { padding: 36px 16px 56px; }
  .control { width: 44px; height: 44px; }
  #theme { right: 64px; }
  #curtain { height: 78px; }
  .heading .mask-text { font-size: 25px; }
  .link-row { padding: 12px 0; }
  .site-footer { margin-top: 40px; }
  .error-page { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .error-page .big-arrow { width: 200px; height: 200px; }
  .error-page .heading .mask-text { font-size: 28px; }
}
