:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-2: #151515;
  --border: #262626;
  --border-strong: #383838;
  --text: #e7e7e7;
  --muted: #9a9a9a;
  --dim: #646464;
  --accent: #f97316;
  --accent-2: #fb923c;
  --green: #22c55e;
  --blue: #38bdf8;
  --font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 284px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.96);
  padding: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(249, 115, 22, 0.5);
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.brand strong {
  display: block;
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
}

.search {
  display: block;
  margin-top: 26px;
}

.search span {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  padding: 11px 12px;
}

.search input:focus {
  border-color: rgba(249, 115, 22, 0.65);
}

.nav {
  margin-top: 22px;
}

.nav-group {
  margin-top: 20px;
}

.nav-heading {
  margin: 0 0 8px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-link {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: var(--panel);
  color: var(--text);
}

.nav-link.active {
  font-weight: 700;
}

.content-shell {
  min-height: 100vh;
  padding-left: 284px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  padding: 0 28px;
  backdrop-filter: blur(10px);
}

.topbar-brand {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.topbar-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.topbar-link:hover {
  color: var(--text);
}

.icon-button {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  gap: 4px;
  flex-direction: column;
}

.icon-button span {
  width: 16px;
  height: 1px;
  background: var(--text);
}

.content {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 72px 64px 96px;
}

.content:focus {
  outline: none;
}

.hero {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: 56px;
  line-height: 1.08;
}

.lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 34px;
  margin-top: 48px;
}

.article h2 {
  margin: 46px 0 14px;
  padding-top: 10px;
  color: var(--text);
  font-size: 24px;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  margin: 30px 0 10px;
  color: var(--text);
  font-size: 16px;
}

.article p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.article ul,
.article ol {
  margin: 0 0 22px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
}

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

.article strong {
  color: var(--text);
}

.note {
  margin: 24px 0;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  padding: 16px;
  color: var(--muted);
  line-height: 1.65;
}

.warning {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.08);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 32px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 0;
  font-size: 14px;
}

pre {
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #050505;
  padding: 18px;
  white-space: pre-wrap;
}

code {
  color: var(--accent-2);
}

pre code {
  color: #d8d8d8;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  border: 1px solid var(--border);
  font-size: 13px;
}

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

th {
  color: var(--text);
  background: var(--panel);
}

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

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  border-left: 1px solid var(--border);
  padding-left: 18px;
}

.toc-title {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.toc a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

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

.empty {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  color: var(--muted);
}

.scrim {
  display: none;
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 160ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .content-shell {
    padding-left: 0;
  }

  .icon-button {
    display: flex;
  }

  .topbar {
    padding: 0 18px;
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(0, 0, 0, 0.45);
  }

  body.nav-open .scrim {
    display: block;
  }

  .doc-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 680px) {
  .content {
    padding: 46px 22px 72px;
  }

  h1 {
    font-size: 38px;
  }

  .lede {
    font-size: 15px;
  }

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

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
