:root {
  --doc-bg: #f7f7f8;
  --doc-surface: #ffffff;
  --doc-surface-muted: #fafafa;
  --doc-line: #e3e3e6;
  --doc-line-strong: #d0d0d4;
  --doc-text: #171717;
  --doc-text-muted: #6b6b72;
  --doc-text-faint: #8d8d94;
  --doc-code-bg: #f2f2f3;
  --doc-radius: 8px;
  --doc-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --doc-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--doc-text);
  background: var(--doc-bg);
  font-family: var(--doc-font);
  font-size: 14px;
  line-height: 1.5;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--doc-mono);
  font-size: 12px;
}

pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--doc-line);
  padding: 10px 0;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--doc-text-faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.api-reference-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 380px;
  min-height: 100vh;
}

.api-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--doc-line);
  background: var(--doc-surface-muted);
  padding: 18px 14px;
}

.api-logo {
  display: block;
  margin: 2px 8px 18px;
  color: var(--doc-text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.api-search {
  margin: 0 6px 22px;
  border: 1px solid var(--doc-line);
  border-radius: var(--doc-radius);
  background: var(--doc-surface);
  color: var(--doc-text-faint);
  padding: 8px 10px;
  font-size: 12px;
}

.api-nav {
  display: grid;
  gap: 2px;
}

.api-nav-label {
  margin: 16px 8px 6px;
  color: var(--doc-text-faint);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.api-nav a {
  border-radius: 7px;
  color: var(--doc-text-muted);
  padding: 7px 8px;
  font-size: 13px;
  text-decoration: none;
}

.api-nav a:hover,
.api-nav a.is-active {
  background: #eeeeef;
  color: var(--doc-text);
}

.api-content {
  min-width: 0;
  background: var(--doc-surface);
  padding: 46px 54px 72px;
}

.api-section {
  max-width: 720px;
  border-bottom: 1px solid var(--doc-line);
  padding: 0 0 34px;
  margin-bottom: 34px;
}

.api-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.api-eyebrow {
  margin: 0 0 10px;
  color: var(--doc-text-faint);
  font-size: 12px;
  font-weight: 650;
}

.api-content h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.14;
  letter-spacing: 0;
}

.api-lede {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--doc-text-muted);
  font-size: 14px;
}

.api-copy-all {
  margin: 22px 0 0;
}

.api-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.api-section h2 {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.api-section p {
  margin: 0;
  color: var(--doc-text-muted);
  font-size: 13px;
}

.api-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  border: 1px solid var(--doc-line-strong);
  border-radius: 999px;
  background: #f4f4f5;
  color: #444449;
  padding: 2px 8px;
  font-family: var(--doc-mono);
  font-size: 11px;
  font-weight: 700;
}

.api-method-neutral {
  font-family: var(--doc-font);
}

.api-copy-markdown {
  flex: none;
  margin-left: auto;
  border: 1px solid var(--doc-line-strong);
  border-radius: 7px;
  background: var(--doc-surface);
  color: var(--doc-text-muted);
  cursor: pointer;
  padding: 5px 9px;
  font: 650 12px/1 var(--doc-font);
}

.api-copy-markdown:hover,
.api-copy-markdown:focus-visible {
  border-color: #a9a9af;
  color: var(--doc-text);
}

.api-fields {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.api-fields div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
}

.api-fields dt {
  color: var(--doc-text-faint);
  font-size: 12px;
}

.api-fields dd {
  margin: 0;
}

.api-fields code,
td code {
  border-radius: 5px;
  background: var(--doc-code-bg);
  padding: 2px 5px;
}

.api-examples {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-left: 1px solid var(--doc-line);
  background: #f4f4f5;
  padding: 46px 18px;
}

.api-example-card {
  border: 1px solid var(--doc-line-strong);
  border-radius: var(--doc-radius);
  background: var(--doc-surface);
  margin-bottom: 14px;
  overflow: hidden;
}

.api-example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--doc-line);
  background: var(--doc-surface-muted);
  color: var(--doc-text-muted);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 650;
}

.api-example-header code {
  color: var(--doc-text-faint);
}

.api-example-card pre {
  padding: 14px;
}

@media (max-width: 1120px) {
  .api-reference-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .api-examples {
    position: static;
    grid-column: 2;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--doc-line);
  }
}

@media (max-width: 760px) {
  .api-reference-shell {
    display: block;
  }

  .api-sidebar,
  .api-examples {
    position: static;
    height: auto;
  }

  .api-content {
    padding: 30px 20px 48px;
  }

  .api-section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .api-copy-markdown {
    margin-left: 58px;
  }

  .api-fields div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
