:root {
  color-scheme: dark light;

  --bg: #0d0f12;
  --surface: #16181c;
  --border: #24272c;
  --text: #e7e9ec;
  --text-muted: #8b9199;
  --accent: #b0a9fa;
  --accent-strong: #7c6bf2;
  --attention: #e0a33c;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;

  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfc;
    --surface: #f1f2f4;
    --border: #d9dce1;
    --text: #16181c;
    --text-muted: #5e646c;
    --accent: #5546d6;
    --accent-strong: #5546d6;
    --attention: #9a6708;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

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

.site-header,
.site-footer,
main {
  width: min(100% - 2 * var(--gutter), 880px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 26px;
  height: 26px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 0.95rem;
}

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

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

main {
  padding-block: 56px 72px;
}

main > * {
  max-width: var(--measure);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h2 {
  margin: 56px 0 12px;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

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

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

ul,
ol {
  padding-left: 1.3em;
}

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

.lede {
  color: var(--text-muted);
  font-size: 1.15rem;
}

.meta {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.summary {
  margin: 32px 0 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-strong);
  border-radius: 8px;
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: none;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.cards li {
  margin: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cards h3 {
  margin-top: 0;
}

.cards p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

table {
  width: 100%;
  max-width: none;
  margin: 8px 0 24px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table-scroll {
  max-width: none;
  overflow-x: auto;
}

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

th {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

code {
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px 48px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

@media print {
  .site-nav {
    display: none;
  }

  body {
    font-size: 11pt;
  }
}
