/* docs.css: the documentation layout of the methodology pages, taken from the Agent Commerce Gateway
   docs (acg-landing app/docs/docs.css) so both sites read the same: sub bar with tabs and search, a
   sidebar of pages, the article, "On this page", pager, search dialog and mobile drawer. Colours are
   mapped to this site's light palette (theme.css tokens); the structure and sizes are unchanged. */

/* Documentation — same dark surface, hairlines and radii as the landing page:
   panels 12px, chips 10px, pills 999px, hairlines rgb(17 16 19 / 0.063). */

html:has(.docs-root) {
  scroll-behavior: smooth;
}

.docs-root {
  --d-bg: transparent;
  --d-panel: #FBFAFC;
  --d-line: var(--line);
  --d-line-strong: var(--line-2);
  --d-text: var(--ink-2);
  --d-strong: var(--ink);
  --d-muted: var(--muted);
  --d-faint: var(--faint);
  --d-header: 0px; /* the site header scrolls away; only the sub bar sticks */
  --d-tabs: 46px;
  --d-mono: var(--mono);
  --tone-blue: #3F6C9E;
  --tone-green: #2F7A4E;
  --tone-amber: #8A6A22;
  --tone-red: #A33843;
  --tone-violet: #6E4F96;
  --d-accent: 63 108 158;
  --site-width: 1280px;
  --site-gutter: 40px;
  min-height: 100vh;
  background: var(--d-bg);
  color: var(--d-text);
  font-family: var(--font);
}

.docs-root svg {
  flex-shrink: 0;
}

.docs-root kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--d-line-strong);
  border-radius: 6px;
  background: rgb(17 16 19 / 0.036);
  color: var(--d-muted);
  font:
    500 11px/1 "Inter",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

/* --- sub bar: documentation tabs and search --------------------------- */

.docs-subbar {
  display: flex;
  align-items: stretch;
  gap: 16px;
  max-width: var(--site-width);
  height: var(--d-tabs);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
  border-top: 1px solid rgb(17 16 19 / 0.045);
}

