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

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
}

body {
  padding: var(--step-2) var(--page-gutter);
  background: var(--page-background);
  color: var(--page-color);
  font-family: "Iosevka", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--text-body);
  /* Absolute, not a ratio: every line sits on the --step grid regardless of
     the size of the text sitting on it. */
  line-height: var(--step);
  font-variant-ligatures: none;
  /* Avoids the short last line that monospace prose falls into on narrow
     screens. */
  text-wrap: pretty;
}

img,
canvas,
svg,
pre {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

h1,
h2,
p {
  font-size: inherit;
  font-weight: inherit;
  overflow-wrap: break-word;
}

ul {
  list-style: none;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Borrowed from the terminal: hovering fills the cell instead of tinting the
   glyph. */
a:hover,
a:focus-visible {
  background: var(--accent-color);
  color: var(--inverted-color);
  text-decoration: none;
  outline: none;
}

::selection {
  background: var(--accent-color);
  color: var(--inverted-color);
}

:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--page-background);
}

::-webkit-scrollbar-thumb {
  background: var(--page-rule);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

.muted {
  color: var(--muted-color);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
