:root {
  --bg: #ffffff;
  --text: #24292f;
  --muted: #57606a;
  --line: #d0d7de;
  --line-soft: #eaeef2;
  --link: #0969da;
  --surface: #f6f8fa;
  --code-bg: #f6f8fa;
  --code-text: #24292f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

code {
  padding: 0.12rem 0.34rem;
  background: var(--code-bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--code-text);
}

pre {
  margin: 1rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--code-text);
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.site-shell {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 3rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 600;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.95rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.page-header,
.section {
  margin-top: 0;
  padding: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
}

.note,
.card,
.feature {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.page-header h1 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.2;
}

.page-header p,
.section p,
.section li,
.card p,
.feature p,
.note p {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section h2 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-list,
.feature-grid,
.card-grid,
.doc-grid,
.link-list,
.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-list li,
.link-list li,
.toc-list li {
  color: var(--muted);
}

.doc-grid,
.feature-grid,
.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.feature {
  margin-top: 0;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.25rem;
}

.layout > :first-child {
  grid-column: 2;
}

.layout > .sidebar {
  grid-column: 1;
  grid-row: 1;
}

.sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  margin-top: 1.5rem;
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}

.section h3 {
  margin: 1.2rem 0 0;
  font-size: 1rem;
}

.section h3:first-of-type {
  margin-top: 0.8rem;
}

.section ul,
.section ol {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.section:first-of-type,
.page-header + .section {
  border-top: 0;
  padding-top: 0.25rem;
}

.section table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
}

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

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

.muted {
  color: var(--muted);
}

.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout > :first-child,
  .layout > .sidebar {
    grid-column: auto;
    grid-row: auto;
  }

  .sidebar {
    position: static;
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 1rem, 1220px);
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .page-header,
  .section,
  .note,
  .card,
  .feature {
    padding: 1rem;
  }
}
