/* Two-column docs shell for /developers/ */
/* Layered on top of /product/style.css which provides nav + footer + base body */

/* product/style.css sets `body { overflow-x: hidden }` which can pin sticky
   elements to the body scroll container in surprising ways. On docs pages
   the html element is the scroll container; clear body overflow so sticky
   sidebars track the viewport. */
html, body { overflow-x: visible; }

.docs-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1240px;
  margin: 0;
  padding-top: 90px;
  gap: 0;
}

.docs-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 24px 12px 40px 24px;
  border-right: 1px solid rgba(255,255,255,0.06);
  font-size: 13.5px;
}
/* product/style.css has a global `nav { position: fixed; top: 0; ... }` rule
   intended for the page-top nav. It cascades onto the inner <nav> we use
   inside the sidebar, ripping it out of the grid. Reset every property the
   global rule touches. */
.docs-sidebar nav {
  position: static;
  top: auto; left: auto; right: auto; z-index: auto;
  padding: 0; margin: 0;
  background: none; backdrop-filter: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1px;
}
.docs-sidebar nav a {
  display: block;
  padding: 5px 12px;
  color: #86868b;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
  font-size: 13.5px;
  font-weight: 500;
}
.docs-sidebar nav a:hover { color: #f5f5f7; background: rgba(255,255,255,0.04); }
/* Top-level page link (Overview, CLI, Automation, HTTP API, Gateway) */
.docs-sidebar nav a.page {
  font-weight: 600;
  color: #f5f5f7;
  margin-top: 14px;
}
.docs-sidebar nav a.page:first-of-type { margin-top: 0; }
.docs-sidebar nav a.page.current {
  background: rgba(41,151,255,0.18);
}
/* h2 anchor under a page */
.docs-sidebar nav a.h2 {
  padding-left: 26px;
  font-size: 13px;
  font-weight: 400;
  color: #86868b;
}
/* h3 anchor (only rendered for the current page) */
.docs-sidebar nav a.h3 {
  padding-left: 40px;
  font-size: 12.5px;
  font-weight: 400;
  color: #6e6e73;
}
/* Section currently scrolled into view (set by scroll-spy) */
.docs-sidebar nav a.in-view {
  color: #f5f5f7;
  background: rgba(41,151,255,0.14);
  border-left: 2px solid #2997ff;
  padding-left: 10px;
}
.docs-sidebar nav a.h2.in-view { padding-left: 24px; }
.docs-sidebar nav a.h3.in-view { padding-left: 38px; }

html { scroll-behavior: smooth; }

.docs-main {
  padding: 28px 40px 100px;
  max-width: 880px;
  font-size: 15px;
  line-height: 1.65;
  color: #c7c7cc;
}

.docs-main h1 {
  font-size: 36px; font-weight: 700; letter-spacing: -0.02em;
  color: #f5f5f7;
  margin-bottom: 8px;
}
.docs-main .lede {
  font-size: 17px; color: #a1a1a6;
  margin: 0 0 36px;
  line-height: 1.55;
}
.docs-main h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  color: #f5f5f7;
  margin-top: 56px; margin-bottom: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  scroll-margin-top: 80px;
}
.docs-main h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.docs-main h3 {
  font-size: 12px; font-weight: 600;
  color: #2997ff;
  margin: 32px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  scroll-margin-top: 80px;
}