.docs-search-trigger {
  display: flex;
  flex: 0 0 auto;
  align-self: center;
  align-items: center;
  gap: 10px;
  width: 244px;
  max-width: 100%;
  height: 34px;
  margin-left: auto;
  padding: 0 8px 0 12px;
  border: 1px solid var(--d-line);
  border-radius: 9px;
  background: rgb(17 16 19 / 0.027);
  color: var(--d-faint);
  font-size: 13.5px;
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.docs-search-trigger:hover {
  border-color: var(--d-line-strong);
  background: rgb(17 16 19 / 0.045);
  color: var(--d-muted);
}

.docs-search-trigger svg {
  width: 15px;
  height: 15px;
}

.docs-search-trigger span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-menu-button {
  display: none;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  margin: 6px 0;
  border: 1px solid var(--d-line);
  border-radius: 9px;
  color: var(--d-muted);
}

.docs-menu-button svg {
  width: 17px;
  height: 17px;
}

.docs-tabs {
  display: flex;
  gap: 28px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.docs-tabs::-webkit-scrollbar {
  display: none;
}

.docs-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--d-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.docs-tabs a svg {
  width: 15px;
  height: 15px;
}

.docs-tabs a:hover {
  color: var(--d-strong);
}

.docs-tabs a.active {
  color: var(--d-strong);
}

.docs-tabs a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

/* --- layout ---------------------------------------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) 216px;
  gap: 0 56px;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: calc(var(--d-header) + var(--d-tabs) + 1px);
  align-self: start;
  max-height: calc(100vh - var(--d-header) - var(--d-tabs) - 1px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgb(17 16 19 / 0.108) transparent;
}

.docs-sidebar {
  padding: 28px 6px 48px 0;
  margin-left: -10px;
}

/* --- sidebar --------------------------------------------------------- */

.docs-nav-group+.docs-nav-group {
  margin-top: 24px;
}

.docs-nav-label {
  margin: 0 0 8px 10px;
  color: var(--d-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

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

.docs-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--d-muted);
  font-size: 14px;
  line-height: 1.3;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.docs-nav-item svg {
  width: 16px;
  height: 16px;
  color: var(--d-faint);
  transition: color 0.15s ease;
}

.docs-nav-item span {
  flex: 1;
  min-width: 0;
}

.docs-nav-item:hover {
  background: rgb(17 16 19 / 0.027);
  color: var(--ink-2);
}

.docs-nav-item:hover svg {
  color: var(--d-muted);
}

.docs-nav-item.active {
  background: rgb(17 16 19 / 0.059);
  color: var(--d-strong);
  font-weight: 500;
}

.docs-nav-item.active svg {
  color: var(--d-strong);
}

.docs-method {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  font-family: var(--d-mono);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.2px;
  --method: var(--tone-blue);
  background: color-mix(in srgb, var(--method) 13%, transparent);
  color: var(--method);
}

.method-get {
  --method: var(--tone-green);
}

.method-post {
  --method: var(--tone-blue);
}

.method-exp {
  --method: var(--tone-amber);
}

.method-rpc {
  --method: var(--tone-violet);
}

/* --- article --------------------------------------------------------- */

.docs-main {
  min-width: 0;
  padding: 44px 0 72px;
}

.docs-article {
  max-width: 780px;
}

.docs-eyebrow {
  margin: 0 0 10px;
  color: var(--tone-blue);
  font-size: 13.5px;
  font-weight: 500;
}

.docs-title {
  margin: 0;
  color: var(--d-strong);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.9px;
}

.docs-lead {
  margin: 12px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.docs-body {
  font-size: 15.5px;
  line-height: 1.72;
}

.docs-body> :first-child {
  margin-top: 0;
}

.docs-body p {
  margin: 0 0 18px;
}

.docs-body strong {
  color: var(--d-strong);
  font-weight: 600;
}

.docs-body a:not([class]) {
  color: var(--d-strong);
  text-decoration: underline;
  text-decoration-color: rgb(17 16 19 / 0.252);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.docs-body a:not([class]):hover {
  text-decoration-color: rgb(17 16 19 / 0.720);
}

.docs-body ul,
.docs-body ol:not([class]) {
  margin: 0 0 20px;
  padding-left: 22px;
}

.docs-body li {
  margin: 6px 0;
  padding-left: 2px;
}

.docs-body li::marker {
  color: var(--d-faint);
}

.docs-body :not(pre)>code {
  padding: 2px 6px;
  border: 1px solid rgb(17 16 19 / 0.054);
  border-radius: 6px;
  background: rgb(17 16 19 / 0.050);
  color: var(--ink);
  font-family: var(--d-mono);
  font-size: 0.84em;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.docs-h2,
.docs-h3 {
  position: relative;
  color: var(--d-strong);
  scroll-margin-top: calc(var(--d-header) + var(--d-tabs) + 20px);
}

.docs-h2 {
  margin: 52px 0 14px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.45px;
}

.docs-h3 {
  margin: 34px 0 10px;
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.docs-anchor {
  position: absolute;
  top: 0;
  left: -22px;
  width: 22px;
  color: var(--d-faint);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.docs-h2:hover .docs-anchor,
.docs-h3:hover .docs-anchor {
  opacity: 1;
}

/* --- code ------------------------------------------------------------ */

.docs-code {
  margin: 20px 0 24px;
  overflow: hidden;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: var(--d-panel);
}

.docs-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 40px;
  padding: 0 7px 0 14px;
  border-bottom: 1px solid var(--d-line);
  background: rgb(17 16 19 / 0.016);
}

.docs-code-title {
  color: var(--ink-2);
  font-family: var(--d-mono);
  font-size: 12.5px;
  letter-spacing: 0;
}

.docs-code-lang {
  color: var(--d-faint);
  font-size: 12px;
  letter-spacing: 0;
}

.docs-code-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-copy {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--d-faint);
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.docs-copy:hover {
  background: rgb(17 16 19 / 0.054);
  color: var(--d-strong);
}

.docs-copy svg {
  width: 14px;
  height: 14px;
}

.docs-code-head.is-tabs {
  padding-left: 6px;
}

.docs-code-tabs {
  display: flex;
  align-self: stretch;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.docs-code-tabs button {
  position: relative;
  padding: 0 10px;
  color: var(--d-faint);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.docs-code-tabs button:hover,
.docs-code-tabs button.active {
  color: var(--d-strong);
}

.docs-code-tabs button.active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 1.5px;
  background: var(--ink);
}

.docs-pre {
  margin: 0;
  padding: 15px 18px 17px;
  overflow-x: auto;
  color: var(--ink-2);
  font-family: var(--d-mono);
  font-size: 13px;
  line-height: 1.68;
  letter-spacing: 0;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: rgb(17 16 19 / 0.126) transparent;
}

.docs-pre:focus-visible {
  outline: 2px solid #3F6C9E;
  outline-offset: -2px;
}

.docs-pre code {
  font-family: inherit;
}

.docs-pre.lang-text {
  color: #4A474E;
}

.docs-pre.is-wrapped {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tok-comment {
  color: var(--faint);
  font-style: italic;
}

.tok-string {
  color: #2F7A4E;
}

.tok-number,
.tok-variable {
  color: #8A5A22;
}

.tok-keyword,
.tok-literal {
  color: #6E4F96;
}

.tok-key,
.tok-property,
.tok-flag {
  color: #3F6C9E;
}

.tok-function {
  color: #8A6A22;
}

.tok-type {
  color: #2D7A6E;
}

.tok-punctuation {
  color: var(--faint);
}

.tok-prompt {
  color: var(--faint);
  user-select: none;
}

.tok-strong {
  color: var(--ink);
}

.tok-status-pass {
  color: var(--tone-green);
  font-weight: 600;
}

.tok-status-fail {
  color: var(--tone-red);
  font-weight: 600;
}

.tok-status-warn {
  color: var(--tone-amber);
  font-weight: 600;
}

.tok-status-info {
  color: var(--tone-blue);
  font-weight: 600;
}

/* --- callouts -------------------------------------------------------- */

.docs-callout {
  --tone: var(--tone-blue);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  margin: 22px 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--tone) 26%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 7%, transparent);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.65;
}

.callout-tip {
  --tone: var(--tone-green);
}

.callout-warning {
  --tone: var(--tone-amber);
}

.callout-danger {
  --tone: var(--tone-red);
}

.docs-callout-icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--tone);
}

.docs-callout-body> :last-child {
  margin-bottom: 0;
}

.docs-callout-body p {
  margin: 0 0 8px;
}

.docs-callout-title {
  display: block;
  margin-bottom: 3px;
  color: var(--d-strong);
  font-weight: 600;
}

/* --- cards ----------------------------------------------------------- */

.docs-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 28px;
}

.docs-cards.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.docs-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 18px 18px 17px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: rgb(17 16 19 / 0.016);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.docs-body>.docs-card {
  margin: 22px 0;
}

a.docs-card:hover {
  border-color: rgb(17 16 19 / 0.153);
  background: rgb(17 16 19 / 0.032);
}

.docs-card-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border: 1px solid var(--d-line);
  border-radius: 10px;
  background: rgb(17 16 19 / 0.032);
  color: var(--d-strong);
}

.docs-card-icon svg {
  width: 17px;
  height: 17px;
}

.docs-card-title {
  color: var(--d-strong);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.docs-card-text {
  margin-top: 6px;
  color: var(--d-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* --- steps ----------------------------------------------------------- */

.docs-steps {
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
  counter-reset: docs-step;
}

.docs-body .docs-step {
  position: relative;
  margin: 0;
  padding: 0 0 22px 46px;
  counter-increment: docs-step;
}

.docs-step::before {
  content: counter(docs-step);
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--d-line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--d-strong);
  font-size: 13px;
  font-weight: 600;
}

.docs-step::after {
  content: "";
  position: absolute;
  top: 33px;
  bottom: 5px;
  left: 14px;
  width: 1px;
  background: var(--d-line);
}

.docs-body .docs-step:last-child {
  padding-bottom: 0;
}

.docs-step:last-child::after {
  display: none;
}

.docs-step-title {
  display: block;
  margin: 1px 0 8px;
  color: var(--d-strong);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.docs-step-body> :first-child {
  margin-top: 0;
}

.docs-step-body> :last-child {
  margin-bottom: 0;
}

/* --- badges, tables, endpoints, fields ------------------------------- */

.docs-badge {
  --tone: #5F6873;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 9%, transparent);
  color: var(--tone);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-stable {
  --tone: var(--tone-green);
}

.badge-experimental {
  --tone: var(--tone-amber);
}

.badge-planned {
  --tone: #5F6873;
}

.badge-danger {
  --tone: var(--tone-red);
}

.docs-table {
  margin: 20px 0 26px;
  overflow-x: auto;
  border: 1px solid var(--d-line);
  border-radius: 12px;
}

.docs-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  /* The dashboard's global table rules must not reach documentation tables:
     its fixed layout splits the width evenly, so a column of two-word labels
     gets as much room as the one that needs it. Size columns by content. */
  table-layout: auto;
  min-width: 0;
  white-space: normal;
}

.docs-table th,
.docs-table td {
  height: auto;
}

.docs-table tbody tr {
  cursor: auto;
}

.docs-table tbody tr:hover {
  background: none;
}

.docs-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--d-line);
  background: rgb(17 16 19 / 0.020);
  color: var(--d-strong);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.docs-table th:empty {
  display: none;
}

.docs-table thead:has(th:empty:first-child) {
  display: none;
}

/* Rows share the height of the tallest one (components/docs/table.tsx), so
   content sits in the middle of the row rather than against its top. */
.docs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--d-line);
  color: var(--ink-2);
  vertical-align: middle;
}

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

.docs-table td:first-child {
  color: var(--ink-2);
}

/* Key/value tables (no header row): a narrow, quieter key column. */
.docs-table:has(thead th:empty:first-child) td:first-child {
  width: 32%;
  color: var(--d-muted);
}

.docs-table.is-compact td,
.docs-table.is-compact th {
  padding: 8px 14px;
}

.docs-table code {
  font-size: 12.5px !important;
}

.docs-endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 28px;
  padding: 11px 14px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: var(--d-panel);
}

.docs-endpoint .docs-method {
  height: 22px;
  min-width: 46px;
  font-size: 11px;
}

.docs-body .docs-endpoint code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--d-strong);
  font-family: var(--d-mono);
  font-size: 14px;
  letter-spacing: 0;
}

