:root {
  --brand: #2348ff;
  --ink: #17233c;
  --muted: #536277;
  --line: #e1e6ee;
  --surface: #f5f7fb;
  --header-height: 76px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: white;
  color-scheme: light;
  scrollbar-color: #a5b0c2 var(--surface);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
::selection {
  background: #dbe2ff;
  color: var(--ink);
}
a {
  color: var(--brand);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
input,
summary {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Strawford', 'Inter', sans-serif;
  font-weight: 500;
}
.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
}
.brand img {
  display: block;
  height: auto;
}
.brand span {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 24px;
  font-size: 14px;
  white-space: nowrap;
}
.header-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  height: 100%;
  align-items: center;
}
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  height: 100%;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.header-nav a[aria-current] {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.search-button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  min-height: 44px;
  min-width: 44px;
}
.search-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.skip-link {
  position: fixed;
  left: 24px;
  top: 12px;
  padding: 12px;
  background: white;
  z-index: 20;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.guide-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 760px) 192px;
  gap: 48px;
  max-width: 1392px;
  margin: auto;
  padding: 48px 32px;
}
.guide-sidebar,
.page-outline {
  align-self: start;
  position: sticky;
  top: calc(var(--header-height) + 32px);
  max-height: calc(100vh - var(--header-height) - 64px);
  overflow-y: auto;
}
.guide-menu summary {
  display: none;
}
.guide-sidebar nav a {
  display: block;
  padding: 12px 16px;
  margin: 2px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
}
.guide-sidebar nav a:hover {
  background: var(--surface);
  color: var(--ink);
}
.guide-sidebar nav a[aria-current] {
  color: var(--brand);
  background: #eef2ff;
  font-weight: 600;
}
.spec-download {
  display: block;
  margin: 24px 16px;
  font-size: 13px;
  text-decoration: none;
}
.guide-content {
  min-width: 0;
}
.guide-content article {
  max-width: 72ch;
}
article {
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
article h1 {
  font-size: clamp(30px, 2.8vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.guide-content article > p:first-of-type {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 36px;
}
article h2 {
  font-size: 28px;
  line-height: 1.3;
  margin: 48px 0 16px;
}
article h3 {
  font-size: 21px;
  line-height: 1.4;
  margin: 32px 0 12px;
}
article p,
article ul,
article ol {
  margin: 0 0 24px;
}
article li {
  margin: 8px 0;
}
article blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
}
article blockquote p:last-child {
  margin: 0;
}
article table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 14px;
}
article th,
article td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
article th {
  background: var(--surface);
  font-weight: 600;
}
article th:first-child,
article td:first-child {
  white-space: nowrap;
}
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}
article :not(pre) > code {
  padding: 2px 5px;
  background: var(--surface);
  border-radius: 4px;
}
article pre {
  margin: 24px 0;
  padding: 16px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9fc;
  line-height: 1.7;
  tab-size: 2;
}
article pre code {
  display: block;
  font-size: 13.5px;
  white-space: pre;
  overflow-wrap: normal;
}
.code-block {
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9fc;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 4px 12px 4px 20px;
  border-bottom: 1px solid var(--line);
  background: #eef2f8;
  color: var(--muted);
  font:
    500 12px 'Inter',
    sans-serif;
}
.code-block pre {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.code-block[data-language='text'] code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy-code {
  min-height: 36px;
  min-width: 64px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
}
.copy-code:hover {
  color: var(--brand);
  background: white;
}
.copy-code:focus-visible {
  outline-offset: 0;
}
.code-token-key,
.code-token-constant {
  color: #1e40af;
}
.code-token-string {
  color: #166534;
}
.code-token-keyword {
  color: #6d28d9;
}
.code-token-number {
  color: #9a3412;
}
.code-token-comment {
  color: var(--muted);
}
.permalink {
  color: var(--muted);
  font:
    14px 'Inter',
    sans-serif;
  text-decoration: none;
  margin-left: 8px;
  opacity: 0;
}
article :is(h2, h3):hover .permalink,
.permalink:focus-visible {
  opacity: 1;
}
article :is(h2, h3, h4) {
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.page-outline h2 {
  font:
    600 13px 'Inter',
    sans-serif;
  margin: 8px 0 16px;
}
.page-outline ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.page-outline a {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
  padding: 6px 0;
}
.page-outline a:hover {
  color: var(--brand);
}
.guide-footer {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 48px;
  font-size: 14px;
}
.guide-footer nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.api-content {
  min-height: calc(100vh - var(--header-height));
}
.reference-page {
  --scalar-custom-header-height: var(--header-height);
}
dialog {
  width: min(640px, calc(100% - 32px));
  padding: 28px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 24px 64px #17233c26;
  max-height: 80vh;
}
dialog::backdrop {
  background: #17233c66;
}
.search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.search-heading h2 {
  margin: 0;
  font-size: 24px;
}
.search-heading button {
  background: var(--surface);
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 12px;
}
#search-query {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  caret-color: var(--brand);
}
#search-query::placeholder {
  color: var(--muted);
}
#search-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
#search-results {
  padding: 0;
  margin: 0;
  list-style: none;
}
#search-results a {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
#search-results strong {
  display: block;
  font-size: 15px;
}
#search-results span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 6px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1199px) {
  .guide-layout {
    grid-template-columns: 200px minmax(0, 760px);
    gap: 36px;
    max-width: 1080px;
  }
  .page-outline {
    display: none;
  }
}
@media (max-width: 900px) {
  .brand span {
    display: none;
  }
  .site-header {
    gap: 24px;
    padding: 0 24px;
  }
}
@media (max-width: 760px) {
  .copy-code {
    min-height: 44px;
  }
  :root {
    --header-height: 68px;
  }
  .site-header {
    padding: 0 20px;
    gap: 16px;
  }
  .brand img {
    width: 108px;
  }
  .header-nav {
    gap: 16px;
  }
  .header-nav a {
    font-size: 12px;
  }
  .search-button {
    padding: 10px;
  }
  .search-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .guide-layout {
    display: block;
    padding: 20px;
  }
  .guide-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
    padding-bottom: 16px;
  }
  .guide-menu summary {
    display: list-item;
    min-height: 44px;
    padding: 12px 4px;
    color: var(--muted);
    font-size: 14px;
  }
  .spec-download {
    display: none;
  }
  article h1 {
    font-size: 32px;
  }
  article h2 {
    font-size: 26px;
  }
  .guide-content article > p:first-of-type {
    font-size: 17px;
  }
  article blockquote {
    padding: 16px;
  }
  article th,
  article td {
    padding: 12px;
  }
}
@media (max-width: 380px) {
  .site-header {
    padding: 0 12px;
    gap: 12px;
  }
  .brand img {
    width: 96px;
  }
  .header-nav {
    gap: 12px;
  }
}
