:root {
  color-scheme: light;
  --bg: var(--brand-background);
  --surface: var(--brand-card);
  --raised: var(--brand-muted);
  --text: var(--brand-foreground);
  /* Long-form documentation needs stronger contrast than small app metadata. */
  --muted: color-mix(in srgb, var(--brand-foreground) 78%, var(--brand-background));
  --line: var(--brand-border);
  --accent: var(--brand-primary);
  --accent-ink: var(--brand-primary-foreground);
  --code: var(--brand-card);
  --link: var(--brand-foreground);
  --shadow: var(--brand-shadow-xl);
  font-family: var(--brand-font-sans);
  font-size: 16px;
  line-height: 1.65;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
main p a,
main li a,
main td a,
.callout a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--brand-coral);
  text-underline-offset: 3px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand-ring);
  outline-offset: 4px;
}
button {
  color: inherit;
}
button:disabled {
  cursor: default;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 16px;
}
.skip-link:focus {
  top: 8px;
}
.topbar {
  height: 78px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  border-bottom: 2px solid var(--line);
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand strong {
  font-family: var(--brand-font-display);
  font-size: 22px;
  letter-spacing: -0.5px;
}
.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: none;
}
.logo-dark,
:root[data-theme='dark'] .logo-light {
  display: none;
}
:root[data-theme='dark'] .logo-dark {
  display: block;
}
.brand-divider {
  color: var(--line);
  font-size: 24px;
  padding: 0 5px;
}
.search-trigger {
  margin-left: auto;
  max-width: 380px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: calc(var(--brand-radius) - 4px);
  padding: 8px 12px;
  text-align: left;
  font-size: 14px;
}
.search-trigger > span {
  font-size: 22px;
  line-height: 1;
}
.search-trigger kbd {
  margin-left: auto;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  white-space: nowrap;
}
.top-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.account-link {
  font-size: 14px;
  white-space: nowrap;
  color: var(--text);
}
.icon-button {
  border: 2px solid var(--line);
  border-radius: calc(var(--brand-radius) - 4px);
  background: var(--surface);
  min-width: 36px;
  min-height: 36px;
  padding: 2px 9px;
}
.icon-button:hover {
  background: var(--raised);
}
.mobile-only {
  display: none;
}
.layout {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  max-width: 1700px;
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: 78px;
  height: calc(100vh - 78px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--brand-sidebar);
  padding: 27px 20px;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.version-pill {
  border: 2px solid var(--line);
  border-radius: calc(var(--brand-radius) - 4px);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  margin-bottom: 26px;
}
.version-pill > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent-ink);
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.nav-group {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 1.1px;
  color: var(--muted);
  margin: 25px 10px 8px;
}
.nav-group:first-child {
  margin-top: 0;
}
nav > a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: calc(var(--brand-radius) - 6px);
  line-height: 1.5;
  margin: 2px 0;
}
nav > a:hover {
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}
nav > a[aria-current='page'] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--line);
  font-weight: 600;
  box-shadow: var(--brand-shadow-xs);
}
.sidebar-footer {
  border-top: 1px solid var(--line);
  padding: 20px 10px 4px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-footer a {
  color: var(--text);
}
.sidebar-footer span {
  font-size: 12px;
  color: var(--muted);
}
.workspace {
  min-width: 0;
  padding: 24px 46px 0;
}
.notice {
  border: 2px solid var(--line);
  background: var(--brand-accent);
  border-radius: calc(var(--brand-radius) - 4px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 10px 14px;
  color: var(--muted);
  max-width: 1100px;
  margin: 0 auto;
}
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 158px;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
}
main {
  padding: 48px 0 36px;
  min-width: 0;
}
main:focus {
  outline: none;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 12px;
}
h1,
h2,
h3 {
  font-family: var(--brand-font-display);
}
h1 {
  font-size: 42px;
  letter-spacing: -1.6px;
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 700;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.6px;
  line-height: 1.3;
  margin: 44px 0 16px;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  margin: 24px 0 10px;
}
.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: 26px;
}
p {
  margin: 14px 0;
  color: var(--muted);
}
strong {
  color: var(--text);
}
ul,
ol {
  padding-left: 23px;
  color: var(--muted);
}
li {
  margin: 7px 0;
}
code {
  font-family: var(--brand-font-mono);
  font-size: 0.87em;
  overflow-wrap: anywhere;
}
p code,
li code,
td code {
  background: var(--raised);
  color: var(--text);
  padding: 2px 5px;
  border-radius: 4px;
}
pre {
  margin: 0;
  padding: 22px;
  overflow: auto;
  line-height: 1.8;
  color: var(--text);
  font-size: 14px;
  tab-size: 2;
}
pre code {
  font-size: inherit;
  overflow-wrap: normal;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  border-radius: calc(var(--brand-radius) - 4px);
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--line);
  box-shadow: var(--brand-shadow-sm);
}
.button:hover {
  text-decoration: none;
  box-shadow: var(--brand-shadow-md);
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--line);
}
.secondary {
  background: var(--surface);
  color: var(--text);
}
.code-card {
  background: var(--code);
  border: 2px solid var(--line);
  border-radius: var(--brand-radius);
  box-shadow: var(--brand-shadow);
  overflow: hidden;
  margin: 24px 0;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 7px 14px;
  background: var(--raised);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.code-header button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  padding: 3px 8px;
}
.code-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.code-tabs button {
  border: 0;
  padding: 6px 9px;
  font-size: 13px;
}
.code-tabs button[aria-selected='true'] {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}
.example-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font: 12px var(--brand-font-mono);
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.full-example pre {
  max-height: 560px;
}
.syntax-keyword {
  color: #923455;
  font-weight: 600;
}
.syntax-string {
  color: #326342;
}
.syntax-number {
  color: #885000;
}
.syntax-comment {
  color: var(--muted);
  font-style: italic;
}
:root[data-theme='dark'] .syntax-keyword {
  color: var(--brand-coral);
}
:root[data-theme='dark'] .syntax-string {
  color: var(--brand-mint);
}
:root[data-theme='dark'] .syntax-number {
  color: var(--accent);
}
.docs-toolbar {
  display: flex;
  justify-content: flex-end;
  max-width: 1100px;
  margin: 0 auto 16px;
}
.docs-toolbar .button {
  gap: 8px;
}
#copy-docs-fallback textarea {
  width: 100%;
  min-height: 260px;
  font: 14px var(--brand-font-mono);
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  border: 1px solid var(--line);
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.card {
  border: 2px solid var(--line);
  border-radius: var(--brand-radius);
  box-shadow: var(--brand-shadow);
  background: var(--surface);
  padding: 24px;
  color: var(--text);
}
.card:hover {
  box-shadow: var(--brand-shadow-lg);
  text-decoration: none;
}
.card h3 {
  margin: 12px 0 8px;
}
.card p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 16px;
}
.card-icon {
  color: var(--accent-ink);
  background: var(--brand-mint);
  border: 2px solid var(--line);
  border-radius: calc(var(--brand-radius) - 4px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
}
.card:nth-child(even) .card-icon {
  background: var(--brand-coral);
}
.card-arrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--link);
}
.toc {
  position: sticky;
  top: 118px;
  align-self: start;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
}
.toc > span {
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 7px;
}
.toc a {
  color: var(--muted);
  line-height: 1.6;
}
.toc a:hover {
  color: var(--text);
}
.page-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  max-width: 1100px;
  margin: 0 auto;
}
.page-footer > a {
  margin-left: auto;
  color: var(--muted);
}
.callout {
  padding: 17px 20px;
  margin: 24px 0;
  border: 2px solid var(--line);
  box-shadow: inset 5px 0 var(--accent);
  background: var(--surface);
  border-radius: calc(var(--brand-radius) - 4px);
  font-size: 14px;
  color: var(--muted);
}
.callout strong {
  display: block;
  margin-bottom: 3px;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 2px solid var(--line);
  border-radius: calc(var(--brand-radius) - 4px);
  background: var(--surface);
  margin: 20px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}
