/* SMeet Bot API documentation, /docs/bots/.
   The palette, fonts and spacing follow landing/assets/site.css so the docs read as part of the
   same site: warm off-white ground, ink greys, the blue of links and the purple accent, Instrument
   Sans for text and JetBrains Mono for code. One light theme, as on the landing pages.
   Phones: nothing may widen the page. Tables and code scroll inside their own box, long tokens in
   running text wrap, and the section menu folds into a <details> element. */

:root {
  --ink: #0c1116;
  --ink-2: #3c4653;
  --ink-3: #5b6672;
  --muted: #6b7480;
  --bg: #fbfaf9;
  --surface: #ffffff;
  --surface-2: #f6f5f3;
  --line: #e8e6e2;
  --line-soft: #f0eeeb;
  --accent: #6c3fc4;
  --accent-soft: rgba(108, 63, 196, 0.07);
  --link: #1f6fd0;
  --ok: #2f7d4f;
  --night: #12161c;
  --night-2: #1b2029;
  --night-line: #2a313c;
  --night-ink: #e6ebf1;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gut: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --head: 60px;
  --r-sm: 8px;
  --r-md: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(0.9375rem, 0.9rem + 0.2vw, 1.03125rem)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(108, 63, 196, 0.18); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; color: #fff; }

/* ---- Header -------------------------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 250, 249, 0.9);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--head);
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gut);
}
.top__brand, .choose__brand, .foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: 1.0625rem;
}
.top__brand:hover { color: var(--ink); text-decoration: none; }
.top__brand img, .choose__brand img, .foot__brand img { width: 26px; height: 18px; display: block; }
.top__product {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.top__nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top__nav a {
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}
.top__nav a:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
.top__nav .top__lang { border: 1px solid var(--line); background: var(--surface); }
/* On a phone the header keeps the brand and the language switch; the product page stays in the footer. */
@media (max-width: 479px) {
  .top__nav a:not(.top__lang) { display: none; }
}

/* ---- Layout -------------------------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gut);
}
.main { min-width: 0; padding: 28px 0 56px; }

.side { display: none; }
.side__title {
  margin: 0 0 8px;
  color: var(--muted);
  font: 500 0.6875rem/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.side__list, .side__toc { list-style: none; margin: 0 0 22px; padding: 0; }
.side__list a, .side__toc a {
  display: block;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.35;
}
.side__list a:hover, .side__toc a:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
.side__list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side__toc a { font-size: 0.875rem; color: var(--ink-3); }
.side__toc code { font-size: 0.8125rem; }

.menu {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.menu > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style-position: inside;
}
.menu[open] > summary { border-bottom: 1px solid var(--line-soft); }
.menu > .side__title { margin: 14px 16px 6px; }
.menu > .side__list, .menu > .side__toc { margin: 0 8px 12px; }

@media (min-width: 960px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); column-gap: clamp(28px, 3vw, 56px); }
  .side {
    display: block;
    position: sticky;
    top: var(--head);
    align-self: start;
    max-height: calc(100vh - var(--head));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 4px 28px 0;
  }
  .menu { display: none; }
}

/* ---- Text ---------------------------------------------------------------------------------- */

.prose { max-width: 820px; overflow-wrap: break-word; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--link);
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.prose h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.lede { margin: 0 0 28px; color: var(--ink-3); font-size: clamp(1.03rem, 0.98rem + 0.3vw, 1.1875rem); max-width: 40em; }
.prose h2 {
  margin: 48px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.prose h3 { margin: 34px 0 10px; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.prose h4 { margin: 22px 0 8px; font-size: 1rem; color: var(--ink-2); }
.prose h2, .prose h3, .prose h4 { position: relative; }
.anchor {
  margin-left: 8px;
  color: var(--muted);
  font-weight: 400;
  opacity: 0;
  text-decoration: none;
}
.prose :is(h2, h3, h4):hover .anchor, .anchor:focus { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin: 6px 0; }
.prose strong { font-weight: 600; }

.prose code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--line-soft);
  color: var(--ink-2);
  font: 400 0.875em/1.4 var(--mono);
  overflow-wrap: anywhere;
}
.prose a code { color: inherit; }
/* Method and type names as headings: heading-sized monospace, not an inline chip. */
.prose :is(h2, h3) > code { padding: 0; background: none; color: inherit; font-size: 0.92em; font-weight: 600; }

.note {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--accent-soft);
}
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

