:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --link: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --text: #ededed;
    --muted: #a3a3a3;
    --line: #2e2e2e;
    --link: #8ab4ff;
  }
}

* {
  box-sizing: border-box;
}

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

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

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

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  border-bottom: 1px solid var(--line);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.brand {
  color: var(--text);
  font-weight: 650;
  font-size: 1.125rem;
  text-decoration: none;
}

main {
  padding: 2.5rem 0 3rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
  scroll-margin-top: 1rem;
}

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

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.25rem;
}

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

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

.toc {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
}

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

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