.docs-dim {
  color: var(--d-faint);
}

.docs-endpoint-auth {
  margin-left: auto;
  color: var(--d-faint);
  font-size: 12.5px;
}

.docs-fields {
  margin: 22px 0 28px;
  border-top: 1px solid var(--d-line);
}

.docs-fields-title {
  margin: 0 !important;
  padding: 16px 0 4px;
  color: var(--d-strong);
  font-size: 14px;
  font-weight: 600;
}

.docs-field {
  padding: 14px 0;
  border-bottom: 1px solid var(--d-line);
}

.docs-field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.docs-body .docs-field-name {
  padding: 0;
  border: 0;
  background: none;
  color: var(--d-strong);
  font-size: 13.5px;
  font-weight: 600;
}

.docs-field-type,
.docs-field-default {
  padding: 1px 7px;
  border-radius: 6px;
  background: rgb(17 16 19 / 0.045);
  color: var(--d-muted);
  font-family: var(--d-mono);
  font-size: 11.5px;
  letter-spacing: 0;
}

.docs-body .docs-field-default code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 11.5px;
}

.docs-field-required {
  padding: 1px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--tone-red) 12%, transparent);
  color: var(--tone-red);
  font-size: 11.5px;
  font-weight: 500;
}

.docs-field-body {
  margin-top: 6px;
  color: #4A474E;
  font-size: 14.5px;
  line-height: 1.62;
}

