:root {
  --bg-color: #f4f4f8;
  --text-color: #2c2a3e;
  --accent-color: #5a4b9b;
  --border-color: #dcdbe6;
  --max-width: 65ch; /* 'ch' unit is based on character width, ideal for readability */
  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
  --font-mono:
    Menlo, Consolas, "Roboto Mono", "DejaVu Sans Mono", "Liberation Mono",
    "Courier New", monospace;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0;
  padding: 1.5rem;
}

header,
main,
footer {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

h1,
h3,
h4 {
  line-height: 1.25;
  margin: 2rem 0 1rem 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.25rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.2rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-color);
}

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

pre {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1em;
  font-family: var(--font-mono);
  font-size: 0.9em;
  overflow-x: auto;
  white-space: pre;
}
dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

dt {
  font-weight: 600;
  grid-column: 1;
}

dd {
  margin-left: 0;
  grid-column: 2;
}