th {
  background: var(--raised);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td {
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
.method {
  font: 600 12px/1.5 var(--brand-font-mono);
  letter-spacing: 0.3px;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-ink);
  background: var(--brand-mint);
  flex: none;
}
.method.post {
  background: var(--brand-coral);
}
.endpoint-title {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: calc(var(--brand-radius) - 4px);
  padding: 12px 15px;
  background: var(--surface);
  font-size: 15px;
  overflow-wrap: anywhere;
  margin: 22px 0;
}
.field-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.required {
  color: var(--link);
}
.diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 22px 0;
}
.diagram span {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font: 14px var(--brand-font-mono);
  padding: 10px 12px;
}
.diagram b {
  font-weight: 400;
  color: var(--muted);
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 48px;
  font-size: 14px;
}
.pager a {
  max-width: 48%;
}
.pager span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}
details {
  border: 2px solid var(--line);
  border-radius: calc(var(--brand-radius) - 4px);
  background: var(--surface);
  padding: 14px 18px;
  margin: 14px 0;
}
summary {
  cursor: pointer;
  font-size: 15px;
}
details .table-wrap {
  margin-bottom: 0;
}
.section-heading > a {
  opacity: 0;
  margin-left: 8px;
  font-size: 16px;
}
.section-heading:hover > a,
.section-heading > a:focus {
  opacity: 1;
}
dialog {
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--brand-radius);
  padding: 22px;
  width: min(640px, calc(100vw - 32px));
  max-height: 80vh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #241c14b3;
  backdrop-filter: blur(4px);
}
.search-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-weight: 600;
}
#search-input {
  background: var(--bg);
  border: 2px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
}
#search-results {
  max-height: 45vh;
  overflow: auto;
  margin: 16px 0;
}
#search-results a {
  display: block;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
}
#search-results a:hover,
#search-results a:focus {
  border-color: var(--line);
  background: var(--raised);
  text-decoration: none;
}
#search-results small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.search-help {
  font-size: 12px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: calc(var(--brand-radius) - 4px);
  border: 2px solid var(--line);
  box-shadow: var(--brand-shadow);
  padding: 8px 18px;
  font-size: 14px;
  z-index: 100;
  display: none;
}
#toast.visible {
  display: block;
}
.noscript {
  position: fixed;
  bottom: 0;
  background: var(--surface);
  padding: 12px;
  width: 100%;
}
.not-found {
  padding: 20px;
  border: 1px solid var(--line);
}
.download-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
@media (min-width: 1700px) {
  .sidebar {
    border-left: 1px solid var(--line);
  }
}
@media (max-width: 1200px) {
  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
  .workspace {
    padding: 24px 38px 0;
  }
  .topbar {
    gap: 22px;
  }
  .search-trigger {
    max-width: 310px;
  }
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    padding: 22px 12px;
  }
  .workspace {
    padding: 20px 25px 0;
  }
  .brand-divider {
    display: none;
  }
  .topbar {
    padding: 0 22px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 36px;
  }
  .search-trigger kbd {
    display: none;
  }
  .top-actions {
    gap: 12px;
  }
}
@media (max-width: 640px) {
  .topbar {
    height: 64px;
    padding: 0 16px;
    gap: 12px;
  }
  .brand strong {
    font-size: 16px;
  }
  .brand-logo {
    width: 44px;
    height: 44px;
  }
  .search-trigger {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 6px;
    overflow: hidden;
    font-size: 0;
    margin-left: auto;
    display: block;
    text-align: center;
  }
  .search-trigger > span {
    font-size: 23px;
  }
  .account-link {
    display: none;
  }
  .top-actions {
    gap: 8px;
  }
  .mobile-only {
    display: block;
  }
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    width: min(310px, 90vw);
    height: calc(100dvh - 64px);
    z-index: 19;
    background: var(--brand-sidebar);
    box-shadow: var(--shadow);
    padding: 24px;
  }
  .sidebar.open {
    display: flex;
  }
  .workspace {
    padding: 16px 20px 0;
  }
  .notice {
    font-size: 12px;
    align-items: flex-start;
  }
  .notice .status-dot {
    margin-top: 7px;
  }
  main {
    padding-top: 32px;
  }
  h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }
  .lead {
    font-size: 17px;
  }
  h2 {
    font-size: 23px;
  }
  .hero-actions {
    gap: 9px;
  }
  .button {
    gap: 12px;
    padding: 9px 13px;
    font-size: 13px;
  }
  .code-header {
    padding: 8px 10px;
  }
  .code-tabs {
    gap: 0;
  }
  .code-tabs button {
    padding: 5px 7px;
  }
  pre {
    padding: 16px;
    font-size: 13px;
  }
  .page-footer {
    gap: 12px;
  }
  .page-footer > a {
    margin-left: 0;
  }
  .table-wrap {
    margin: 16px 0;
  }
  th,
  td {
    padding: 11px 12px;
  }
  .section-heading > a {
    opacity: 1;
  }
  html {
    scroll-padding-top: 82px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  a,
  button {
    transition:
      background 0.12s,
      border-color 0.12s;
  }
}
@media (max-width: 400px) {
  .brand strong {
    display: none;
  }
}
@media print {
  .sidebar,
  .topbar,
  .toc,
  .notice,
  .hero-actions,
  .pager,
  .page-footer,
  dialog {
    display: none;
  }
  .layout,
  .content-layout {
    display: block;
  }
  .workspace {
    padding: 0;
  }
  :root {
    --bg: #fff;
    --text: #000;
    --muted: #333;
    --surface: #fff;
    --code: #eee;
    --line: #ccc;
    --link: #000;
  }
  pre {
    white-space: pre-wrap;
  }
  main {
    padding: 0;
  }
}