.docs-main p { color: #c7c7cc; margin-bottom: 14px; }
.docs-main ul, .docs-main ol {
  color: #c7c7cc; padding-left: 22px; margin: 6px 0 18px;
}
.docs-main li { margin-bottom: 6px; line-height: 1.55; }

.docs-main code {
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 90%;
  color: #d2d2d7;
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
}
.docs-main pre {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 13.5px;
  line-height: 1.55;
  color: #d2d2d7;
  margin: 16px 0 24px;
}
.docs-main pre code,
.docs-main pre code[class*="language-"] {
  background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit;
  text-shadow: none;
}
.docs-main pre[class*="language-"] {
  background: rgba(255,255,255,0.04);
  text-shadow: none;
}
.docs-main pre .c { color: #6e6e73; }
.docs-main pre .k { color: #2997ff; }
.docs-main pre .s { color: #a4d8a4; }
/* Prism token colors: tuned to the docs palette */
.docs-main .token.comment,
.docs-main .token.prolog,
.docs-main .token.doctype,
.docs-main .token.cdata { color: #6e6e73; font-style: italic; }
.docs-main .token.punctuation { color: #8e8e93; }
.docs-main .token.property,
.docs-main .token.tag,
.docs-main .token.boolean,
.docs-main .token.number,
.docs-main .token.constant,
.docs-main .token.symbol,
.docs-main .token.deleted { color: #ff9f5a; }
.docs-main .token.selector,
.docs-main .token.attr-name,
.docs-main .token.string,
.docs-main .token.char,
.docs-main .token.builtin,
.docs-main .token.inserted { color: #a4d8a4; }
.docs-main .token.operator,
.docs-main .token.entity,
.docs-main .token.url,
.docs-main .token.variable { color: #d2d2d7; }
.docs-main .token.atrule,
.docs-main .token.attr-value,
.docs-main .token.function,
.docs-main .token.class-name { color: #ffd479; }
.docs-main .token.keyword { color: #2997ff; }
.docs-main .token.regex,
.docs-main .token.important { color: #ff7a7a; }

/* ── SDK reference intro grid ──────────────────────────────── */
.docs-main .intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 28px;
}
.docs-main .intro-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 14px 16px 12px;
}
.docs-main .intro-card .intro-h {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2997ff;
}
.docs-main .intro-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .docs-main .intro-grid { grid-template-columns: 1fr; }
}

/* ── SDK method cards ─────────────────────────────────────────── */
.docs-main .method {
  position: relative;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 18px 22px 14px;
  margin: 18px 0 22px;
}
/* accent stripe on the left edge of each method card */
.docs-main .method::before {
  content: "";
  position: absolute;
  left: -1px; top: 16px; bottom: 16px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2997ff 0%, rgba(41,151,255,0.2) 100%);
}
.docs-main .method > h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #f5f5f7;
  letter-spacing: -0.005em;
}
.docs-main .method > h4 code {
  background: none;
  padding: 0;
  color: #f5f5f7;
  font-size: 15px;
  font-weight: 600;
}
.docs-main .method > table {
  margin: 0 0 14px;
  font-size: 13px;
}
.docs-main .method > table th {
  font-size: 11px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.015);
}
.docs-main .method > table td {
  padding: 8px 12px;
  line-height: 1.5;
}
.docs-main .method > table td:first-child { font-size: 12.5px; }
.docs-main .method > p {
  font-size: 13.5px;
  margin: 6px 0;
  color: #c7c7cc;
  line-height: 1.55;
}
.docs-main .method > p > strong:first-child {
  color: #f5f5f7;
  font-weight: 600;
  letter-spacing: 0.01em;
}
/* Signature pre: distinct from example pre */
.docs-main pre.signature {
  background: rgba(41,151,255,0.06);
  border-color: rgba(41,151,255,0.18);
  font-size: 14.5px;
  padding: 14px 18px;
  margin: 8px 0 16px;
}

/* One-line method description under each h4 */
.docs-main .method .method-desc {
  margin: -4px 0 14px;
  font-size: 13.5px;
  color: #a1a1a6;
  line-height: 1.55;
}
.docs-main .method .method-desc code {
  font-size: 12.5px;
}

/* Pills: small inline badges */
.docs-main .pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
  letter-spacing: 0;
  line-height: 1.6;
}
.docs-main .pill-manifest {
  margin-left: 8px;
  background: rgba(41,151,255,0.14);
  color: #6db4ff;
  border: 1px solid rgba(41,151,255,0.28);
}
.docs-main .pill-manifest::before {
  content: "requires ";
  color: #6db4ff;
  opacity: 0.7;
}
.docs-main .pill.code4xx { background: rgba(246,173,85,0.16); color: #f6ad55; border: 1px solid rgba(246,173,85,0.32); }
.docs-main .pill.code5xx { background: rgba(255,122,122,0.14); color: #ff9292; border: 1px solid rgba(255,122,122,0.28); }

.docs-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 24px;
  font-size: 14px;
}
.docs-main table th, .docs-main table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.docs-main table th {
  font-weight: 600;
  color: #f5f5f7;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom-color: rgba(255,255,255,0.14);
}
.docs-main table td { color: #a1a1a6; }
.docs-main table td:first-child {
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  color: #f5f5f7;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 500;
}
.docs-main table.routes td.method {
  color: #2997ff;
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  font-weight: 600;
  width: 110px;
  white-space: nowrap;
}
.docs-main table.routes td.method.post { color: #f6ad55; }
.docs-main table.routes td.method.put { color: #b484ff; }
.docs-main table.routes td.method.delete { color: #ff7a7a; }
.docs-main table.routes td.path {
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  color: #f5f5f7;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 500;
}

.docs-main .arch-diagram {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 20px;
  margin: 12px 0 24px;
  overflow-x: auto;
}
.docs-main .arch-diagram pre {
  background: none; border: none; padding: 0; margin: 0;
  font-size: 12px; line-height: 1.5;
  white-space: pre;
}
.docs-main .arch-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Standard logo placed alongside an h3 (passkey, WASM, PWA, etc.). */
.docs-main .section-icon {
  float: right;
  height: 52px;
  width: auto;
  max-width: 160px;
  margin: -6px 0 12px 28px;
  opacity: 0.92;
}
@media (max-width: 700px) {
  .docs-main .section-icon {
    float: none;
    display: block;
    margin: 8px 0 16px;
  }
}

/* Hub page: list of pages */
.docs-index { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.docs-index a {
  display: block;
  padding: 18px 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
}
.docs-index a:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}
.docs-index .name {
  display: block;
  font-size: 16px; font-weight: 600;
  color: #f5f5f7;
  margin-bottom: 4px;
}
.docs-index .desc {
  display: block;
  font-size: 14px; color: #86868b;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; padding-top: 72px; }
  .docs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 14px 16px;
  }
  .docs-main { padding: 24px 18px 60px; max-width: 100%; }
  .docs-main h1 { font-size: 28px; }
  .docs-main h2 { font-size: 19px; margin-top: 36px; }
}