.docs-field-body> :last-child {
  margin-bottom: 0;
}

/* --- action links ---------------------------------------------------- */

/* Deep links and copy-and-open on "Integrate with AI" */
.docs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.docs-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--d-line-strong);
  border-radius: 999px;
  background: rgb(17 16 19 / 0.027);
  color: var(--d-strong);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.docs-action:hover {
  border-color: rgb(17 16 19 / 0.216);
  background: rgb(17 16 19 / 0.059);
}

.docs-action svg {
  width: 14px;
  height: 14px;
}

/* --- content tabs, accordion, checklist ------------------------------ */

.docs-tabset {
  margin: 22px 0 28px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
}

.docs-tabset-list {
  display: flex;
  gap: 22px;
  padding: 0 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--d-line);
  scrollbar-width: none;
}

.docs-tabset-list button {
  position: relative;
  height: 44px;
  color: var(--d-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.docs-tabset-list button:hover,
.docs-tabset-list button.active {
  color: var(--d-strong);
}

.docs-tabset-list button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.docs-tabset-panel {
  padding: 20px 20px 2px;
}

.docs-tabset-panel>*> :first-child,
.docs-tabset-panel> :first-child {
  margin-top: 0;
}

.docs-accordion-group {
  margin: 20px 0 26px;
}

.docs-accordion {
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: rgb(17 16 19 / 0.011);
}

.docs-accordion+.docs-accordion {
  margin-top: 10px;
}

.docs-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: var(--d-strong);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

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

.docs-accordion-icon {
  width: 16px;
  height: 16px;
  color: var(--d-faint);
  transition: transform 0.2s ease;
}

.docs-accordion[open] .docs-accordion-icon {
  transform: rotate(180deg);
}

.docs-accordion-body {
  padding: 0 16px 2px;
}

.docs-checklist {
  margin: 22px 0 28px !important;
  padding: 0 !important;
  list-style: none;
}

.docs-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 14px;
  margin: 0 !important;
  padding: 14px 0 !important;
  border-bottom: 1px solid var(--d-line);
}

.docs-check:first-child {
  border-top: 1px solid var(--d-line);
}

.docs-check-box {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1.5px solid var(--d-line-strong);
  border-radius: 5px;
}

.docs-check-body {
  margin-top: 3px;
  color: #4A474E;
  font-size: 14.5px;
  line-height: 1.62;
}

.docs-check-body> :last-child {
  margin-bottom: 0;
}

/* --- protocols: plain / technical explainers ------------------------- */

.docs-explainer {
  position: relative;
  margin: 20px 0 28px;
  padding: 18px 22px 22px 26px;
  overflow: hidden;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: #fff;
}

.docs-explainer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: rgb(var(--d-accent));
}

