:root {
  color-scheme: light dark;
  --bg: #fbfbf9;
  --text: #1d1f21;
  --muted: #565b61;
  --link: #0b57b0;
  --link-visited: #6b3fa0;
  --rule: #d9dcdf;
  --panel: #f0f2f3;
  --focus: #0b57b0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --text: #e6e8ea;
    --muted: #a5abb2;
    --link: #8ab8ff;
    --link-visited: #c4a6ef;
    --rule: #33373c;
    --panel: #1e2125;
    --focus: #8ab8ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 2px solid var(--focus);
  z-index: 1;
}

header,
main,
footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.site-name {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

nav ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

main {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 0.5rem 0 0.75rem;
}

h2 {
  font-size: 1.3125rem;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.25rem 0 0.25rem;
}

p,
ul {
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

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

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.lead {
  font-size: 1.1875rem;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.9375rem;
}

.note {
  background: var(--panel);
  border-left: 4px solid var(--link);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
}

.note p:last-child {
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
