@font-face {
  font-family: "JetBrains Mono";
  src: url("/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #0a0600;
  --fg: #ffb000;
  --dim: #a86f00;
  --hi: #ffd98a;
  --cy: #4fd6e8;
  --mg: #8fd0ff;
  --yl: #ffd34f;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    15px/1.6 "JetBrains Mono",
    "Cascadia Mono",
    Consolas,
    Menlo,
    "DejaVu Sans Mono",
    "Liberation Mono",
    monospace;
  min-height: 100vh;
  text-shadow: 0 0 5px rgba(255, 176, 0, 0.3);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1; /* behind the text, so the lines tint the background without dimming the type */
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 176, 0, 0.07) 0 1px,
    transparent 1px 3px
  );
}
.term {
  max-width: 84ch;
  margin: 0 auto;
  padding: 18px 16px 60px;
  container-type: inline-size;
}
pre {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
}
.banner {
  color: var(--hi);
  /* banner is 36 columns; a monospace column is ~0.6em wide, so this fills the container */
  font-size: calc(100cqw / 36 / 0.6);
  line-height: 1.15;
  white-space: pre;
  overflow: hidden;
  text-shadow: 0 0 6px var(--dim);
}
.bar {
  display: flex;
  justify-content: space-between;
  gap: 1ch;
  flex-wrap: wrap;
  background: var(--fg);
  color: var(--bg);
  padding: 0 1ch;
  margin: 10px 0;
  font-weight: bold;
}
.bar a {
  color: inherit;
}
.bar button {
  all: unset;
  cursor: pointer;
}
.bar button:focus-visible,
a:focus-visible {
  outline: 2px dashed var(--yl);
  outline-offset: 2px;
}
.d {
  color: var(--dim);
}
.h {
  color: var(--hi);
}
.y {
  color: var(--yl);
}
.m {
  color: var(--fg);
}
a {
  color: var(--cy);
  text-decoration: underline dotted;
}
a:hover {
  background: var(--cy);
  color: var(--bg);
}
.hr {
  color: var(--dim);
  overflow: hidden;
  white-space: nowrap;
  margin: 16px 0;
}
article {
  margin: 0 0 8px;
}
/* script.js moves focus to the first new post so keyboards and screen readers continue there;
   a post is not a control, so it gets no ring. */
article:focus {
  outline: none;
}
.hdr {
  display: grid;
  grid-template-columns: 7ch 1fr;
  color: var(--dim);
}
.hdr span:nth-child(odd) {
  color: var(--yl);
}
.subj {
  color: var(--mg);
  font-weight: bold;
}
.body {
  margin-top: 12px;
}
.body p {
  margin: 0 0 1em;
  max-width: 72ch;
  overflow-wrap: anywhere; /* a long URL wraps instead of running off a phone */
}
.body code {
  padding: 0.1em 0.6ch;
  color: #6dff8a;
  background: #050a06;
  border-radius: 4px;
  text-shadow: 0 0 4px rgba(109, 255, 138, 0.45);
}
.body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--dim);
}
.body {
  display: flow-root; /* a floated image never sticks out below its post */
}
.body .lead,
.body .alignright {
  float: right;
  margin: 0 0 0.5em 15px;
}
.body .alignleft {
  float: left;
  margin: 0 15px 0.5em 0;
}
.body .lead {
  max-width: min(300px, 45%);
}
.body .aligncenter {
  display: block;
  float: none;
  margin: 1em auto;
}
.body .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0 0 1em;
}
.body .gallery a {
  display: block;
}
.body .gallery img {
  display: block;
  width: 150px;
  height: 112px; /* one frame size keeps the rows level; the link opens the whole photo */
  object-fit: cover;
  margin: 0;
}
/* On a phone there is no room to wrap text: every image, floated by a class or
   by an old inline style, sits on its own line in the middle. */
@media (max-width: 560px) {
  .body img {
    display: block;
    float: none !important;
    margin: 1em auto !important;
  }
  .body .gallery img {
    margin: 0 !important;
  }
}
/* Code sits on a little CRT: dark glass with green phosphor text and a silver bezel, whichever theme the page uses. */
.body pre {
  --screen: #050a06;
  --phosphor: #6dff8a;
  margin: 0 0 1em;
  padding: 12px 16px;
  overflow-x: auto;
  white-space: pre;
  tab-size: 4;
  font-size: 0.9em;
  line-height: 1.45;
  color: var(--phosphor);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.28) 0 1px,
      transparent 1px 3px
    ),
    radial-gradient(ellipse at center, #0b1a0e 0%, var(--screen) 85%);
  border: 2px solid silver;
  border-radius: 10px;
  box-shadow:
    inset 0 0 28px rgba(109, 255, 138, 0.16),
    0 0 10px rgba(109, 255, 138, 0.18);
  text-shadow: 0 0 5px rgba(109, 255, 138, 0.55);
}
.body pre code {
  padding: 0;
  color: inherit;
  background: none;
  border-radius: 0;
}
.body pre::after {
  content: "\2588";
  content: "\2588" / "";
  animation: bl 1s steps(1) infinite;
}
.box {
  border: 1px solid var(--dim);
  padding: 6px 1.5ch;
  margin: 0 0 1em;
  color: var(--cy);
}
.prompt-wrap {
  margin: 0;
}
.prompt {
  display: inline-block;
  padding: 0.4em 0;
  color: var(--dim);
  text-decoration: none;
}
.prompt:hover {
  background: var(--dim);
  color: var(--bg);
}
.prompt[aria-busy="true"] {
  opacity: 0.6;
}
/* script.js prints the messages like a modem: hidden until it has blanked them, the footer after. */
.js:not(.print-ready) #posts > article,
.js:not(.print-ready) .after-print,
.js.printing .after-print {
  visibility: hidden;
}
.cursor {
  display: inline-block;
  width: 1ch;
  background: var(--fg);
  animation: bl 1s steps(1) infinite;
}
@keyframes bl {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cursor,
  .body pre::after {
    animation: none;
  }
}
