:root {
  color-scheme: light dark;
  --bg: #fff;
  --fg: #1d1d1b;
  --link: #1f4fd1;
  --hover: #0000000f;
}

/* Kanagawa Wave */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1f28;
    --fg: #dcd7ba;
    --link: #7e9cd8;
    --hover: #363646;
  }
}

body {
  max-width: 80ch;
  margin: 0;
  padding: 1rem;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

a {
  color: var(--link);
}

/* Highlighted like the selected link in a terminal browser. */
a:hover,
a:focus-visible {
  outline: none;
  background: var(--hover);
  color: var(--fg);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5ch;
}

nav a {
  color: inherit;
  font-weight: 300;
  text-decoration: none;
}

nav a[aria-current="page"] {
  font-weight: bold;
}

/* The padding widens the highlight, the negative margin keeps the text aligned. */
nav,
dt {
  margin-left: -0.25ch;
}

nav a,
dt a {
  padding: 0 0.25ch;
}

main {
  margin-top: 1.5em;
}

h1 {
  margin: 0 0 1.5em;
  font-size: inherit;
}

code {
  font: inherit;
  white-space: nowrap;
}

dd {
  margin: 0 0 1.5em 4ch;
}
