/* neckbeard.sh — one typeface, three colors, four motifs. */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --ground: #070807;
  --rule: #1d221d;
  --text: #c9d1c9;
  --quiet: #7a847a;
  --phosphor: #4af626;
  --measure: 720px;
}

* { box-sizing: border-box; }

html { background: var(--ground); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--ground);
}

a { color: var(--phosphor); text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--text); }
a:focus-visible { outline: 1px solid var(--phosphor); outline-offset: 3px; }

main, header, footer {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 16px;
}

/* nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--phosphor); }
.brand img { width: 28px; height: 28px; image-rendering: pixelated; }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--quiet); }
nav a:hover { color: var(--text); }

/* sections */
section { padding: 40px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; padding-top: 16px; }

h1 {
  margin: 0 0 20px;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}
h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
.quiet { color: var(--quiet); }
small, .small { font-size: 13px; }
p code, dd code { overflow-wrap: anywhere; }

/* the prompt */
pre {
  margin: 20px 0 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
  color: var(--text);
}
pre .p { color: var(--quiet); user-select: none; }
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  vertical-align: -0.2em;
  background: var(--phosphor);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* definition rows: /command → what it does */
dl.commands { margin: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 48px; row-gap: 14px; }
dl.commands dt { color: var(--quiet); font-weight: 400; }
dl.commands dd { margin: 0; }
@media (max-width: 560px) {
  dl.commands { grid-template-columns: 1fr; row-gap: 4px; }
  dl.commands dd { margin-bottom: 14px; }
}

/* tables: ruled, no fills */
.table-wrap { overflow-x: auto; margin: 20px 0 0; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--rule);
}
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
th { font-weight: 400; color: var(--quiet); }
thead th { border-top: 0; }
td + td, th + th { border-left: 1px solid var(--rule); }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.total { font-weight: 500; }
.pass { color: var(--phosphor); }
.not { color: var(--quiet); }
.note { margin-top: 12px; font-size: 13px; color: var(--quiet); }

/* footer */
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 40px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--quiet);
}
footer a { color: var(--quiet); }
footer a:hover { color: var(--text); }
