/* rsth.org: every page is a man page. One stylesheet, no scripts, no web fonts. */
:root {
  --bg: #17130c;
  --amber: #f2b453;
  --dim: #a67c36;
  --bright: #ffe0a3;
  --rule: #3a2f1b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px 16px 48px;
  background: var(--bg);
  color: var(--amber);
  font: 15px/1.6 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  -webkit-text-size-adjust: 100%;
}

.page { max-width: 80ch; margin: 0 auto; }

/* shell prompt above and below the page */
.prompt { color: var(--dim); margin: 0 0 18px; }
.prompt b { color: var(--bright); font-weight: 400; }
.prompt.end { margin: 14px 0 0; }
.cur {
  display: inline-block; width: 1ch; height: 1.1em;
  background: var(--amber); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cur { animation: none; } }

/* man header and footer lines: left, centre, right */
.hdr, .ftr { display: flex; justify-content: space-between; gap: 2ch; color: var(--bright); }
.ftr { margin-top: 24px; padding-top: 12px; border-top: 1px dashed var(--rule); }

/* section headings flush left, bodies indented 7 columns */
h2 { font: inherit; font-weight: 600; color: var(--bright); margin: 20px 0 0; }
.b { margin-left: 7ch; min-width: 0; }
.b > * { margin: 0; }
.b > * + * { margin-top: 1em; }
.b > .crumbs + .pn { margin-top: 0; }
h1.name { font: inherit; }

/* headings inside an article body are man subsections: outdented, bright */
.b h3, .b h4 { font: inherit; font-weight: 600; color: var(--bright); }
.b h3 { margin-left: -4ch; }

.b ul, .b ol { padding-left: 3ch; }
.b li > ul, .b li > ol { margin: 0; }
.b blockquote { margin-left: 0; padding-left: 2ch; border-left: 1px solid var(--dim); color: var(--bright); }
.b blockquote > * { margin: 0; }
.b blockquote > * + * { margin-top: 1em; }
.b pre { overflow-x: auto; color: var(--bright); }
.b code { font: inherit; color: var(--bright); }
.b hr { border: 0; border-top: 1px dashed var(--rule); }

b, strong { color: var(--bright); font-weight: 600; }
i, em { color: var(--bright); }

a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
a:hover, a:focus-visible { background: var(--amber); color: var(--bg); text-decoration: none; outline: none; }
.sec { color: var(--dim); }
.b p[id^="fn-"] + p[id^="fn-"] { margin-top: 0; }

/* FILES listing */
.ls { overflow-x: auto; }
.ls table { border-collapse: collapse; white-space: nowrap; }
.ls td { padding: 0 2ch 0 0; font-variant-numeric: tabular-nums; }
.ls .m { color: var(--dim); }

@media (max-width: 560px) {
  body { font-size: 14px; }
  .b { margin-left: 2ch; }
  .b h3 { margin-left: -2ch; }
  .hdr span:nth-child(2), .ftr span:nth-child(2) { display: none; }
}
