/* Random Signals: man-page layout, amber-phosphor palette (docs/spec.md §4). */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Italic-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f0b06;
  --fg: #ffb000;
  --hi: #ffd27a;
  --muted: #a57414;
  --rule: #3a2a0c;
  --code-bg: #1a1308;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 "IBM Plex Mono", ui-monospace, monospace;
}

.wrap {
  max-width: 76ch;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Header and footer lines */
.manline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1ch;
  color: var(--muted);
  font-size: 14px;
}
.manline a { color: var(--muted); }
.manline a[aria-current="page"] { color: var(--fg); }
.manline a:hover, .manline a:focus-visible { color: var(--bg); }
footer.manline {
  margin-top: 48px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

/* Page titles and man-page sections share one heading style */
h1, h2 {
  margin: 32px 0 8px;
  color: var(--hi);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.indent { padding-left: 7ch; }
.indent > p:first-child { margin-top: 0; }
.muted { color: var(--muted); }

/* Date lists: date and title side by side, stacked on narrow screens */
.datelist { list-style: none; margin: 0; padding: 0; }
.datelist li { display: flex; gap: 2ch; }
.datelist time { color: var(--muted); white-space: nowrap; }

img { max-width: 100%; height: auto; }

/* Tags on Posts and Notes, and the /tags/ list */
.tags a { color: var(--muted); }
.taglist { list-style: none; margin: 0; padding: 0; }

/* Links: hover and keyboard focus invert the colours */
a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
a:hover, a:focus-visible {
  color: var(--bg);
  background: var(--fg);
  text-decoration: none;
}
a:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }

/* Dangling link: a Wiki-link to a missing page or a Draft (docs/spec.md §2, §4) */
.dangling {
  color: var(--muted);
  border-bottom: 1px dashed var(--muted);
  cursor: help;
}

pre {
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--code-bg);
  border-left: 2px solid var(--muted);
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 4px 8px;
  z-index: 1;
}
.skip-link:focus { top: 8px; }

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

@media (max-width: 600px) {
  .indent { padding-left: 2ch; }
  .datelist li { flex-direction: column; gap: 0; margin-bottom: 8px; }
}
