@font-face {
  font-family: "STIX Two Text";
  src: url("/fonts/stix-two-text-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "STIX Two Text";
  src: url("/fonts/stix-two-text-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #e8e8e8;
  --dim: #8c8c8c;
  --rule: #333333;
  --typed: #00ff41;
  --serif: "STIX Two Text", "Times New Roman", Times, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #171717;
  --dim: #737373;
  --rule: #cccccc;
  --typed: #00800f;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color: var(--fg);
  font: 400 106.25%/1.55 var(--serif);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  scrollbar-color: var(--rule) var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.25rem, 3.5vw, 2.25rem) clamp(1.25rem, 7vw, 6rem);
}

::selection { background: var(--fg); color: var(--bg); }

.top, footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font: 400 0.72rem/1.4 var(--mono);
  letter-spacing: 0.02em;
  color: var(--dim);
}
.top { min-height: 2rem; }
footer { flex-wrap: wrap; row-gap: 0.25rem; }

.bots { flex-basis: 100%; margin-bottom: 0.6rem; }
.bots summary { width: fit-content; cursor: pointer; list-style: none; }
.bots summary::-webkit-details-marker { display: none; }
.bots summary::before { content: "+ "; }
.bots [open] summary::before { content: "- "; }
.bots summary:hover { color: var(--fg); }
.bots p, .bots ol { max-width: 36rem; margin: 0.8rem 0 0; }
.bots ol { padding-left: 3ch; }
.bots [open] { padding-bottom: 1.2rem; }

.invert {
  appearance: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
}
.invert:hover { color: var(--fg); }

svg { display: block; fill: currentColor; shape-rendering: crispEdges; flex: none; }

main {
  width: 100%;
  max-width: 42rem;
  padding-block: clamp(3rem, 15vh, 9.5rem) 3rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.9rem, 1.9rem + 5vw, 4.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
}

.lede {
  margin: 1.1rem 0 0;
  font-size: 1.24rem;
  line-height: 1.4;
  text-wrap: balance;
}
.lede em { color: var(--dim); }

hr {
  height: 1px;
  margin: 2.5rem 0;
  border: 0;
  background: var(--rule);
}

.facts { margin: 0; }
.row {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  align-items: first baseline;
  column-gap: 0.75rem;
  padding-block: 0.32rem;
}
dt {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font: 400 0.72rem/1.4 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
}
dt svg { align-self: center; color: var(--fg); }
dt i {
  flex: 1;
  min-width: 1rem;
  height: 1px;
  background: radial-gradient(circle, var(--rule) 0.5px, transparent 0.9px) left center / 6px 1px repeat-x;
  transform: translateY(-0.1em);
}
dd { margin: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--dim);
}
a:hover { background: var(--fg); color: var(--bg); text-decoration-color: transparent; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

.sh { font: 400 0.8rem/1.6 var(--mono); }

.out { white-space: pre-wrap; overflow-wrap: anywhere; }
.out div { min-height: 1.6em; }
.buf, .typed { position: relative; z-index: 11; color: var(--typed); }

.line { position: relative; display: flex; gap: 1ch; cursor: text; }
.ps1 { flex: none; color: var(--dim); }
.buf { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.line input {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  font: 16px var(--mono);
  opacity: 0;
  cursor: text;
}
.caret { background: var(--typed); color: var(--bg); animation: blink 1.1s steps(1) infinite; }
.caret.typing { animation: none; }
.sh.closed .ps1 { display: none; }
.line:not(:focus-within) .caret {
  background: none;
  color: inherit;
  box-shadow: inset 0 0 0 1px var(--dim);
  animation: none;
}
@keyframes blink { 50% { background: none; color: inherit; } }

.r { position: relative; }
h1 .r, .lede .r, dd .r { display: inline-block; }
.r::after {
  content: "";
  position: absolute;
  inset: 0.2em -0.1em;
  background: var(--fg);
  transform-origin: right;
  animation: unredact 0.5s cubic-bezier(0.7, 0, 0.2, 1) both;
  pointer-events: none;
}
h1 .r::after { inset: 0.04em -0.04em 0.1em; animation-delay: 0.25s; }
.lede .r::after { animation-delay: 0.33s; }
dt.r::after { inset: 0.05em 0; }
.row:nth-child(1) .r::after { animation-delay: 0.41s; }
.row:nth-child(2) .r::after { animation-delay: 0.48s; }
.row:nth-child(3) .r::after { animation-delay: 0.55s; }
.row:nth-child(4) .r::after { animation-delay: 0.62s; }
@keyframes unredact { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.top, hr, .sh, footer { animation: arrive 0.6s 0.9s backwards; }
@keyframes arrive { from { opacity: 0; } }

.dissolve {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  image-rendering: pixelated;
  mix-blend-mode: difference;
}

@media (max-width: 34rem) {
  .row { grid-template-columns: 1fr; padding-block: 0.6rem; }
  dt i { display: none; }
  dd { padding-left: calc(16px + 0.75rem); }
  hr { margin: 2rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .r::after { display: none; }
}

@media print {
  :root, :root[data-theme] { --bg: #ffffff; --fg: #000000; --dim: #555555; --rule: #999999; }
  .invert, .sh { display: none !important; }
  .r::after { display: none; }
  * { animation: none !important; }
}