.docs-explainer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.docs-explainer-label {
  color: rgb(var(--d-accent));
  font-size: 14px;
  font-weight: 500;
}

.docs-explainer-body {
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.72;
  animation: docs-fade 0.22s ease;
}

.docs-explainer-body> :last-child {
  margin-bottom: 0;
}

@keyframes docs-fade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
}

.docs-segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgb(17 16 19 / 0.108);
  border-radius: 999px;
  background: rgb(17 16 19 / 0.12);
}

.docs-segmented button {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--d-muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.docs-segmented button:hover {
  color: var(--ink-2);
}

.docs-segmented button[aria-pressed="true"] {
  background: rgb(17 16 19 / 0.090);
  box-shadow: inset 0 0 0 1px rgb(17 16 19 / 0.054);
  color: var(--d-strong);
}

.docs-explain-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin: 24px 0 8px;
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: rgb(17 16 19 / 0.016);
}

.docs-body .docs-explain-bar p {
  max-width: 440px;
  margin: 0;
  color: #4A474E;
  font-size: 14.5px;
  line-height: 1.6;
}

.docs-reading .docs-segmented button {
  padding: 0 10px;
  font-size: 12px;
}

.docs-reading-hint {
  margin: 12px 0 0;
  color: var(--d-faint);
  font-size: 12.5px;
  line-height: 1.55;
}