/* ---- Code blocks --------------------------------------------------------------------------- */

.code {
  margin: 0 0 18px;
  border: 1px solid var(--night-line);
  border-radius: var(--r-md);
  background: var(--night);
  overflow: hidden;
}
.code__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--night-line);
  background: var(--night-2);
  color: #9aa6b4;
  font: 500 0.75rem/1.3 var(--mono);
}
.code__file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c3ccd6; }
.code__copy {
  margin-left: auto;
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--night-line);
  border-radius: 6px;
  background: transparent;
  color: #c3ccd6;
  font: inherit;
  cursor: pointer;
}
.code__copy:hover { background: #262d38; color: #fff; }
.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  color: var(--night-ink);
  font: 400 0.84375rem/1.6 var(--mono);
  tab-size: 4;
}
.code pre code { padding: 0; background: none; color: inherit; font: inherit; overflow-wrap: normal; }

/* ---- Tables -------------------------------------------------------------------------------- */

.table-wrap {
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table-wrap th, .table-wrap td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.table-wrap thead th {
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap td code { overflow-wrap: normal; white-space: nowrap; }
.table-wrap td:last-child code { white-space: normal; overflow-wrap: anywhere; }
.table-wrap table.fields td:first-child, .table-wrap table.codes td:first-child, .table-wrap table.methods td:first-child { white-space: nowrap; }
.table-wrap tr.group th {
  padding-top: 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
}
.table-wrap tr.group th span { margin-left: 10px; color: var(--muted); font-weight: 400; }
.table-wrap tr:target td { background: var(--accent-soft); }

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

.contract {
  margin: 28px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.contract p { margin: 0 0 6px; }
.contract p:last-child { margin: 0; }
.method-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.verb {
  padding: 2px 8px;
  border-radius: 6px;
  color: #fff;
  font: 600 0.75rem/1.5 var(--mono);
  letter-spacing: 0.04em;
}
.verb--get { background: var(--link); }
.verb--post { background: var(--accent); }
.method-tag {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.method-summary { font-weight: 500; }
.hint { color: var(--ink-3); font-size: 0.9375rem; }

/* ---- Pager and footer ---------------------------------------------------------------------- */

.pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-width: 820px;
  margin-top: 48px;
}
@media (min-width: 640px) { .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pager a {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
}
.pager a:hover { border-color: #d8d5cf; text-decoration: none; }
.pager span { color: var(--muted); font-size: 0.8125rem; }
.pager strong { font-weight: 600; }
.pager__next { text-align: right; grid-column: -2; }
.pager__prev span::before { content: "\2190\00a0"; }
.pager__next span::after { content: "\00a0\2192"; }

.foot { border-top: 1px solid var(--line); background: var(--bg); }
.foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px var(--gut) 36px;
}
.foot__brand { font-size: 0.9375rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.foot__links a { color: var(--ink-2); font-size: 0.9375rem; font-weight: 500; }
.foot__links a:hover { color: var(--accent); }

/* ---- Language choice at /docs/bots/ -------------------------------------------------------- */

.chooser { min-height: 100vh; display: grid; place-items: center; }
.choose { width: 100%; max-width: 560px; padding: 48px var(--gut); }
.choose h1 { margin: 18px 0 8px; font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); letter-spacing: -0.03em; }
.choose__lede { margin: 0 0 22px; color: var(--ink-3); }
.choose__list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.choose__list a {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
}
.choose__list a:hover { border-color: var(--accent); text-decoration: none; }
.choose__list strong { font-size: 1.125rem; }
.choose__list span { color: var(--muted); font-size: 0.9375rem; }
.choose__note { margin: 0 0 8px; color: var(--muted); font-size: 0.875rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .top, .side, .menu, .pager, .foot, .code__copy, .anchor { display: none !important; }
  .layout { display: block; }
  .code { border-color: var(--line); background: var(--surface); }
  .code pre { color: var(--ink); white-space: pre-wrap; }
}
