:root {
  --orange: #f4511e;
  --orange-dark: #c9370d;
  --orange-soft: #fff4ef;
  --ink: #171a24;
  --muted: #5f6673;
  --line: #e2e5e9;
  --surface: #f7f8fa;
  --code: #111827;
  --max-content: 760px;
  --topbar-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  flex: 0 0 224px;
  color: var(--orange);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.6px;
  text-decoration: none;
}

.brand span {
  color: var(--orange);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-right: auto;
}

.topnav a {
  color: #303541;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--orange-dark);
}

.version {
  min-width: 62px;
  padding: 7px 14px;
  text-align: center;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.menu-button,
.mobile-nav {
  display: none;
}

.docs-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 210px;
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  padding: 32px 24px 22px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.sidebar-title,
.on-this-page > p {
  margin: 0 0 14px;
  color: #7a818d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar nav a {
  display: block;
  margin-left: -12px;
  padding: 8px 12px;
  color: #4c5360;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a:focus-visible,
.sidebar nav a.active {
  color: var(--orange-dark);
  background: var(--orange-soft);
  border-left-color: var(--orange);
}

.nav-group {
  margin: 20px 0 4px;
  color: #737a86;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-support {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar-support p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-support a {
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 700;
}

.content {
  width: min(100%, calc(var(--max-content) + 96px));
  margin: 0 auto;
  padding: 54px 48px 80px;
}

.doc-section {
  padding: 0 0 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.intro {
  padding-top: 0;
}

h1 {
  margin: 0;
  max-width: 690px;
  font-size: clamp(42px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.048em;
}

.lead {
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

h2 {
  margin: 0 0 16px;
  font-size: 29px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h3 {
  margin: 32px 0 12px;
  font-size: 19px;
  line-height: 1.35;
}

p {
  margin: 0 0 16px;
}

.availability {
  margin: 0 0 40px;
  padding: 17px 19px;
  color: #563020;
  background: var(--orange-soft);
  border-left: 3px solid var(--orange);
}

.availability strong {
  display: block;
  margin-bottom: 2px;
}

.content :not(pre) > code,
.endpoint-heading > code,
.key-profile code {
  padding: 2px 5px;
  color: #303744;
  background: var(--surface);
  border: 1px solid #dfe3e8;
  border-radius: 4px;
  font-size: 0.9em;
}

.code-block {
  margin: 22px 0 28px;
  overflow: hidden;
  background: var(--code);
  border: 1px solid #242d3b;
  border-radius: 8px;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px 0 16px;
  color: #cbd2dc;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid #2d3746;
}

.copy-button {
  padding: 5px 9px;
  color: #e9edf3;
  background: transparent;
  font: inherit;
  border: 1px solid #455064;
  border-radius: 5px;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  color: #fff;
  border-color: #7f8ba0;
}

.clipboard-proxy {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

pre {
  margin: 0;
  padding: 18px;
  color: #e6eaf0;
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
}

.endpoint-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.endpoint-heading h2 {
  margin-bottom: 0;
}

.endpoint-heading > code {
  flex: 0 0 auto;
  margin-top: 4px;
  font-size: 12px;
}

.method {
  margin: 0 0 4px;
  color: var(--orange-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.table-wrap {
  margin: 18px 0 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

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

th {
  color: #5c6471;
  background: var(--surface);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.security-note {
  color: var(--muted);
  font-size: 14px;
}

.key-profile {
  margin: 22px 0;
  border-top: 1px solid var(--line);
}

.key-profile div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.key-profile span {
  color: var(--muted);
  font-size: 14px;
}

.key-profile code {
  width: fit-content;
}

.on-this-page {
  position: sticky;
  top: var(--topbar-height);
  height: fit-content;
  padding: 34px 24px;
  border-left: 1px solid var(--line);
}

.on-this-page a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.on-this-page a:hover,
.on-this-page a:focus-visible {
  color: var(--orange-dark);
}

footer {
  padding: 5px 0 0;
}

footer p {
  margin-bottom: 4px;
  color: var(--muted);
}

footer a {
  color: var(--orange-dark);
  font-weight: 750;
}

:focus-visible {
  outline: 3px solid rgba(244, 81, 30, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .docs-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .on-this-page {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-height: 64px;
  }

  .topbar {
    gap: 14px;
    height: var(--topbar-height);
    padding: 0 18px;
  }

  .brand {
    flex-basis: auto;
    margin-right: auto;
    font-size: 25px;
  }

  .topnav,
  .version,
  .sidebar {
    display: none;
  }

  .menu-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
  }

  .menu-icon {
    position: relative;
  }

  .menu-icon::before,
  .menu-icon::after {
    position: absolute;
    left: 0;
    content: "";
  }

  .menu-icon::before {
    top: -5px;
  }

  .menu-icon::after {
    top: 5px;
  }

  .mobile-nav {
    position: fixed;
    inset: var(--topbar-height) 0 auto;
    z-index: 19;
    display: grid;
    padding: 12px 18px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(23, 26, 36, 0.08);
  }

  .mobile-nav[hidden] {
    display: none;
  }

  .mobile-nav a {
    padding: 10px 2px;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }

  .docs-shell {
    display: block;
  }

  .content {
    width: 100%;
    padding: 38px 20px 64px;
  }

  .doc-section {
    padding-bottom: 42px;
    margin-bottom: 42px;
  }

  h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 18px;
  }

  h2 {
    font-size: 26px;
  }

  .endpoint-heading {
    display: block;
  }

  .endpoint-heading > code {
    display: inline-block;
    margin-top: 10px;
  }

  .key-profile div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  pre {
    padding: 16px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