.docs-divider {
  margin: 60px 0 0;
  border: 0;
  border-top: 1px solid var(--d-line);
}

.docs-body .docs-divider+.docs-h2 {
  margin-top: 44px;
}

.docs-body .docs-subhead {
  margin: 30px 0 10px;
  font-size: 15.5px;
}

.docs-protocol-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: -2px 0 18px;
}

.docs-protocol-name {
  margin-right: 4px;
  color: #4A474E;
  font-size: 15px;
  font-weight: 500;
}

.docs-protocol-rev {
  display: inline-flex;
}

.docs-body .docs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
  padding: 0;
  list-style: none;
}

.docs-body .docs-chips li {
  margin: 0;
  padding: 0;
}

.docs-body .docs-chips code {
  color: #4A474E;
}

.docs-body .docs-see {
  color: var(--d-muted);
  font-size: 14px;
}

/* --- page footer ----------------------------------------------------- */

.docs-page-foot {
  max-width: 780px;
  margin-top: 64px;
}

.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.docs-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 18px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.docs-pager-link:hover {
  border-color: rgb(17 16 19 / 0.153);
  background: rgb(17 16 19 / 0.023);
}

.docs-pager-link small {
  color: var(--d-faint);
  font-size: 12.5px;
}

.docs-pager-link strong {
  color: var(--d-strong);
  font-size: 15px;
  font-weight: 600;
}

.docs-pager-link.is-next {
  align-items: flex-end;
  text-align: right;
}

/* The documentation ends with the same footer as the rest of the site, so the
   legal pages and the guides are reachable from every page. */
.docs-foot {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
  border-top: 1px solid var(--d-line);
}

/* --- on this page ---------------------------------------------------- */

.docs-toc {
  padding: 46px 0 40px;
}

.docs-toc-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--d-strong);
  font-size: 13px;
  font-weight: 600;
}

.docs-toc-label svg {
  width: 14px;
  height: 14px;
  color: var(--d-muted);
}

.docs-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--d-line);
}

.docs-toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 13px;
  border-left: 1px solid transparent;
  color: var(--d-faint);
  font-size: 13px;
  line-height: 1.45;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.docs-toc li.is-sub a {
  padding-left: 25px;
  font-size: 12.5px;
}

.docs-toc a:hover {
  color: var(--ink-2);
}

.docs-toc a.active {
  border-left-color: var(--ink);
  color: var(--d-strong);
}

/* --- search dialog --------------------------------------------------- */

.docs-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgb(17 16 19 / 0.32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.docs-search {
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: 72vh;
  overflow: hidden;
  border: 1px solid var(--d-line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 80px rgb(17 16 19 / 0.32);
}

.docs-search-input {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--d-line);
}

.docs-search-input>svg {
  width: 18px;
  height: 18px;
  color: var(--d-muted);
}

.docs-search-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--d-strong);
  font-size: 15.5px;
}

.docs-search-input input::placeholder {
  color: var(--d-faint);
}

.docs-search-label {
  margin: 12px 18px 6px;
  color: var(--d-faint);
  font-size: 12px;
  font-weight: 500;
}

.docs-search-results {
  margin: 0;
  padding: 0 8px 8px;
  overflow-y: auto;
  list-style: none;
}

.docs-search-results li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.docs-search-results li.active {
  background: rgb(17 16 19 / 0.054);
}

.docs-search-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--d-line);
  border-radius: 8px;
  color: var(--d-muted);
}

