:root {
  --bg: #08080d; --panel: #111118; --panel-2: #17171f; --line: #23232e; --text: #ececf3; --muted: #9a9ab0;
  --accent: #7c5cff; --accent-2: #a58bff; --code: #0d0d14; --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif; }
a { color: inherit; }
code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; }

/* top bar: brand, section tabs, console link */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 28px;
  background: rgba(8, 8, 13, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; font-size: 19px; white-space: nowrap; width: 252px; flex: none; }
.brand .logo { color: var(--accent); }
.brand b { color: var(--accent-2); }
.tabs { display: flex; gap: 26px; height: 100%; }
.tabs a { display: flex; align-items: center; text-decoration: none; color: var(--muted); font-size: 14.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.console { margin-left: auto; text-decoration: none; font-size: 14px; padding: 7px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.console:hover { border-color: var(--accent); }
.menu-btn { display: none; margin-left: 8px; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 4px 10px; font-size: 16px; cursor: pointer; }

/* left index */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
/* the index scrolls on its own; the links at its foot stay put */
.side { position: sticky; top: 64px; height: calc(100vh - 64px); overflow: hidden;
  border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 16px 12px 28px; }
.group { margin-bottom: 22px; }
.group h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.group a { display: block; text-decoration: none; color: var(--muted); font-size: 14.5px; padding: 6px 0 6px 18px;
  border-left: 1px solid var(--line); }
.group a:hover { color: var(--text); }
.group a.active { color: var(--accent-2); border-left: 2px solid var(--accent); padding-left: 17px; font-weight: 600; }
.side-foot { flex: none; border-top: 1px solid var(--line); padding: 14px 16px 18px 28px; display: grid; gap: 8px;
  background: var(--bg); }
.side-foot a { text-decoration: none; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.side-foot a span { margin-left: auto; }
.side-foot svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.side-foot a:hover { color: var(--text); }

/* content */
.content { padding: 40px 56px 80px; max-width: 1080px; }
section { padding-bottom: 18px; }
.eyebrow { color: var(--accent-2); font-size: 13px; font-weight: 600; margin: 24px 0 4px; }
h1 { font-size: 36px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.3px; }
h2 { font-size: 26px; line-height: 1.25; margin: 40px 0 14px; letter-spacing: -.2px; }
.eyebrow + h1, .eyebrow + h2 { margin-top: 0; }
.lead { color: var(--muted); font-size: 17px; max-width: 760px; }
p, li, dd { color: #c9c9d6; }
p a, li a, dd a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
.magenta { color: #ff4fd8; font-weight: 600; }
.note { border: 1px solid rgba(124, 92, 255, .35); background: rgba(124, 92, 255, .08); border-radius: 10px; padding: 10px 14px; }

/* cards: icon on the left, title and text on the right */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
.card { display: flex; align-items: center; gap: 18px; padding: 22px 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); text-decoration: none; transition: border-color .15s, background .15s; }
.card.wide { grid-column: 1 / -1; }
.card:hover { border-color: rgba(124, 92, 255, .6); background: var(--panel-2); }
.card .ic { flex: none; width: 30px; height: 30px; color: var(--accent-2); }
.card .ic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.card span:last-child { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* code blocks with tabs and copy */
.code { border: 1px solid var(--line); border-radius: var(--radius); background: var(--code); margin: 16px 0; overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 4px; padding: 6px 10px 0; border-bottom: 1px solid var(--line); }
.code-head .tab, .code-head .lang { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font: 13px -apple-system, BlinkMacSystemFont, sans-serif; padding: 6px 8px 8px; cursor: pointer; }
.code-head .lang { cursor: default; }
.code-head .tab.active { color: var(--accent-2); border-bottom-color: var(--accent); }
.code-head .copy { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 7px;
  font: 12px -apple-system, BlinkMacSystemFont, sans-serif; padding: 3px 10px; cursor: pointer; margin-bottom: 6px; }
.code-head .copy:hover { color: var(--text); }
.code pre, pre.code { margin: 0; padding: 18px 20px; overflow-x: auto; }
pre.code.solo { padding: 14px 18px; }
.code pre code, pre.code code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.7; color: #d8d8e4; white-space: pre; }
pre.out code { color: var(--accent-2); }
.k { color: #ff7b9c; } .s { color: #9ecbff; } .c { color: #6b6b80; } .n { color: #79c0ff; }

/* endpoint lines, tables, definitions, steps */
.endpoint { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; }
.endpoint code { font-size: 14px; }
.verb { font: 700 12px ui-monospace, Menlo, monospace; padding: 3px 8px; border-radius: 6px; }
.verb.post { background: rgba(124, 92, 255, .18); color: var(--accent-2); }
.verb.get { background: rgba(46, 204, 113, .14); color: #5fdc94; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; background: var(--panel); }
tr:last-child td { border-bottom: 0; }
.defs { display: grid; grid-template-columns: 190px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.defs dt, .defs dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.defs dt { font-weight: 600; background: var(--panel); }
.defs dt:last-of-type, .defs dd:last-of-type { border-bottom: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 46px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(124, 92, 255, .16); color: var(--accent-2); font-weight: 700; font-size: 14px; }
.foot { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { display: none; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 64px 0 0 0; height: auto; background: var(--bg); z-index: 4; }
  body.menu-open .side { display: flex; }
  .menu-btn { display: block; }
  .brand { width: auto; }
  .content { padding: 28px 20px 60px; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .defs { grid-template-columns: 1fr; }
  .console { display: none; }
}
