:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #212529;
  --muted: #6b7280;
  --line: #e4e7eb;
  --line-strong: #d5d9df;
  --brand: #2f6696;
  --brand-soft: #eef5fb;
  --code-bg: #111827;
  --code-text: #e5edf6;
  --get: #147d64;
  --post: #2f6696;
  --patch: #9a6700;
  --delete: #b42318;
  --shadow: 0 8px 30px rgba(31, 41, 55, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.header-bar {
  background-color: #e9ecef;
  color: #343a40;
  padding: 10px 20px;
  min-height: 66px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.10);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand-link { display: inline-flex; }

.header-center > .brand-link > img {
  height: 45px;
  margin-right: 10px;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: #343a40;
  display: flex;
  align-items: center;
}

.header-title > img {
  height: 20px;
  margin-left: 8px;
}

.header-divider {
  display: inline-block;
  width: 1px;
  height: 25px;
  background: #c7ccd1;
  margin: 0 12px;
}

.header-docs-label {
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #5c6670;
}

.docs-shell {
  width: min(1560px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 0;
}

.docs-sidebar {
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  min-height: calc(100vh - 66px);
}

.sidebar-sticky {
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow-y: auto;
  padding: 28px 20px 40px;
}

.sidebar-heading {
  font-weight: 700;
  font-size: 1.05rem;
}

.sidebar-meta {
  color: var(--muted);
  font-size: .82rem;
  margin-top: 2px;
}

.search-wrap { margin: 18px 0; }

.docs-search {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  padding: 10px 12px;
  outline: none;
  font-size: .9rem;
}

.docs-search:focus {
  border-color: #8bb2d3;
  box-shadow: 0 0 0 3px rgba(47,102,150,.10);
}

.nav-section-link,
.nav-group-items a {
  color: #3f4750;
  text-decoration: none;
}

.nav-section-link {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  padding: 8px 8px;
  border-radius: 7px;
}

.nav-section-link:hover,
.nav-group-items a:hover {
  background: #eef1f4;
  color: #222;
  text-decoration: none;
}

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

.nav-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 7px;
  font-size: .88rem;
  font-weight: 700;
  color: #555f68;
}

.nav-group > summary::-webkit-details-marker { display: none; }

.nav-group-items {
  margin: 2px 0 8px 5px;
  padding-left: 8px;
  border-left: 1px solid #e0e3e7;
}

.nav-group-items a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: .82rem;
  line-height: 1.25;
}

.nav-method {
  min-width: 38px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.nav-method-get { color: var(--get); }
.nav-method-post { color: var(--post); }
.nav-method-patch { color: var(--patch); }
.nav-method-delete { color: var(--delete); }

.docs-content {
  min-width: 0;
  padding: 54px clamp(26px, 5vw, 78px) 80px;
}

.hero-section {
  max-width: 1050px;
  margin-bottom: 56px;
}

.hero-kicker,
.section-eyebrow {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: .72rem;
  font-weight: 800;
}

.hero-section h1 {
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  letter-spacing: -.035em;
  margin: 8px 0 16px;
}

.hero-copy {
  color: #56606a;
  font-size: 1.08rem;
  line-height: 1.72;
  max-width: 900px;
}

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

.quick-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

.quick-label {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}

.quick-card code {
  color: #28323c;
  font-size: .9rem;
  word-break: break-all;
}

.callout {
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0;
  border: 1px solid;
}

.callout p {
  margin: 5px 0 0;
  line-height: 1.6;
}

.callout-title {
  font-weight: 700;
}

.callout-info {
  background: #f1f7fc;
  border-color: #cfe2f3;
}

.callout-warning {
  background: #fff9e9;
  border-color: #eedaa1;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.toolbar-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .84rem;
  color: #4a535c;
  cursor: pointer;
}

.toolbar-btn:hover { background: #f2f4f6; }

.toolbar-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.toolbar-link:hover {
  color: #4a535c;
  text-decoration: none;
}

.identity-section {
  max-width: 1120px;
  margin-bottom: 65px;
}

.identity-section h2,
.group-heading h2 {
  margin: 6px 0 18px;
  font-size: 1.8rem;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.identity-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.identity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 26px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 800;
}

.identity-card h3 {
  margin: 14px 0 10px;
  font-size: 1.05rem;
}

.identity-card p {
  color: #59636d;
  line-height: 1.65;
  margin: 9px 0;
}

.endpoint-group {
  max-width: 1180px;
  margin-bottom: 58px;
  scroll-margin-top: 88px;
}

.group-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.group-count {
  margin-bottom: 18px;
  display: inline-flex;
  min-width: 28px;
  height: 25px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e9edf1;
  color: #606a73;
  font-size: .75rem;
  font-weight: 700;
}

.endpoint-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  scroll-margin-top: 82px;
}

.endpoint-card[open] {
  box-shadow: var(--shadow);
  border-color: #d7dce1;
}

.endpoint-summary {
  list-style: none;
  cursor: pointer;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 17px;
}

.endpoint-summary::-webkit-details-marker { display: none; }

.endpoint-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.method-stack {
  display: flex;
  gap: 5px;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 48px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
}

.method-get { background: var(--get); }
.method-post { background: var(--post); }
.method-patch { background: var(--patch); }
.method-delete { background: var(--delete); }

.endpoint-path {
  color: #202932;
  font-size: .88rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.endpoint-title {
  color: #6c757d;
  font-size: .88rem;
}

.endpoint-summary-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scope-badge {
  padding: 4px 8px;
  border: 1px solid #dce2e7;
  border-radius: 6px;
  background: #f7f9fa;
  color: #66717b;
  font-size: .72rem;
  white-space: nowrap;
}

.chevron {
  color: #7b858e;
  font-size: 1.1rem;
  transform: rotate(0deg);
  transition: transform .18s ease;
}

.endpoint-card[open] .chevron { transform: rotate(180deg); }

.endpoint-body {
  border-top: 1px solid var(--line);
  padding: 20px;
}

.endpoint-description {
  margin: 0 0 16px;
  color: #515b65;
  line-height: 1.6;
}

.notes-list {
  margin: 0 0 18px;
  display: grid;
  gap: 7px;
}

.note-row {
  display: flex;
  gap: 9px;
  color: #5e6872;
  font-size: .86rem;
  line-height: 1.5;
}

.note-dot {
  width: 6px;
  height: 6px;
  margin-top: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8fa5b8;
}

.endpoint-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.endpoint-doc,
.endpoint-examples {
  min-width: 0;
}

.endpoint-doc h4 {
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 10px;
  color: #626d77;
}

.response-heading { margin-top: 20px !important; }

.mini-label {
  color: #7b858f;
  font-size: .72rem;
  font-weight: 700;
  margin: 11px 0 6px;
}

.param-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfd;
}

.param-row {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr);
  gap: 12px;
  padding: 8px 10px;
  font-size: .8rem;
  border-bottom: 1px solid var(--line);
}

