:root {
  --bg: #161616;
  --fg: #c4c4c4;
  --fg2: #a4a4a4;
  --fg-bright: #e4e4e4;
  --link: #a4c4c4;
  font-family: "Iosevka", monospace;
  font-size: 16px;
  line-height: 1.45;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  padding: 1.5rem 1rem 3rem;
}

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

a:hover,
a:focus-visible {
  color: var(--fg2);
  text-decoration: underline;
}

.man-nav {
  max-width: 80ch;
  margin: 0 auto 1.5lh;
  color: var(--fg2);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5ch;
  font-size: 0.9em;
}

.man-nav a {
  color: var(--fg2);
}

.man-nav a:hover {
  color: var(--fg);
}

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

.man-header,
.man-footer {
  display: flex;
  justify-content: space-between;
  gap: 2ch;
  color: var(--fg2);
  margin-bottom: 1.5lh;
}

.man-footer {
  margin-top: 2lh;
  margin-bottom: 0;
}

.man-title {
  text-transform: uppercase;
  color: var(--fg-bright);
  font-weight: bold;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 1em;
  margin: 1.25lh 0 0.25lh;
  color: var(--fg-bright);
  font-weight: bold;
}

h2 {
  text-transform: uppercase;
}

h3 {
  margin-left: 3ch;
}

h4,
h5,
h6 {
  margin-left: 5ch;
}

.man-body > p,
.man-body > ul,
.man-body > ol,
.man-body > dl,
.man-body > pre,
.man-body > blockquote,
.man-body > table,
.man-body > .archwiki-template-box,
.man-body > .archwiki-template-meta-related-articles,
.man-body > .footnotes {
  margin-left: 7ch;
}

p,
ul,
ol,
dl,
pre,
blockquote,
table {
  margin-top: 0;
  margin-bottom: 1lh;
}

ul,
ol {
  padding-left: 2ch;
}

dt {
  font-weight: bold;
  color: var(--fg-bright);
}

dd {
  margin-left: 4ch;
  margin-bottom: 0.5lh;
}

strong,
b {
  color: var(--fg-bright);
  font-weight: bold;
}

em,
i {
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 2px;
}

code,
pre {
  font-family: inherit;
}

pre {
  overflow-x: auto;
  color: var(--fg-bright);
}

blockquote {
  border-left: 2px solid var(--fg2);
  padding-left: 1.5ch;
  margin-right: 0;
  color: var(--fg2);
}

table {
  border-collapse: collapse;
  width: calc(100% - 7ch);
}

th,
td {
  text-align: left;
  padding: 0.25lh 1.5ch 0.25lh 0;
  border-bottom: 1px solid #2a2a2a;
  vertical-align: top;
}

th {
  color: var(--fg-bright);
  border-bottom-color: var(--fg2);
}

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

hr {
  border: none;
  border-top: 1px dashed #333;
  margin: 1.5lh 0;
}

.archwiki-template-box {
  border-left: 2px solid var(--fg2);
  padding-left: 1.5ch;
  margin-bottom: 1lh;
}

.archwiki-template-meta-related-articles {
  margin-bottom: 1lh;
  color: var(--fg2);
}

.archwiki-template-meta-related-articles p {
  margin-bottom: 0.25lh;
  font-weight: bold;
  color: var(--fg-bright);
}

@media (max-width: 640px) {
  h3 {
    margin-left: 1.5ch;
  }

  h4,
  h5,
  h6 {
    margin-left: 2ch;
  }

  .man-body > p,
  .man-body > ul,
  .man-body > ol,
  .man-body > dl,
  .man-body > pre,
  .man-body > blockquote,
  .man-body > table,
  .man-body > .archwiki-template-box,
  .man-body > .archwiki-template-meta-related-articles,
  .man-body > .footnotes {
    margin-left: 2ch;
  }

  table {
    width: calc(100% - 2ch);
  }
}

@media (min-width: 800px) {
  :root {
    font-size: 18px;
  }
}
