/* ==========================================================================
   Orangescrum Help Centre — documentation theme
   Scoped to .os-docs so it never collides with the marketing site's
   bootstrap/style.css bundle.
   ========================================================================== */

:root {
  --os-orange: #f26c21;
  --os-orange-dark: #d1550f;
  --os-orange-light: #ff8a4c;

  --os-bg: #ffffff;
  --os-bg-soft: #fbfafa;
  --os-bg-sunk: #f5f4f2;
  --os-border: #e7e4e0;
  --os-border-soft: #f0edea;

  --os-text: #212529;
  --os-text-muted: #212529;
  --os-text-faint: #212529;

  --os-code-bg: #faf9f8;
  --os-code-text: #2b2825;

  --os-radius: 10px;
  --os-radius-lg: 14px;

  --os-sidebar-w: 288px;
  --os-toc-w: 232px;
  --os-top-h: 60px;
  --os-tabs-h: 46px;

  --os-shadow-sm: 0 1px 2px rgb(28 26 25 / 6%);
  --os-shadow-md: 0 4px 14px rgb(28 26 25 / 8%);
  --os-shadow-lg: 0 16px 48px rgb(28 26 25 / 14%);

  --os-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  --os-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

html[data-os-theme='dark'] {
  --os-bg: #17161a;
  --os-bg-soft: #1d1c21;
  --os-bg-sunk: #232228;
  --os-border: #46414d;
  --os-border-soft: #38333e;

  --os-text: #ece9e6;
  --os-text-muted: #ece9e6;
  --os-text-faint: #ece9e6;

  --os-code-bg: #1b1a1f;
  --os-code-text: #e4e0dc;

  --os-shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --os-shadow-md: 0 4px 14px rgb(0 0 0 / 45%);
  --os-shadow-lg: 0 16px 48px rgb(0 0 0 / 55%);
}

/* --------------------------------------------------------------- base ---- */

.os-docs,
.os-docs * {
  box-sizing: border-box;
}

/* docs.css loads on every page (see components/site/Seo.jsx), so this
   resets the browser's default 8px body margin - and sets the theme
   background/color - everywhere, not just /guide. Without the background
   here, the dark theme shows white on overscroll and below short pages. */
html,
body {
  margin: 0;
  background: var(--os-bg);
  color: var(--os-text);
}

.os-docs {
  min-height: 100vh;
  margin: 0;
  font-family: var(--os-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--os-text);
  background: var(--os-bg);
  -webkit-font-smoothing: antialiased;
}

/* `:where()` contributes no specificity, so these resets sit below every
   component rule below. Written as plain `.os-docs a` they would out-specify
   single-class selectors like `.os-side__link` and swallow their colours. */
:where(.os-docs) a {
  color: inherit;
  text-decoration: none;
}

:where(.os-docs) code,
:where(.os-docs) pre,
:where(.os-docs) kbd {
  font-family: var(--os-mono);
}

/* ------------------------------------------------------------ top bar ---- */

.os-top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--os-bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--os-border);
}

.os-top__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--os-top-h);
  max-width: 1600px;
  padding: 0 24px;
  margin: 0 auto;
}

.os-top__burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: 0;
}

.os-top__burger span {
  width: 18px;
  height: 2px;
  background: var(--os-text);
  border-radius: 2px;
}

.os-top__brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.os-top__logo {
  display: block;
  height: 32px;
  width: auto;
}

/* The logo's wordmark and mark are solid black, invisible against a dark
   background - swap in a white-wordmark variant with the same orange leaf. */
html[data-os-theme='dark'] .os-top__logo {
  content: url('/logo-dark.png');
}

.os-top__search {
  flex: 1;
  min-width: 0;
  max-width: 460px;
  margin-left: 12px;
}

.os-top__links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--os-text-muted);
}

.os-top__links a:hover {
  color: var(--os-text);
}

.os-top__icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--os-text-muted);
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
}

.os-top__icon-btn:hover {
  color: var(--os-text);
  background: var(--os-bg-sunk);
}

.os-top__icon-btn svg {
  width: 17px;
  height: 17px;
}

.os-top__cta {
  padding: 7px 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  background: var(--os-orange);
  border-radius: 8px;
  transition: background 0.15s;
}

.os-top__cta:hover {
  background: var(--os-orange-dark);
}

