:root {
  --ink: #182335;
  --muted: #68758a;
  --line: #e5e9ef;
  --accent: #005baa;
  --accent-dark: #004780;
  --soft: #eef6fc;
  --panel: #f7f9fc;
  --bg: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  height: 72px;
  inset: 0 0 auto;
  justify-content: space-between;
  padding: 0 32px;
  position: fixed;
  z-index: 4;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: block;
  height: 32px;
  object-fit: contain;
  width: auto;
}

.brand-wordmark {
  display: block;
  filter: brightness(0);
  height: 12px;
  object-fit: contain;
  width: auto;
}

.tag {
  color: var(--muted);
  font-size: 13px;
  margin-left: 8px;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 16px;
}

.header-links {
  align-items: center;
  display: flex;
  gap: 14px;
  font-size: 13px;
  white-space: nowrap;
}

.search {
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  width: 290px;
}

.layout {
  padding-top: 72px;
}

.sidebar {
  border-right: 1px solid var(--line);
  bottom: 0;
  overflow: auto;
  padding: 24px 18px 35px;
  position: fixed;
  top: 72px;
  width: 265px;
}

.sidebar h3 {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
  margin: 24px 12px 8px;
  text-transform: uppercase;
}

.sidebar a {
  border-radius: 6px;
  color: #4c5a70;
  display: block;
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 12px;
}

.sidebar a.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 650;
}

.sidebar a:hover {
  background: #f4f6fa;
  text-decoration: none;
}

.docs-main {
  margin-left: 265px;
  margin-right: 195px;
  max-width: 1110px;
  min-height: 100vh;
  padding: 45px 48px 70px;
}

.docs-main--wide {
  margin: 0 auto;
  max-width: 1120px;
  padding: 112px 32px 70px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

h1 {
  font-size: 38px;
  letter-spacing: -1.1px;
  line-height: 1.18;
  margin: 15px 0 18px;
}

h2 {
  font-size: 21px;
  line-height: 1.4;
  margin: 36px 0 12px;
  scroll-margin-top: 95px;
}

h3 {
  font-size: 17px;
  margin: 28px 0 10px;
}

.intro {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 34px;
}

p {
  margin: 12px 0;
}

li {
  margin: 9px 0;
  padding-left: 5px;
}

ol,
ul {
  padding-left: 23px;
}

table {
  border-collapse: collapse;
  font-size: 14px;
  margin: 18px 0;
  width: 100%;
}

th,
td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel);
  font-weight: 650;
}

td:first-child {
  min-width: 135px;
}

code {
  background: #f0f3f7;
  border-radius: 4px;
  font-size: 0.9em;
  padding: 2px 5px;
}

pre {
  background: #101827;
  border-radius: 8px;
  color: #edf3fb;
  overflow-x: auto;
  padding: 18px;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

blockquote {
  border-left: 4px solid var(--accent);
  color: var(--muted);
  margin: 20px 0;
  padding: 1px 0 1px 16px;
}

.cards {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards > a,
.doc-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  display: block;
  padding: 21px;
}

.cards > a:hover,
.doc-card:hover {
  border-color: #8ab8dc;
  box-shadow: 0 5px 18px #213e7710;
  text-decoration: none;
}

.cards b,
.doc-card h2 {
  display: block;
  font-size: 17px;
  margin: 0 0 7px;
}

.cards span,
.doc-card p {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin: 0;
}

.toc {
  border-left: 1px solid var(--line);
  font-size: 12px;
  padding-left: 18px;
  position: fixed;
  right: 20px;
  top: 120px;
  width: 165px;
}

.toc b {
  display: block;
  margin-bottom: 12px;
}

.toc a {
  color: var(--muted);
  display: block;
  margin: 10px 0;
}

.pager {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 45px;
  padding-top: 23px;
}

.pager a {
  font-size: 14px;
  max-width: 48%;
}

.pager small {
  color: var(--muted);
  display: block;
  font-size: 11px;
}

.foot {
  color: var(--muted);
  font-size: 11px;
  margin-top: 35px;
}

.result {
  border-bottom: 1px solid var(--line);
  display: block;
  padding: 18px 0;
}

.result b {
  display: block;
  font-size: 18px;
}

.result span {
  color: var(--muted);
  font-size: 13px;
}

.menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: none;
  padding: 5px 10px;
}

.skip {
  left: -9999px;
  position: absolute;
}

.skip:focus {
  background: #fff;
  left: 10px;
  padding: 6px 10px;
  top: 5px;
  z-index: 10;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.print {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  color: var(--muted);
  padding: 25px 0;
}

.shot {
  margin: 22px 0;
}

.shot img {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  height: auto;
  max-width: 100%;
}

.shot figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}

.notice {
  background: var(--soft);
  border: 1px solid #c9deef;
  border-radius: 8px;
  padding: 14px 16px;
}

@media (min-width: 1600px) {
  .docs-main {
    margin-left: calc((100vw - 1400px) / 2 + 265px);
  }

  .sidebar {
    left: calc((100vw - 1400px) / 2);
  }

  .toc {
    right: calc((100vw - 1400px) / 2);
  }
}

@media (max-width: 1120px) {
  .toc {
    display: none;
  }

  .docs-main {
    margin-right: 0;
    padding: 35px;
  }
}

@media (max-width: 820px) {
  .site-header {
    gap: 10px;
    height: 65px;
    padding: 0 15px;
  }

  .tag,
  .header-links {
    display: none;
  }

  .brand-mark {
    height: 28px;
  }

  .brand-wordmark {
    height: 10px;
  }

  .search {
    width: min(42vw, 190px);
  }

  .menu {
    display: block;
  }

  .layout {
    padding-top: 65px;
  }

  .sidebar {
    background: #fff;
    box-shadow: 10px 0 25px #18233515;
    display: none;
    top: 65px;
    z-index: 3;
  }

  .sidebar.open {
    display: block;
  }

  .docs-main {
    margin: 0;
    padding: 30px 22px;
  }

  .docs-main--wide {
    padding: 95px 22px 50px;
  }

  h1 {
    font-size: 31px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  .site-header,
  .sidebar,
  .toc,
  .pager,
  .print,
  .foot {
    display: none;
  }

  .docs-main {
    margin: 0;
    max-width: none;
    padding: 0;
  }

  .layout {
    padding: 0;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    break-after: avoid;
  }

  table {
    font-size: 11px;
  }
}

/* External API v1 reference */
.v1-nav {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 8px 18px;
  margin: 0 0 28px;
  padding-bottom: 14px;
}

.v1-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.endpoint {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 18px;
}

.endpoint h3 code {
  font-size: 15px;
}

.method {
  background: #e7f0fa;
  border-radius: 4px;
  color: #213e77;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-right: 8px;
  padding: 2px 8px;
  vertical-align: 2px;
}

.method.post {
  background: #e8f6ee;
  color: #1d6b3a;
}

.method.patch {
  background: #fff4e0;
  color: #8a5300;
}

.method.put {
  background: #f1ecfb;
  color: #5a3aa0;
}

.method.delete {
  background: #fde8e8;
  color: #9b1c1c;
}

.scope-line {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 10px;
}
