:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #eceef1;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --line: #d5d9de;
  --line-strong: #c4c9d0;
  --text: #1f2328;
  --muted: #666e79;
  --accent: #1f2328;
  --accent-text: #ffffff;
  --ok: #1c7a53;
  --ok-soft: #eef6f1;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --radius: 9px;
  --radius-sm: 7px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1b1d21;
    --surface: #22252a;
    --surface-2: #272b31;
    --line: #343a42;
    --line-strong: #454c55;
    --text: #eef1f4;
    --muted: #9aa3ae;
    --accent: #eef1f4;
    --accent-text: #1b1d21;
    --ok: #6cc79e;
    --ok-soft: #1d322a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.shell {
  width: min(1120px, calc(100% - 56px));
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip:focus {
  transform: translateY(0);
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text);
  color: var(--surface);
  flex: none;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.button:hover {
  opacity: 0.9;
  text-decoration: none;
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--text);
  opacity: 1;
}

.text-link {
  font-size: 13px;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
  padding: 44px 0 72px;
}

.side {
  position: sticky;
  top: 24px;
}

.side-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
}

.side nav {
  display: grid;
  gap: 2px;
}

.side nav a {
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

.side nav a:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.content {
  min-width: 0;
}

.page-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 66ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.section {
  padding: 34px 0 4px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
}

.section:last-child {
  border-bottom: 0;
}

h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

h2 span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
}

h3 {
  margin: 0 0 5px;
  font-size: 13.5px;
  font-weight: 650;
}

p {
  max-width: 72ch;
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
  font-size: 12.5px;
}

.checklist {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 20px;
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.steps {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  padding-left: 20px;
}

.steps li {
  padding-left: 3px;
}

.copy {
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.copy:hover {
  border-color: var(--text);
  color: var(--text);
}

.code-block {
  overflow: hidden;
  margin: 14px 0 14px;
  border: 1px solid #343a42;
  border-radius: var(--radius);
  background: #1f2328;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  border-bottom: 1px solid #343a42;
  color: #9aa3ae;
  font-family: var(--mono);
  font-size: 11px;
}

.code-head .copy {
  border-color: #454c55;
  background: #272b31;
  color: #c4c9d0;
}

.code-head .copy:hover {
  border-color: #9aa3ae;
  color: #eef1f4;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  color: #eef1f4;
  font: 12px/1.7 var(--mono);
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.notice {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
}

.trouble-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.trouble-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.trouble-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  color: var(--muted);
  font-size: 12.5px;
}

.footer-inner span:last-child {
  display: flex;
  gap: 16px;
}

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

@media (max-width: 880px) {
  .layout {
    display: block;
    padding-top: 30px;
  }

  .side {
    position: static;
    margin-bottom: 24px;
  }

  .side nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: calc(100% - 32px);
  }

  .top-actions .text-link {
    display: none;
  }

  .trouble-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .footer-inner span:last-child {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