/* -------------------------------------------------------------- tabs ----- */

.os-tabsbar {
  border-bottom: 1px solid var(--os-border);
}

.os-tabsbar__inner {
  display: flex;
  gap: 4px;
  align-items: stretch;
  height: var(--os-tabs-h);
  max-width: 1600px;
  padding: 0 24px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.os-tabsbar__inner::-webkit-scrollbar {
  display: none;
}

.os-tabsbar__tab {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 550;
  color: var(--os-text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.os-tabsbar__tab svg {
  width: 16px;
  height: 16px;
}

.os-tabsbar__tab:hover {
  color: var(--os-text);
}

.os-tabsbar__tab.is-active {
  color: var(--os-orange);
  border-bottom-color: var(--os-orange);
}

/* ------------------------------------------------------------- shell ----- */

.os-shell {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
}

.os-shell__side {
  /* Second in the DOM so page content converts first for agents; pulled back
     to the left visually. See the note in DocsLayout. */
  order: -1;
  flex: 0 0 var(--os-sidebar-w);
  width: var(--os-sidebar-w);
  border-right: 1px solid var(--os-border);
}

.os-shell__side-inner {
  position: sticky;
  top: calc(var(--os-top-h) + var(--os-tabs-h));
  max-height: calc(100vh - var(--os-top-h) - var(--os-tabs-h));
  padding: 24px 16px 48px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.os-shell__scrim {
  display: none;
}

.os-shell__main {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 32px;
  padding: 0 24px;
}

.os-shell__toc {
  flex: 0 0 var(--os-toc-w);
  width: var(--os-toc-w);
}

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

.os-side__group + .os-side__group {
  margin-top: 24px;
}

.os-side__gtitle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--os-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.os-side__gicon {
  width: 14px;
  height: 14px;
}

.os-side__list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.os-side__list--nested {
  padding-left: 10px;
  margin-left: 7px;
  border-left: 1px solid var(--os-border);
}

.os-side__link {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px 10px;
  font-size: 13.5px;
  color: var(--os-text-muted);
  border-radius: 7px;
  transition: color 0.12s, background 0.12s;
}

.os-side__link:hover {
  color: var(--os-text);
  background: var(--os-bg-sunk);
}

.os-side__link.is-active {
  font-weight: 600;
  color: var(--os-orange);
  background: color-mix(in srgb, var(--os-orange) 10%, transparent);
}

.os-side__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.os-side__method {
  flex-shrink: 0;
  min-width: 34px;
  padding: 1px 4px;
  font-family: var(--os-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 0.02em;
  border-radius: 4px;
}

.os-side__method--get { background: #2f855a; }
.os-side__method--post { background: #2b6cb0; }
.os-side__method--put { background: #b7791f; }
.os-side__method--patch { background: #805ad5; }
.os-side__method--delete { background: #c53030; }

.os-side__toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--os-text-muted);
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 7px;
}

.os-side__toggle:hover {
  color: var(--os-text);
  background: var(--os-bg-sunk);
}

.os-side__chevron {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  transition: transform 0.15s;
}

.os-side__toggle.is-open .os-side__chevron {
  transform: rotate(90deg);
}

/* --------------------------------------------------------------- doc ----- */

.os-doc {
  flex: 1;
  min-width: 0;
  max-width: 760px;
  padding: 28px 0 80px;
}

.os-doc__head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.os-doc__crumbs {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
  color: var(--os-text-faint);
}

.os-doc__crumbs a:hover {
  color: var(--os-orange);
}

.os-doc__crumbs em {
  margin: 0 2px;
  font-style: normal;
  color: var(--os-border);
}

.os-doc__title {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.os-doc__lede {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--os-text-muted);
}

.os-doc__body > *:first-child {
  margin-top: 0;
}

/* headings ---------------------------------------------------------------- */

.os-doc__body .os-doc__heading {
  position: relative;
  scroll-margin-top: calc(var(--os-top-h) + var(--os-tabs-h) + 20px);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.os-doc__body h2 {
  margin: 44px 0 14px;
  font-size: 23px;
}

.os-doc__body h3 {
  margin: 32px 0 10px;
  font-size: 18px;
}

.os-doc__body h4 {
  margin: 26px 0 8px;
  font-size: 15.5px;
}

.os-doc__anchor {
  position: absolute;
  left: -20px;
  font-weight: 400;
  color: var(--os-border);
  opacity: 0;
  transition: opacity 0.12s;
}

.os-doc__heading:hover .os-doc__anchor {
  opacity: 1;
}

.os-doc__anchor:hover {
  color: var(--os-orange);
}

/* prose ------------------------------------------------------------------- */

.os-doc__body p {
  margin: 0 0 16px;
}

.os-doc__body ul,
.os-doc__body ol {
  padding-left: 22px;
  margin: 0 0 16px;
}

.os-doc__body li {
  margin-bottom: 6px;
}

.os-doc__body li > ul,
.os-doc__body li > ol {
  margin: 6px 0 0;
}

.os-doc__link {
  color: var(--os-orange);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--os-orange) 35%, transparent);
  text-underline-offset: 2px;
}

.os-doc__link:hover {
  text-decoration-color: var(--os-orange);
}

.os-doc__body blockquote {
  padding: 2px 0 2px 16px;
  margin: 0 0 16px;
  color: var(--os-text-muted);
  border-left: 3px solid var(--os-border);
}

.os-doc__body hr {
  height: 1px;
  margin: 36px 0;
  background: var(--os-border);
  border: 0;
}

.os-doc__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--os-radius);
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.os-doc__body img:hover {
  opacity: 0.92;
}

.os-img-zoom {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgb(10 9 8 / 85%);
  cursor: zoom-out;
}

.os-img-zoom__img {
  max-width: 100%;
  max-height: 100%;
  cursor: default;
  border-radius: var(--os-radius);
  box-shadow: var(--os-shadow-lg);
}

.os-img-zoom__close {
  position: fixed;
  top: 20px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  background: rgb(255 255 255 / 12%);
  border: 0;
  border-radius: 999px;
}

.os-img-zoom__close:hover {
  background: rgb(255 255 255 / 22%);
}

.os-doc__body :not(pre) > code {
  overflow-wrap: anywhere;
  padding: 1.5px 5px;
  font-size: 0.875em;
  color: var(--os-code-text);
  background: var(--os-code-bg);
  border: 1px solid var(--os-border-soft);
  border-radius: 5px;
}

/* tables ------------------------------------------------------------------ */

.os-table {
  margin: 0 0 20px;
  overflow-x: auto;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
}

.os-table table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}

.os-table th,
.os-table td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--os-border-soft);
}

.os-table th {
  font-weight: 600;
  background: var(--os-bg-soft);
}

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

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

.os-code {
  margin: 0 0 20px;
  overflow: hidden;
  background: var(--os-code-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
}

.os-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 14px;
  background: var(--os-bg-soft);
  border-bottom: 1px solid var(--os-border-soft);
}

.os-code__lang {
  font-family: var(--os-mono);
  font-size: 11px;
  color: var(--os-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.os-code__copy {
  padding: 3px 9px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--os-text-muted);
  cursor: pointer;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: 6px;
}

.os-code__copy:hover {
  color: var(--os-text);
  border-color: var(--os-text-faint);
}

.os-code__pre {
  padding: 14px 16px;
  margin: 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--os-code-text);

  /* Long shell commands and URLs used to run off the edge behind a horizontal
     scrollbar most readers never found. Soft-wrap instead; `anywhere` lets an
     unbroken URL break rather than forcing the whole block wide. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.os-code__pre code {
  font-size: inherit;
  background: none;
  border: 0;
}

/* syntax highlighting (rehype-highlight / hljs classes) */
.hljs-comment, .hljs-quote { color: #8d867e; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-name { color: #b0399a; }
.hljs-string, .hljs-regexp, .hljs-addition { color: #2f7d4f; }
.hljs-number, .hljs-built_in, .hljs-symbol { color: #b5651d; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable { color: #2b6cb0; }
.hljs-title, .hljs-section, .hljs-function { color: #7048c4; }
.hljs-type, .hljs-class .hljs-title { color: #b7791f; }
.hljs-meta { color: #8d867e; }
.hljs-deletion { color: #c53030; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

html[data-os-theme='dark'] .hljs-comment,
html[data-os-theme='dark'] .hljs-quote { color: #7d766f; }
html[data-os-theme='dark'] .hljs-keyword,
html[data-os-theme='dark'] .hljs-selector-tag,
html[data-os-theme='dark'] .hljs-literal,
html[data-os-theme='dark'] .hljs-name { color: #f08fd0; }
html[data-os-theme='dark'] .hljs-string,
html[data-os-theme='dark'] .hljs-regexp,
html[data-os-theme='dark'] .hljs-addition { color: #7ed99f; }
html[data-os-theme='dark'] .hljs-number,
html[data-os-theme='dark'] .hljs-built_in,
html[data-os-theme='dark'] .hljs-symbol { color: #ffa96b; }
html[data-os-theme='dark'] .hljs-attr,
html[data-os-theme='dark'] .hljs-attribute,
html[data-os-theme='dark'] .hljs-variable,
html[data-os-theme='dark'] .hljs-template-variable { color: #7fb6f0; }
html[data-os-theme='dark'] .hljs-title,
html[data-os-theme='dark'] .hljs-section,
html[data-os-theme='dark'] .hljs-function { color: #bda6ff; }
html[data-os-theme='dark'] .hljs-type { color: #ffd479; }

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

.os-callout {
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  margin: 0 0 20px;
  font-size: 14.2px;
  border: 1px solid var(--os-border);
  border-left-width: 3px;
  border-radius: var(--os-radius);
  background: var(--os-bg-soft);
}

.os-callout__badge {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
}

.os-callout__title {
  margin: 0 0 4px;
  font-weight: 650;
}

.os-callout__content > *:last-child {
  margin-bottom: 0;
}

.os-callout--note { border-left-color: #2b6cb0; }
.os-callout--note .os-callout__badge { background: #2b6cb0; }
.os-callout--info { border-left-color: #2b6cb0; }
.os-callout--info .os-callout__badge { background: #2b6cb0; }
.os-callout--tip { border-left-color: #2f855a; }
.os-callout--tip .os-callout__badge { background: #2f855a; }
.os-callout--check { border-left-color: #2f855a; }
.os-callout--check .os-callout__badge { background: #2f855a; }
.os-callout--warning { border-left-color: #b7791f; }
.os-callout--warning .os-callout__badge { background: #b7791f; }
.os-callout--danger { border-left-color: #c53030; }
.os-callout--danger .os-callout__badge { background: #c53030; }

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

.os-cards {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.os-cards[data-cols='2'] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.os-cards[data-cols='3'] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.os-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.os-card--link:hover {
  border-color: var(--os-orange);
  box-shadow: var(--os-shadow-md);
  transform: translateY(-1px);
}

.os-card--horizontal {
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
}

.os-card__icon {
  font-size: 19px;
  line-height: 1.2;
}

.os-card__title {
  font-size: 14.5px;
  font-weight: 650;
}

.os-card__body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--os-text-muted);
}

.os-card__body p:last-child {
  margin-bottom: 0;
}

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

.os-steps {
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
  counter-reset: os-step;
}

.os-step {
  position: relative;
  padding: 0 0 20px 38px;
  margin: 0;
  border-left: 1px solid var(--os-border);
  counter-increment: os-step;
}

.os-step:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.os-step::before {
  position: absolute;
  top: -2px;
  left: -13px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--os-text-muted);
  content: counter(os-step);
  background: var(--os-bg-sunk);
  border: 1px solid var(--os-border);
  border-radius: 50%;
}

.os-step__title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 650;
}

.os-step__body > *:last-child {
  margin-bottom: 0;
}

/* accordion --------------------------------------------------------------- */

.os-accordions {
  margin: 0 0 22px;
}

.os-accordion {
  margin: 0 0 8px;
  overflow: hidden;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
}

.os-accordion__summary {
  padding: 12px 15px;
  cursor: pointer;
  list-style: none;
  background: var(--os-bg-soft);
}

.os-accordion__summary::-webkit-details-marker {
  display: none;
}

.os-accordion__summary::before {
  display: inline-block;
  margin-right: 9px;
  font-size: 10px;
  color: var(--os-text-faint);
  content: '▶';
  transition: transform 0.15s;
}

.os-accordion[open] .os-accordion__summary::before {
  transform: rotate(90deg);
}

.os-accordion__title {
  font-size: 14.5px;
  font-weight: 600;
}

.os-accordion__desc {
  display: block;
  padding-left: 19px;
  font-size: 13px;
  color: var(--os-text-muted);
}

.os-accordion__body {
  padding: 14px 15px;
  border-top: 1px solid var(--os-border-soft);
}

.os-accordion__body > *:last-child {
  margin-bottom: 0;
}

/* tabs (in content) ------------------------------------------------------- */

.os-tabs {
  margin: 0 0 22px;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  overflow: hidden;
}

.os-tabs__list {
  display: flex;
  gap: 2px;
  padding: 5px 5px 0;
  overflow-x: auto;
  background: var(--os-bg-soft);
  border-bottom: 1px solid var(--os-border-soft);
}

.os-tabs__tab {
  padding: 7px 13px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--os-text-muted);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
}

.os-tabs__tab.is-active {
  color: var(--os-orange);
  border-bottom-color: var(--os-orange);
}

.os-tabs__panel {
  padding: 16px 15px 2px;
}

.os-tabs__panel .os-code:last-child {
  margin-bottom: 14px;
}

/* API reference ----------------------------------------------------------- */

.os-endpoint {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin: 0 0 22px;
  background: var(--os-bg-soft);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
}

.os-endpoint__method {
  flex-shrink: 0;
  padding: 3px 9px;
  font-family: var(--os-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-radius: 5px;
}

.os-endpoint__method--get { background: #2f855a; }
.os-endpoint__method--post { background: #2b6cb0; }
.os-endpoint__method--put { background: #b7791f; }
.os-endpoint__method--patch { background: #805ad5; }
.os-endpoint__method--delete { background: #c53030; }

.os-endpoint__path {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
  background: none !important;
  border: 0 !important;
}

.os-endpoint__copy {
  flex-shrink: 0;
  padding: 3px 9px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--os-text-muted);
  cursor: pointer;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: 6px;
}

.os-param {
  padding: 12px 0;
  border-top: 1px solid var(--os-border-soft);
}

.os-param__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.os-param__name {
  font-size: 13px !important;
  font-weight: 600;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
}

.os-param__type {
  font-family: var(--os-mono);
  font-size: 11.5px;
  color: var(--os-text-faint);
}

.os-param__req {
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 650;
  color: #c53030;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, #c53030 12%, transparent);
  border-radius: 4px;
}

.os-param__desc {
  margin-top: 4px;
  font-size: 13.8px;
  color: var(--os-text-muted);
}

.os-param__desc > *:last-child {
  margin-bottom: 0;
}

.os-param__example {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--os-text-faint);
}

.os-response {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 9px 12px;
  margin: 0 0 8px;
  font-size: 13.8px;
  border: 1px solid var(--os-border);
  border-left-width: 3px;
  border-radius: 8px;
}

.os-response__code {
  font-family: var(--os-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.os-response__desc {
  color: var(--os-text-muted);
}

.os-response--ok { border-left-color: #2f855a; }
.os-response--ok .os-response__code { color: #2f855a; }
.os-response--warn { border-left-color: #b7791f; }
.os-response--warn .os-response__code { color: #b7791f; }
.os-response--error { border-left-color: #c53030; }
.os-response--error .os-response__code { color: #c53030; }
.os-response--info { border-left-color: #2b6cb0; }
.os-response--info .os-response__code { color: #2b6cb0; }

/* badges ------------------------------------------------------------------ */

.os-badge {
  display: inline-block;
  padding: 1.5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--os-border);
  color: var(--os-text-muted);
  background: var(--os-bg-soft);
}

.os-editions {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
  vertical-align: middle;
}

.os-badge--basic { color: #2b6cb0; border-color: color-mix(in srgb, #2b6cb0 35%, transparent); background: color-mix(in srgb, #2b6cb0 8%, transparent); }
.os-badge--pro { color: #7048c4; border-color: color-mix(in srgb, #7048c4 35%, transparent); background: color-mix(in srgb, #7048c4 8%, transparent); }
.os-badge--premium { color: var(--os-orange-dark); border-color: color-mix(in srgb, var(--os-orange) 40%, transparent); background: color-mix(in srgb, var(--os-orange) 10%, transparent); }
.os-badge--community { color: #2f855a; border-color: color-mix(in srgb, #2f855a 35%, transparent); background: color-mix(in srgb, #2f855a 8%, transparent); }

/* frame ------------------------------------------------------------------- */

.os-frame {
  margin: 0 0 22px;
}

.os-frame__inner {
  padding: 8px;
  overflow: hidden;
  background: var(--os-bg-sunk);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
}

.os-frame__caption {
  margin-top: 7px;
  font-size: 12.8px;
  color: var(--os-text-faint);
  text-align: center;
}

/* --------------------------------------------------------- AI actions ---- */

.os-ai {
  position: relative;
  flex-shrink: 0;
}

.os-ai__split {
  display: flex;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: 8px;
  box-shadow: var(--os-shadow-sm);
}

.os-ai__primary,
.os-ai__caret {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12.8px;
  font-weight: 550;
  color: var(--os-text-muted);
  cursor: pointer;
  background: none;
  border: 0;
}

.os-ai__primary {
  border-radius: 7px 0 0 7px;
}

.os-ai__caret {
  padding: 5px 6px;
  border-left: 1px solid var(--os-border);
  border-radius: 0 7px 7px 0;
}

.os-ai__primary:hover,
.os-ai__caret:hover {
  color: var(--os-text);
  background: var(--os-bg-sunk);
}

.os-ai__icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.os-ai__icon--trail {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: var(--os-text-faint);
}

.os-ai__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  width: 296px;
  padding: 5px;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  box-shadow: var(--os-shadow-lg);
}

.os-ai__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 8px 9px;
  font-family: inherit;
  color: var(--os-text);
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 7px;
}

.os-ai__item:hover {
  background: var(--os-bg-sunk);
}

.os-ai__item .os-ai__icon {
  margin-top: 2px;
  color: var(--os-text-muted);
}

.os-ai__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.os-ai__text strong {
  font-size: 13.2px;
  font-weight: 600;
}

.os-ai__text em {
  font-size: 11.8px;
  font-style: normal;
  line-height: 1.4;
  color: var(--os-text-faint);
}

.os-ai__divider {
  height: 1px;
  margin: 4px 8px;
  background: var(--os-border-soft);
}

/* ---------------------------------------------------------------- TOC ---- */

.os-toc {
  position: sticky;
  top: calc(var(--os-top-h) + var(--os-tabs-h));
  max-height: calc(100vh - var(--os-top-h) - var(--os-tabs-h));
  padding: 32px 0 48px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.os-toc__title {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--os-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.os-toc__list {
  padding: 0;
  margin: 0;
  list-style: none;
  border-left: 1px solid var(--os-border);
}

.os-toc__link {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--os-text-muted);
  border-left: 1px solid transparent;
}

.os-toc__link:hover {
  color: var(--os-text);
}

.os-toc__link.is-active {
  font-weight: 550;
  color: var(--os-orange);
  border-left-color: var(--os-orange);
}

.os-toc__link--d3 {
  padding-left: 24px;
  font-size: 12.6px;
}

/* -------------------------------------------------------------- pager ---- */

.os-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 52px;
}

.os-pager__link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.os-pager__link:hover {
  border-color: var(--os-orange);
  box-shadow: var(--os-shadow-sm);
}

.os-pager__link--next {
  text-align: right;
}

.os-pager__dir {
  font-size: 11.5px;
  color: var(--os-text-faint);
}

.os-pager__title {
  font-size: 14.2px;
  font-weight: 600;
  color: var(--os-orange);
}

.os-doc__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 36px;
  font-size: 13px;
  color: var(--os-text-faint);
}

.os-doc__foot a:hover {
  color: var(--os-orange);
  text-decoration: underline;
}

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

.os-search__trigger {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13.2px;
  color: var(--os-text-faint);
  cursor: pointer;
  background: var(--os-bg-soft);
  border: 1px solid var(--os-border);
  border-radius: 8px;
}

.os-search__trigger:hover {
  border-color: var(--os-text-faint);
}

.os-search__trigger svg {
  width: 15px;
  height: 15px;
}

.os-search__trigger kbd {
  padding: 1px 5px;
  margin-left: auto;
  font-size: 10.5px;
  border: 1px solid var(--os-border);
  border-radius: 4px;
}

.os-search__trigger span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.os-search__overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgb(20 18 17 / 45%);
  backdrop-filter: blur(3px);
}

.os-search__panel {
  width: 100%;
  max-width: 620px;
  max-height: 68vh;
  overflow: hidden;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  box-shadow: var(--os-shadow-lg);
  display: flex;
  flex-direction: column;
}

.os-search__field {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid var(--os-border);
}

.os-search__field svg {
  width: 17px;
  height: 17px;
  color: var(--os-text-faint);
}

.os-search__field input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--os-text);
  background: none;
  border: 0;
  outline: none;
}

.os-search__field button {
  padding: 2px 7px;
  font-family: inherit;
  font-size: 11px;
  color: var(--os-text-faint);
  cursor: pointer;
  background: var(--os-bg-soft);
  border: 1px solid var(--os-border);
  border-radius: 5px;
}

.os-search__results {
  padding: 6px;
  overflow-y: auto;
}

.os-search__hint {
  padding: 18px 12px;
  margin: 0;
  font-size: 13.2px;
  color: var(--os-text-faint);
  text-align: center;
}

.os-search__hint kbd {
  padding: 1px 5px;
  border: 1px solid var(--os-border);
  border-radius: 4px;
}

.os-search__hint a {
  color: var(--os-orange);
  text-decoration: underline;
}

.os-search__result {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 8px;
}

.os-search__result.is-active {
  background: var(--os-bg-sunk);
}

.os-search__tab {
  flex-shrink: 0;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--os-text-muted);
  background: var(--os-bg-soft);
  border: 1px solid var(--os-border);
  border-radius: 20px;
}

.os-search__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.os-search__body strong {
  font-size: 13.8px;
  font-weight: 600;
}

.os-search__body em {
  overflow: hidden;
  font-size: 12.4px;
  font-style: normal;
  line-height: 1.45;
  color: var(--os-text-faint);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* --------------------------------------------------------- guide home ---- */

.os-home__main {
  max-width: 1080px;
  padding: 0 24px;
  margin: 0 auto;
}

.os-hero {
  padding: 72px 0 44px;
  text-align: center;
}

.os-hero__eyebrow {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--os-orange);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.os-hero h1 {
  margin: 0 0 14px;
  font-size: 46px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.os-hero__lede {
  max-width: 620px;
  margin: 0 auto 30px;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--os-text-muted);
}

.os-hero__search {
  max-width: 520px;
  margin: 0 auto 16px;
}

.os-hero__meta {
  margin: 0;
  font-size: 13px;
  color: var(--os-text-faint);
}

.os-hero__meta code {
  padding: 1px 5px;
  font-size: 12px;
  background: var(--os-bg-sunk);
  border-radius: 4px;
}

.os-hero__meta a {
  color: var(--os-orange);
  text-decoration: underline;
}

.os-home__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}

.os-home__card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.os-home__card:hover {
  border-color: var(--os-orange);
  box-shadow: var(--os-shadow-md);
  transform: translateY(-2px);
}

.os-home__eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--os-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.os-home__card h2 {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.os-home__card > p {
  margin: 0 0 14px;
  font-size: 14.2px;
  color: var(--os-text-muted);
}

.os-home__card ul {
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.os-home__card li {
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--os-text-muted);
  position: relative;
}

.os-home__card li::before {
  position: absolute;
  left: 0;
  color: var(--os-orange);
  content: '›';
  font-weight: 700;
}

.os-home__go {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  font-size: 13.8px;
  font-weight: 600;
  color: var(--os-orange);
}

.os-home__go svg {
  width: 15px;
  height: 15px;
  transition: transform 0.15s;
}

.os-home__card:hover .os-home__go svg {
  transform: translateX(3px);
}

.os-home__strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 26px;
  margin-bottom: 64px;
  background: var(--os-bg-soft);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
}

.os-home__strip h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
}

.os-home__strip p {
  margin: 0 0 10px;
  font-size: 13.8px;
  color: var(--os-text-muted);
}

.os-home__link {
  font-size: 13.8px;
  font-weight: 600;
  color: var(--os-orange);
}

.os-home__link:hover {
  text-decoration: underline;
}

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


@media (max-width: 1180px) {
  .os-shell__toc {
    display: none;
  }
}

@media (max-width: 980px) {
  .os-top__links {
    display: none;
  }

  .os-top__burger {
    display: flex;
  }

  .os-shell__side {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    height: 100vh;
    background: var(--os-bg);
    border-right: 1px solid var(--os-border);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .os-shell__side.is-open {
    transform: translateX(0);
  }

  .os-shell__side-inner {
    top: 0;
    max-height: 100vh;
    padding-top: 20px;
  }

  .os-shell__scrim {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: block;
    cursor: pointer;
    background: rgb(20 18 17 / 45%);
    border: 0;
  }

  .os-home__grid,
  .os-home__strip {
    grid-template-columns: 1fr;
  }

  .os-hero h1 {
    font-size: 34px;
  }
}

@media (max-width: 720px) {
  .os-doc__title {
    font-size: 27px;
  }

  .os-cards[data-cols='2'],
  .os-cards[data-cols='3'] {
    grid-template-columns: 1fr;
  }

  .os-pager {
    grid-template-columns: 1fr;
  }

  .os-top__cta {
    display: none;
  }

  .os-search__trigger kbd {
    display: none;
  }

  .os-ai__text em {
    display: none;
  }
}

@media (max-width: 560px) {
  .os-search__trigger span {
    display: none;
  }

  .os-search__trigger {
    justify-content: center;
  }

  .os-top__logo {
    height: 26px;
  }
}

/* ============================================================ API panel ==== */

/*
 * Endpoint pages run two columns: prose and parameter tables on the left, a
 * sticky request/response panel on the right in place of the table of
 * contents. The panel is generated from the OpenAPI spec, so it cannot drift
 * from the parameters beside it.
 */

.os-doc--api {
  max-width: 640px;
}

.os-shell__toc--api {
  flex: 0 0 420px;
  width: 420px;
}

.os-api {
  position: sticky;
  top: calc(var(--os-top-h) + var(--os-tabs-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - var(--os-top-h) - var(--os-tabs-h) - 48px);
  padding: 28px 0 32px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.os-api__panel {
  overflow: hidden;
  background: var(--os-code-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
}

.os-api__bar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px 5px 6px;
  background: var(--os-bg-soft);
  border-bottom: 1px solid var(--os-border-soft);
}

.os-api__tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.os-api__tabs::-webkit-scrollbar {
  display: none;
}

.os-api__tab {
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 550;
  color: var(--os-text-muted);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 6px;
}

.os-api__tab:hover {
  color: var(--os-text);
  background: var(--os-bg-sunk);
}

.os-api__tab.is-active {
  color: var(--os-text);
  background: var(--os-bg);
  box-shadow: inset 0 0 0 1px var(--os-border);
}

.os-api__title {
  padding-left: 6px;
  font-size: 12.2px;
  font-weight: 600;
  color: var(--os-text-muted);
}

.os-api__copy {
  flex-shrink: 0;
  padding: 3px 9px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--os-text-muted);
  cursor: pointer;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: 6px;
}

.os-api__copy:hover {
  color: var(--os-text);
  border-color: var(--os-text-faint);
}

.os-api__endpoint {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  margin: 0;
  border-bottom: 1px solid var(--os-border-soft);
}

.os-api__endpoint code {
  font-size: 12.2px;
  overflow-wrap: anywhere;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
}

.os-api__method {
  flex-shrink: 0;
  padding: 2px 7px;
  font-family: var(--os-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border-radius: 4px;
}

.os-api__method--get { background: #2f855a; }
.os-api__method--post { background: #2b6cb0; }
.os-api__method--put { background: #b7791f; }
.os-api__method--patch { background: #805ad5; }
.os-api__method--delete { background: #c53030; }

.os-api__code {
  /* An exact multiple of the line box, so the panel never clips a line through
     the middle the way a vh-based height does. */
  max-height: calc(1.6em * 22);
  padding: 13px 15px;
  margin: 0;
  overflow: auto;
  font-size: 12.4px;
  line-height: 1.6;
  color: var(--os-code-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.os-api__code code {
  font-size: inherit;
  background: none;
  border: 0;
}

/* Below the two-column breakpoint the panel drops under the prose. */
@media (max-width: 1180px) {
  .os-shell__toc--api {
    display: block;
    flex: 1 1 auto;
    width: auto;
  }

  .os-doc--api {
    max-width: 760px;
  }

  .os-shell__main:has(.os-shell__toc--api) {
    flex-direction: column;
    gap: 0;
  }

  .os-api {
    position: static;
    max-height: none;
    padding-top: 0;
  }

  .os-api__code {
    max-height: none;
  }
}
