:root {
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --border: #e5e5ea;
  --surface: #f5f5f7;
  --accent: #0a66d8;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --fg: #f2f2f7;
    --muted: #a1a1a6;
    --border: #2c2c2e;
    --surface: #1c1c1e;
    --accent: #4c9bff;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 15px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg);
}

main {
  padding-top: 40px;
  padding-bottom: 64px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  scroll-margin-top: 16px;
}

h1 {
  font-size: 34px;
  margin: 0 0 8px;
}

h2 {
  font-size: 24px;
  margin: 48px 0 12px;
}

h3 {
  font-size: 19px;
  margin: 32px 0 8px;
}

p,
ul,
ol,
table,
blockquote {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 24px;
}

li + li {
  margin-top: 6px;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

code {
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
}

.updated {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.lead {
  font-size: 19px;
}

.toc {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
}

.toc ol {
  margin: 0;
}

.callout {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 24px;
}

.callout > :last-child {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface);
  font-weight: 600;
}

.links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.links li + li {
  margin-top: 0;
}

.links a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}

.links a:hover {
  border-color: var(--accent);
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 32px;
}

.site-footer a {
  color: var(--muted);
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 21px;
  }

  main {
    padding-top: 28px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }

  a {
    color: inherit;
  }
}
