:root {
  --sidebar-bg: #18181b;
  --sidebar-border: #27272a;
  --sidebar-text: #71717a;
  --sidebar-text-hover: #e4e4e7;
  --sidebar-text-active: #ffffff;
  --sidebar-active-bg: rgba(127,147,0,.1);
  --sidebar-active-border: #7F9300;
  --sidebar-group: #52525b;
  --sidebar-width: 248px;

  --bg: #ffffff;
  --border: #e4e4e7;
  --surface: #f4f4f5;
  --text: #09090b;
  --muted: #71717a;
  --accent: #7F9300;
  --accent-hover: #6a7c00;
  --accent-bg: #f7f9e8;
  --accent-border: #d4e05a;
  --code-bg: #18181b;
  --code-text: #e4e4e7;
  --inline-code-bg: #f4f4f5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3f3f46 transparent;
}

.sidebar-inner { padding: 0 0 32px; }

.sidebar-logo {
  display: block;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 12px;
  text-decoration: none;
}

.sidebar-logo .logo-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sidebar-group);
  display: block;
  margin-bottom: 4px;
}

.sidebar-logo .logo-title {
  font-size: 14px;
  font-weight: 700;
  color: #fafafa;
  line-height: 1.3;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sidebar-group);
  padding: 20px 20px 6px;
}

.nav-item {
  display: block;
  padding: 6px 20px;
  font-size: 13.5px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .12s, background .12s;
}

.nav-item:hover { color: var(--sidebar-text-hover); }

.nav-item.active {
  color: var(--sidebar-text-active);
  font-weight: 600;
  border-left-color: var(--sidebar-active-border);
  background: var(--sidebar-active-bg);
}

/* ── Main ── */
.main { flex: 1; min-width: 0; }

.wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 40px 120px;
}

/* ── Mobile ── */
.menu-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-width));
    top: 0;
    z-index: 100;
    height: 100vh;
    transition: left .2s ease;
  }
  .sidebar.open { left: 0; }
  .overlay.open { display: block; }
  .wrapper { padding: 32px 20px 80px; }
}

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  margin-bottom: 48px;
}

.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -.02em;
  line-height: 1.2;
}

header p { color: var(--muted); font-size: 15px; }

/* ── Platform cards ── */
.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.platform-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}

.platform-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(127,147,0,.12);
}

.platform-card .name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.platform-card .desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Sections ── */
section { margin-bottom: 48px; }

h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2 .step-num {
  background: var(--accent);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}

p { color: var(--text); margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }

/* ── Code ── */
pre {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  margin: 12px 0;
}

pre code {
  font-family: 'Menlo', 'Consolas', 'Fira Code', monospace;
  color: var(--code-text);
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

code {
  font-family: 'Menlo', 'Consolas', 'Fira Code', monospace;
  color: var(--accent-hover);
}

p code, li code, td code {
  background: var(--inline-code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12.5px;
  color: var(--accent-hover);
}

/* ── Callouts ── */
.callout {
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  margin: 16px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.6;
}

.callout.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.callout.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout.ok   { background: var(--accent-bg); border: 1px solid var(--accent-border); color: #4a5700; }

.callout .icon { flex-shrink: 0; line-height: 1.6; }
.callout a { color: inherit; font-weight: 600; }

/* ── Lists ── */
ul, ol { padding-left: 20px; margin: 8px 0 12px; }
li { margin-bottom: 6px; color: var(--text); }

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0;
}

th {
  text-align: left;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
  font-size: 14px;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .04em;
  vertical-align: middle;
}

.badge-green { background: var(--accent-bg); color: var(--accent-hover); border: 1px solid var(--accent-border); }
.badge-gray  { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.badge-blue  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── API endpoint block ── */
.endpoint {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-family: 'Menlo', 'Consolas', monospace;
}

.method {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: .06em;
  flex-shrink: 0;
}

.method-get { background: #14532d; color: #86efac; }

.endpoint-path { font-size: 14px; color: var(--code-text); }

/* ── Misc ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

.contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  font-size: 14px;
  color: var(--muted);
}

.contact strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 15px; }
