/* The look of JoliPuTTY's online manual: Windows 11's, light or dark as
 * the reader's system is, with the Atari ST colours of the Welcome tab
 * for the accents. */

:root {
  --bg: #f9f9f9;
  --text: #1b1b1b;
  --muted: #5d5d5d;
  --accent: #0000db;
  --link: #0050c8;
  --code-bg: #ececec;
  --rule: #d6d6d6;
  --band: linear-gradient(90deg, #ff0000, #ff9200, #ffff00, #00ff00,
                          #00b6ff);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1f1f;
    --text: #e8e8e8;
    --muted: #a8a8a8;
    --accent: #6d8dff;
    --link: #8ab4ff;
    --code-bg: #2d2d2d;
    --rule: #3a3a3a;
  }
}

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

body {
  margin: 0 auto;
  max-width: 52em;
  padding: 0 16px 3em;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui,
        sans-serif;
}

body::before {
  content: "";
  display: block;
  height: 4px;
  margin: 0 -16px 1.5em;
  background: var(--band);
}

h1, h2, h3, h4 {
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui,
               sans-serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 1.6em 0 0.6em;
}

h1 {
  font-size: 2em;
  color: var(--accent);
}

h2 {
  font-size: 1.5em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-size: 1.2em;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* (the navigation links at the top and bottom of each page) */
body > p:first-of-type,
body > p:last-of-type:not(.feedback) {
  font-size: 0.9em;
}

code, pre, tt {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
}

code, tt {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--code-bg);
}

pre {
  padding: 0.8em 1em;
  overflow-x: auto;
  border-radius: 8px;
  background: var(--code-bg);
}

pre code {
  padding: 0;
  background: none;
}

dt {
  margin-top: 0.8em;
  font-weight: 600;
}

dd {
  margin-left: 1.5em;
}

ul, ol {
  padding-left: 1.5em;
}

li {
  margin: 0.25em 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2em 0 1em;
}

address, .feedback {
  color: var(--muted);
  font-size: 0.85em;
  font-style: normal;
}

/* The Welcome tab's greeting, at the top of the first page: as the tab
 * shows it, on a black terminal, whatever the theme */
.welcome {
  margin: 1em 0 2em;
  padding: 1em 1.2em;
  overflow-x: auto;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.welcome pre.logo {
  margin: 0;
  padding: 0;
  background: none;
  font-weight: bold;
  line-height: 1.2;
}

.welcome p {
  margin: 0.8em 0 0;
}

.welcome .banner {
  padding: 0 0.5em;
  background: #0000db;
  font-weight: bold;
}

.welcome .byline span {
  color: #929292;
}
