@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;
}
/* The banner and bar stay put and the messages scroll under them. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  margin-top: -18px; /* the padding above the page moves inside, so nothing shows above it */
  padding-top: 18px;
}
.black-ops-banner {
  font-family: "Black Ops One", sans-serif;
  font-weight: 400;
  font-style: normal;
}
.banner {
  color: var(--fg);
  /* "BMG50" measures 3.79em wide in Black Ops One, so this fills the container */
  font-size: calc(100cqw / 3.8);
  line-height: 0.75;
  margin-bottom: -0.08em; /* pull the bar up past the empty descender space */
  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 .thumbnail {
  max-width: 250px;
  max-height: 250px;
}
.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-wrap input {
  border: 0;
  outline: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--fg);
  font: inherit;
  caret-color: transparent; /* the block cursor is a span that script.js keeps over the caret */
  width: 40ch;
  max-width: calc(100vw - 24ch);
}
#cmd {
  width: 7ch;
}
.prompt-wrap {
  position: relative;
}
.js .prompt-wrap input + .cursor {
  position: absolute;
}
.prompt-wrap input:not(:focus) + .cursor {
  visibility: hidden;
}
html:not(.js) #cmd {
  display: none;
}
.pager {
  display: none;
}
/* On a phone there is no keyboard to type commands on: a pager across the bottom instead. */
@media (max-width: 560px) {
  #prompt {
    display: none;
  }
  .term {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1fr;
    align-items: center;
    position: fixed;
    inset: auto 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg);
    border-top: 1px solid var(--dim);
    text-align: center;
  }
  .pager > * {
    padding: 14px 8px;
    color: var(--fg);
    text-decoration: none;
  }
  .pager a:active {
    background: var(--fg);
    color: var(--bg);
  }
  .pager span {
    color: var(--dim);
  }
}
.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;
  }
}

#lightbox {
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

#lightbox::backdrop {
  background: rgba(10, 6, 0, 0.92);
}

#lightbox img {
  display: block;
  max-width: 96vw;
  max-height: 96vh;
  margin: auto;
  border: 1px solid var(--dim);
}
