:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --text: #1c2430;
  --text-soft: #566273;
  --line: #dde3ea;
  --accent: #1f6feb;
  --note-bg: #eef5ff;
  --note-line: #1f6feb;
  --caution-bg: #fff6e5;
  --caution-line: #c98500;
  --sidebar-width: 280px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --bg-soft: #1b212a;
    --text: #e6ebf1;
    --text-soft: #a3afbd;
    --line: #2d3641;
    --accent: #6ea8ff;
    --note-bg: #17263c;
    --note-line: #6ea8ff;
    --caution-bg: #33290f;
    --caution-line: #e0a93b;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

.docs-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.docs-brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.docs-menu-button {
  display: none;
  padding: 6px 12px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  max-width: 1240px;
  margin: 0 auto;
}

.docs-nav {
  position: sticky;
  top: 53px;
  align-self: start;
  height: calc(100vh - 53px);
  overflow-y: auto;
  padding: 20px 16px 40px 24px;
  border-right: 1px solid var(--line);
  font-size: 15px;
}

.docs-nav input {
  width: 100%;
  margin-bottom: 16px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.docs-nav h2 {
  margin: 18px 0 4px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.docs-nav ul { margin: 0; padding: 0; list-style: none; }

.docs-nav a {
  display: block;
  padding: 3px 8px;
  color: var(--text);
  border-radius: 5px;
  text-decoration: none;
}

.docs-nav a:hover { background: var(--bg-soft); }

.docs-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--bg-soft);
  font-weight: 600;
}

main {
  min-width: 0;
  max-width: 800px;
  padding: 32px 40px 80px;
}

h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.2; }
h2 { margin: 36px 0 10px; font-size: 24px; line-height: 1.3; }
h3 { margin: 28px 0 8px; font-size: 19px; }

.lede { color: var(--text-soft); font-size: 19px; }

code {
  padding: 1px 5px;
  background: var(--bg-soft);
  border-radius: 4px;
  font-size: 0.9em;
}

.table-scroll { overflow-x: auto; }

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

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

th { background: var(--bg-soft); }

.note, .caution {
  margin: 20px 0;
  padding: 12px 16px;
  border-left: 4px solid;
  border-radius: 4px;
}

.note { background: var(--note-bg); border-color: var(--note-line); }
.caution { background: var(--caution-bg); border-color: var(--caution-line); }

.platform {
  margin: 14px 0;
  padding: 10px 16px;
  background: var(--bg-soft);
  border-radius: 6px;
}

.platform > strong:first-child { display: block; margin-bottom: 2px; }

.next-steps {
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .docs-menu-button { display: block; }
  .docs-layout { display: block; }
  .docs-nav {
    display: none;
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .docs-nav.open { display: block; }
  main { padding: 24px 16px 60px; }
  h1 { font-size: 28px; }
}