.docs-search-icon svg {
  width: 15px;
  height: 15px;
}

.docs-search-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.docs-search-text strong {
  color: var(--d-strong);
  font-size: 14.5px;
  font-weight: 500;
}

.docs-search-text small {
  color: var(--d-faint);
  font-size: 12.5px;
}

.docs-search-enter {
  width: 15px;
  height: 15px;
  color: var(--d-muted);
}

.docs-search-empty {
  margin: 8px 18px 22px;
  color: var(--d-muted);
  font-size: 14px;
}

.docs-search-foot {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--d-line);
  color: var(--d-faint);
  font-size: 12px;
}

.docs-search-foot span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- mobile drawer --------------------------------------------------- */

.docs-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  visibility: hidden;
  background: rgb(0 0 0 / 0);
  transition:
    background 0.25s ease,
    visibility 0s linear 0.25s;
}

.docs-drawer.open {
  visibility: visible;
  background: rgb(17 16 19 / 0.32);
  transition: background 0.25s ease;
}

.docs-drawer-panel {
  width: min(320px, 86vw);
  height: 100%;
  padding: 0 14px 32px;
  overflow-y: auto;
  border-right: 1px solid var(--d-line);
  background: #FBFAFC;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

.docs-drawer.open .docs-drawer-panel {
  transform: none;
}

.docs-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  margin: 0 -14px 12px;
  padding: 0 14px 0 24px;
  border-bottom: 1px solid var(--d-line);
  color: var(--d-strong);
  font-size: 15px;
  font-weight: 600;
}

.docs-drawer-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--d-muted);
}

.docs-drawer-head svg {
  width: 18px;
  height: 18px;
}

.docs-drawer-tabs {
  display: grid;
  gap: 2px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--d-line);
}

.docs-drawer-tabs a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--d-muted);
  font-size: 14px;
}

.docs-drawer-tabs a svg {
  width: 16px;
  height: 16px;
}

.docs-drawer-tabs a.active {
  background: rgb(17 16 19 / 0.059);
  color: var(--d-strong);
}

/* --- responsive ------------------------------------------------------ */

@media (max-width: 1240px) {
  .docs-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0 48px;
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 900px) {

  .docs-subbar,
  .docs-layout {
    padding: 0 20px;
  }

  .docs-layout {
    display: block;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-menu-button {
    display: flex;
  }

  .docs-main {
    padding-top: 32px;
  }
}

@media (max-width: 640px) {
  html:has(.docs-root) {}

  .docs-subbar,
  .docs-layout {
    padding: 0 16px;
  }

  .docs-search-trigger {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .docs-search-trigger span,
  .docs-search-trigger kbd {
    display: none;
  }

  .docs-tabs {
    gap: 20px;
  }

  .docs-tabs a {
    font-size: 13.5px;
  }

  .docs-title {
    font-size: 28px;
    letter-spacing: -0.6px;
  }

  .docs-lead {
    font-size: 16px;
  }

  .docs-body {
    font-size: 15px;
  }

  .docs-h2 {
    margin-top: 44px;
    font-size: 21px;
  }

  .docs-h2,
  .docs-h3 {
    scroll-margin-top: calc(var(--d-header) + var(--d-tabs) + 12px);
  }

  .docs-anchor {
    display: none;
  }

  .docs-cards,
  .docs-cards.cols-3,
  .docs-pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-pager-link.is-next {
    align-items: flex-start;
    text-align: left;
  }

  .docs-tabset-panel {
    padding: 16px 14px 2px;
  }

  .docs-body .docs-step {
    padding-left: 40px;
  }

  .docs-pre {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.docs-root) {
    scroll-behavior: auto;
  }

  .docs-explainer-body {
    animation: none;
  }
}

@media (max-width: 640px) {
  .docs-explainer {
    padding: 16px 16px 18px 20px;
  }

  .docs-explainer-body {
    font-size: 15.5px;
  }

  .docs-explain-bar {
    padding: 14px;
  }
}