.param-row:last-child { border-bottom: 0; }

.param-row code {
  color: #374151;
  font-weight: 700;
}

.param-row span {
  color: #6d7680;
  overflow-wrap: anywhere;
}

.code-block {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #f4f6f8;
  border: 1px solid #e4e7eb;
  overflow: auto;
  font-size: .78rem;
  line-height: 1.55;
  white-space: pre;
  max-height: 420px;
}

.code-block code {
  color: #33404c;
}

.code-block-dark {
  background: var(--code-bg);
  border-color: var(--code-bg);
  min-height: 180px;
  max-height: 480px;
}

.code-block-dark code {
  color: var(--code-text);
}

.endpoint-examples {
  border: 1px solid #253143;
  background: var(--code-bg);
  border-radius: 10px;
  overflow: hidden;
}

.example-header {
  height: 44px;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #273448;
}

.example-tabs {
  display: flex;
  gap: 4px;
}

.example-tab,
.copy-btn {
  border: 0;
  cursor: pointer;
  font-size: .76rem;
}

.example-tab {
  background: transparent;
  color: #8592a6;
  padding: 7px 9px;
  border-radius: 6px;
}

.example-tab.active {
  color: #fff;
  background: #263448;
}

.copy-btn {
  background: #273448;
  color: #c6d1df;
  border-radius: 6px;
  padding: 6px 10px;
}

.copy-btn:hover { color: #fff; }

.example-panel { display: none; }
.example-panel.active { display: block; }

.endpoint-examples .code-block {
  border: 0;
  border-radius: 0;
}

.docs-footer {
  max-width: 1180px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #76808a;
  font-size: .82rem;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.is-filtered-out { display: none !important; }

@media (max-width: 1050px) {
  .docs-shell { grid-template-columns: 235px minmax(0,1fr); }
  .endpoint-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .header-docs-label,
  .header-divider { display: none; }

  .docs-shell { display: block; }

  .docs-sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-sticky {
    position: static;
    height: auto;
    padding: 16px;
  }

  .nav-group { display: none; }

  .docs-content { padding: 30px 18px 60px; }

  .identity-grid,
  .quick-grid { grid-template-columns: 1fr; }

  .endpoint-summary {
    align-items: flex-start;
  }

  .scope-badge { display: none; }
}

@media (max-width: 560px) {
  .header-bar { padding: 8px 12px; }
  .header-center > .brand-link > img { height: 38px; }
  .header-title { font-size: 1.25rem; }

  .endpoint-summary { padding: 13px; }
  .endpoint-body { padding: 14px; }

  .endpoint-main {
    align-items: flex-start;
    gap: 8px;
  }

  .endpoint-title {
    width: 100%;
    padding-left: 0;
  }

  .param-row { grid-template-columns: 1fr; gap: 3px; }

  .docs-footer {
    flex-direction: column;
    gap: 4px;
  }
}


.broker-section {
  max-width: 1180px;
  margin-bottom: 65px;
  scroll-margin-top: 88px;
}

.broker-section h2 {
  margin: 6px 0 12px;
  font-size: 1.8rem;
}

.section-copy {
  color: #59636d;
  line-height: 1.65;
  max-width: 900px;
  margin-bottom: 18px;
}

.broker-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.broker-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .84rem;
}

.broker-table th,
.broker-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.broker-table th {
  background: #f4f6f8;
  color: #59636d;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.broker-table tbody tr:last-child td {
  border-bottom: 0;
}

.broker-table code {
  color: #263746;
  font-weight: 700;
}

.broker-table .capability {
  text-align: center;
  font-weight: 700;
  color: #52606d;
}
