/* `/docs/api` — design/design_handoff_api_reference/README.md, rebuilt as real markup. */

.api-ref {
  --api-ink: #181C32;
  --api-body: #4A4B68;
  --api-muted: #7E8299;
  --api-border: #E5E6EF;
  --api-divider: #F2F2F4;
  --api-surface: #FAFAFA;
  --api-brand: #0288D1;
  --api-interactive: #00A3FF;
  --api-tint: #F1FAFF;
  --api-tint-ring: #CDEBFF;
  --api-navy: #141D38;
  --api-navy-2: #1B2746;

  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  background: #fff;
  color: var(--api-body);
  font-family: 'Open Sans', system-ui, sans-serif;
}
.api-ref * { box-sizing: border-box; }
.api-ref a { color: var(--api-brand); text-decoration: none; }
.api-ref a:hover { color: var(--api-interactive); text-decoration: underline; }
.api-ref code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }

/* Sidebar */
.api-ref__sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 268px;
  height: 100vh;
  overflow-y: auto;
  background: var(--api-navy);
  color: #C9CFE3;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 40px;
  gap: 22px;
  z-index: 5;
}
.api-ref__brand { display: flex; flex-direction: column; gap: 10px; padding: 0 10px; }
.api-ref__brand img { height: 24px; width: auto; align-self: flex-start; display: block; }
.api-ref__brand-row { display: flex; align-items: center; gap: 8px; }
.api-ref__brand-name { font-size: 15px; font-weight: 700; color: #fff; }
.api-ref__v-pill { font-family: 'Roboto', sans-serif; font-size: 11px; font-weight: 500; color: #9FD8FF; background: rgba(0,163,255,.16); border-radius: 30px; padding: 2px 8px; }

.api-ref__nav { display: flex; flex-direction: column; gap: 2px; }
.api-ref__nav-label { font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7E87A8; padding: 0 10px 6px; }
.api-ref__nav-link {
  font-family: 'Poppins', sans-serif; font-size: 13px; color: #E4E8F5; padding: 7px 10px;
  border-radius: 6px; text-decoration: none;
}
.api-ref__nav-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.api-ref__group-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: 'Poppins', sans-serif; font-size: 13px; padding: 7px 10px; border-radius: 6px;
  text-decoration: none; color: #E4E8F5;
}
.api-ref__group-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.api-ref__group-link.is-active { background: rgba(0,163,255,.16); color: #fff; }
.api-ref__group-count { font-family: 'Roboto', sans-serif; font-size: 11px; color: #7E87A8; }

/* Mobile top bar */
.api-ref__mobile-bar {
  display: none;
  position: sticky; top: 0; z-index: 4;
  align-items: center; justify-content: space-between; gap: 12px;
  background: var(--api-navy); padding: 12px 20px;
}
.api-ref__mobile-bar img { height: 20px; width: auto; display: block; }
.api-ref__menu-btn {
  font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 500; height: 34px; padding: 0 14px;
  border-radius: 6px; border: 1px solid rgba(255,255,255,.24); background: transparent; color: #fff; cursor: pointer;
}

/* Content */
.api-ref__main { flex: 1 1 0; min-width: 0; }
.api-ref__content {
  max-width: 1240px; margin: 0 auto; padding: 56px clamp(20px,4vw,56px) 96px;
  display: flex; flex-direction: column; gap: 72px;
}

.api-ref__intro { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.api-ref__eyebrow { font-family: 'Roboto', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--api-brand); }
.api-ref__h1 { margin: 0; font-size: 40px; line-height: 48px; font-weight: 700; color: var(--api-ink); letter-spacing: -.01em; }
.api-ref__lead { margin: 0; font-size: 16px; line-height: 26px; color: var(--api-body); }
.api-ref__meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.api-ref__meta-label { font-family: 'Roboto', sans-serif; font-size: 13px; color: var(--api-muted); }
.api-ref__base-url { font-size: 13px; color: var(--api-ink); background: #F2F4F8; border-radius: 6px; padding: 6px 10px; box-shadow: inset 0 0 0 1px var(--api-border); }

.api-ref__h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; color: var(--api-ink); }
.api-ref__h3 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 700; color: var(--api-ink); }
.api-ref__section-intro { margin: 0; font-size: 15px; line-height: 24px; max-width: 760px; }
.api-ref__inline-code { font-size: 13px; color: var(--api-ink); background: #F2F4F8; border-radius: 4px; padding: 1px 5px; }

.api-ref__table-wrap { border-radius: 8px; box-shadow: inset 0 0 0 1px var(--api-border); overflow-x: auto; }
.api-ref__table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 21px; min-width: 560px; }
.api-ref__table thead tr { background: var(--api-surface); }
.api-ref__table th {
  text-align: left; padding: 10px 16px; font-family: 'Roboto', sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; color: var(--api-muted); border-bottom: 1px solid var(--api-border);
}
.api-ref__table td { padding: 11px 16px; border-top: 1px solid var(--api-divider); vertical-align: top; }
.api-ref__table--params th, .api-ref__table--params td { padding: 8px 14px 9px; font-size: 13.5px; line-height: 20px; }
.api-ref__table--params th { font-size: 11.5px; padding: 8px 14px; }
.api-ref__param-name { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; color: var(--api-ink); white-space: nowrap; }
.api-ref__param-type { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: #6473D9; white-space: nowrap; }
.api-ref__param-desc { color: var(--api-body); min-width: 200px; }

.api-ref__pill { font-family: 'Roboto', sans-serif; font-size: 11.5px; font-weight: 500; border-radius: 30px; padding: 2px 8px; white-space: nowrap; }
.api-ref__pill--req { background: #FDEBF0; color: #B3204A; }
.api-ref__pill--opt { background: var(--api-divider); color: #7E8299; }

.api-ref__auth-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; }
.api-ref__auth-card { border-radius: 8px; box-shadow: inset 0 0 0 1px var(--api-border); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.api-ref__auth-card-pill { align-self: flex-start; font-family: 'Roboto', sans-serif; font-size: 12px; font-weight: 500; border-radius: 30px; padding: 3px 10px; }
.api-ref__auth-card-title { font-size: 15px; font-weight: 600; color: var(--api-ink); }
.api-ref__auth-card-text { font-size: 14px; line-height: 21px; }

.api-ref__error-shape { max-width: 640px; background: var(--api-navy); border-radius: 8px; overflow: hidden; }
.api-ref__error-shape pre { margin: 0; padding: 16px 18px; font-size: 13px; line-height: 20px; white-space: pre-wrap; word-break: break-word; }

/* Group section */
.api-ref__group { display: flex; flex-direction: column; gap: 0; scroll-margin-top: 24px; }
.api-ref__group-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.api-ref__index {
  margin: 14px 0 32px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--api-border);
  display: flex; flex-direction: column; overflow: hidden;
}
.api-ref__index-row {
  display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 12px;
  padding: 10px 16px; border-top: 1px solid var(--api-divider); text-decoration: none; color: var(--api-ink);
}
.api-ref__index-row:first-child { border-top: none; }
.api-ref__index-row:hover { background: var(--api-tint); text-decoration: none; color: var(--api-brand); }
.api-ref__index-path { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.api-ref__index-name { font-size: 13px; color: var(--api-muted); text-align: right; }

.api-ref__method {
  justify-self: start; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11px;
  font-weight: 700; letter-spacing: .03em; border-radius: 4px; padding: 2px 7px;
}
.api-ref__method--lg { font-size: 12px; border-radius: 5px; padding: 3px 8px; }
.api-ref__method--GET { background: #E6F5FF; color: #0277B6; }
.api-ref__method--POST { background: #E7F7F1; color: #0E7A57; }
.api-ref__method--PATCH { background: #FFF0EB; color: #B5461F; }
.api-ref__method--DELETE { background: #FDEBF0; color: #B3204A; }

/* Endpoint article */
.api-ref__article {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; padding: 40px 0;
  border-top: 1px solid var(--api-border); scroll-margin-top: 16px; align-items: start;
}
.api-ref__ep-left { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.api-ref__ep-name { font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 500; color: var(--api-muted); }
.api-ref__ep-title {
  margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 18px; line-height: 26px;
  font-weight: 600; color: var(--api-ink); word-break: break-all;
}
.api-ref__ep-desc { margin: 0; font-size: 15px; line-height: 24px; color: var(--api-body); }
.api-ref__note { background: var(--api-tint); border-radius: 6px; box-shadow: inset 0 0 0 1px var(--api-tint-ring); padding: 10px 14px; font-size: 14px; line-height: 21px; color: #1F4A66; }

.api-ref__auth-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.api-ref__auth-label { font-family: 'Roboto', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--api-muted); }
.api-ref__auth-pill { font-family: 'Roboto', sans-serif; font-size: 12px; font-weight: 500; border-radius: 30px; padding: 3px 10px; }
.api-ref__auth-pill--user { background: #EFEDFF; color: #5A4BC4; }
.api-ref__auth-pill--key { background: #E6F5FF; color: #0277B6; }
.api-ref__auth-pill--none { background: var(--api-divider); color: #4A4B68; }
.api-ref__auth-text { font-size: 14px; color: var(--api-body); }

.api-ref__field-group { display: flex; flex-direction: column; gap: 8px; }
.api-ref__field-label { margin: 0; font-size: 14px; font-weight: 700; color: var(--api-ink); }
.api-ref__empty-note { font-size: 14px; color: var(--api-muted); }

.api-ref__ep-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 24px; }

/* Code panel */
.api-code { background: var(--api-navy); border-radius: 8px; overflow: hidden; box-shadow: 0 3px 13px rgba(20,29,56,.16); }
.api-code__bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; background: var(--api-navy-2); border-bottom: 1px solid rgba(255,255,255,.06); }
.api-code__label { font-family: 'Roboto', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: #AAB3CF; }
.api-code__chip { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 700; border-radius: 4px; padding: 1px 7px; }
.api-code__chip--ok { background: rgba(33,181,135,.18); color: #21B587; }
.api-code__chip--err { background: rgba(232,59,104,.2); color: #E83B68; }
.api-code__spacer { flex: 1; }
.api-code__copy {
  font-family: 'Roboto', sans-serif; font-size: 12px; font-weight: 500; height: 26px; padding: 0 10px;
  border-radius: 5px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #C9CFE3; cursor: pointer;
}
.api-code__copy:hover { background: rgba(255,255,255,.08); color: #fff; }
.api-code__pre {
  margin: 0; padding: 14px 16px 16px; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 19px; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto;
  color: #8D97B5;
}

.api-code__key { color: #7FD1FF; }
.api-code__str { color: #A8E6C9; }
.api-code__num { color: #FFB59E; }
.api-code__lit { color: #B7BDF5; }
.api-code__p { color: #8D97B5; }
.api-code__head { color: #E4E8F5; }
.api-code__hkey { color: #9FD8FF; }
.api-code__tag { color: #7FD1FF; }
.api-code__muted { color: #6E7899; }

.api-ref__footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px;
  border-top: 1px solid var(--api-border); font-family: 'Roboto', sans-serif; font-size: 12.5px; color: var(--api-muted);
}

@media (max-width: 1180px) {
  .api-ref__article { grid-template-columns: 1fr; }
  .api-ref__ep-right { position: static; top: auto; }
}
@media (max-width: 900px) {
  .api-ref__sidebar { display: none; }
  .api-ref__mobile-bar { display: flex; }
  .api-ref.is-menu-open .api-ref__sidebar {
    display: flex; position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 10;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.4);
  }
}
