:root {
  --ink: #10202a;
  --muted: #65737d;
  --line: #dce4e7;
  --paper: #f6f8f8;
  --teal: #087f78;
  --green: #2f9d62;
  --amber: #d88916;
  --red: #ce4b45;
  --blue: #2c6ed5;
  --code: #0b1b24;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.docs-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(210px, 0.65fr) minmax(250px, 1fr) auto minmax(190px, auto);
  align-items: center;
  gap: 18px;
  padding: 12px 28px;
  color: #f7fbfb;
  background: #0b1b24;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.docs-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: #082019; background: #b8ef45; font-weight: 950; }
.docs-brand strong, .docs-brand small { display: block; }
.docs-brand strong { font-size: 14px; }
.docs-brand small { margin-top: 2px; color: rgba(255,255,255,.58); font-size: 11px; }
.docs-search { position: relative; display: block; }
.docs-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.docs-search input { width: 100%; min-height: 44px; padding: 0 14px; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; outline: none; }
.docs-search input:focus { border-color: #b8ef45; box-shadow: 0 0 0 3px rgba(184,239,69,.14); }
.language-switch { display: inline-grid; grid-template-columns: repeat(2, auto); padding: 3px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; }
.language-switch button { min-height: 34px; padding: 0 10px; color: rgba(255,255,255,.66); background: transparent; border: 0; border-radius: 6px; cursor: pointer; font: inherit; font-size: 11px; font-weight: 850; white-space: nowrap; }
.language-switch button:hover { color: #fff; }
.language-switch button:focus-visible { outline: 2px solid #b8ef45; outline-offset: 1px; }
.language-switch button.active { color: #082019; background: #b8ef45; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-size: 13px; font-weight: 800; }
.text-link { color: rgba(255,255,255,.72); }
.trial-button { min-height: 42px; display: inline-flex; align-items: center; padding: 0 15px; color: #082019; background: #b8ef45; border-radius: 8px; }

.docs-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.docs-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; padding: 24px 18px 40px; background: var(--paper); border-right: 1px solid var(--line); }
.docs-sidebar nav { display: grid; gap: 4px; }
.docs-sidebar a { display: flex; align-items: center; min-height: 36px; padding: 0 10px; color: #455761; border-radius: 6px; font-size: 13px; font-weight: 700; }
.docs-sidebar a:hover { color: var(--teal); background: #e7f1ef; }
.nav-divider { display: flex; justify-content: space-between; gap: 12px; margin: 22px 10px 8px; color: #849097; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.endpoint-navigation { display: grid; gap: 2px; }
.endpoint-navigation a { gap: 8px; font-size: 11px; font-weight: 650; }
.endpoint-navigation code { min-width: 34px; color: var(--teal); font-size: 9px; font-weight: 950; }
.endpoint-navigation span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.docs-main { min-width: 0; max-width: 1160px; width: 100%; padding: 52px clamp(24px, 5vw, 76px) 100px; }
.docs-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.section-label { color: var(--teal); font-size: 11px; font-weight: 950; text-transform: uppercase; }
h1 { max-width: 720px; margin: 10px 0 16px; font-size: clamp(38px, 5vw, 64px); line-height: 1; }
h2 { margin: 8px 0 12px; font-size: 27px; line-height: 1.15; }
p { color: var(--muted); line-height: 1.65; }
.docs-intro p { max-width: 720px; margin: 0; font-size: 17px; }
.service-status { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 12px; color: #466059; background: #edf6f1; border: 1px solid #d3e8dc; border-radius: 8px; font-size: 12px; font-weight: 850; }
.service-status i { width: 8px; height: 8px; border-radius: 50%; background: #a4b2ac; }
.service-status.online i { background: var(--green); }

.guide-section { padding: 38px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 94px; }
.quickstart-grid, .protocol-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 42px; }
.quickstart-grid > *, .protocol-grid > * { min-width: 0; }
.step-number { color: var(--amber); font-size: 12px; font-weight: 950; }
.inline-action { display: inline-flex; margin-top: 5px; color: var(--teal); font-size: 14px; font-weight: 900; }
.code-block { position: relative; min-width: 0; margin-top: 16px; color: #e7f2f2; background: var(--code); border-radius: 8px; }
.code-block pre { max-width: 100%; margin: 0; overflow-x: auto; padding: 22px; font-size: 12px; line-height: 1.7; }
.code-block.compact pre { padding: 16px; }
.copy-button { position: absolute; z-index: 2; top: 9px; right: 9px; min-height: 30px; padding: 0 10px; color: #dfeaea; background: #213640; border: 1px solid #38505a; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 800; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 15px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.auth-row span { color: var(--green); font-size: 11px; font-weight: 900; }
.error-table { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 20px; }
.error-table div { display: grid; gap: 6px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.error-table code { color: var(--red); font-weight: 950; }
.error-table span, .muted-note { color: var(--muted); font-size: 12px; }
.reference-heading { padding: 54px 0 22px; }
.endpoint-list { display: grid; gap: 14px; }
.endpoint-card { scroll-margin-top: 92px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.endpoint-summary { display: grid; grid-template-columns: 72px minmax(210px,.9fr) minmax(240px,1.1fr) auto; align-items: center; gap: 15px; padding: 17px 18px; cursor: pointer; }
.method { width: 66px; display: inline-grid; place-items: center; min-height: 28px; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 950; }
.method.get { background: var(--blue); } .method.post { background: var(--green); } .method.patch { background: var(--amber); } .method.delete { background: var(--red); }
.endpoint-path { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 850; }
.endpoint-title { color: #44545d; font-size: 13px; }
.access-pill { justify-self: end; padding: 5px 8px; color: #53636b; background: var(--paper); border-radius: 6px; font-size: 10px; font-weight: 850; }
.access-pill.public { color: #176741; background: #e8f6ee; }
.endpoint-details { display: none; padding: 0 18px 20px 105px; border-top: 1px solid var(--line); }
.endpoint-card.open .endpoint-details { display: block; }
.endpoint-details h3 { margin: 22px 0 8px; font-size: 14px; }
.parameter-list, .response-list { display: grid; gap: 7px; }
.parameter-row, .response-row { display: grid; grid-template-columns: minmax(100px,.4fr) minmax(90px,.3fr) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1f2; font-size: 12px; }
.parameter-row span, .response-row span { color: var(--muted); }
.endpoint-description { margin: 16px 0 0; font-size: 13px; }
.empty-state { padding: 36px; color: var(--muted); background: var(--paper); border-radius: 8px; text-align: center; }

@media (max-width: 980px) {
  .docs-header { grid-template-columns: minmax(0,1fr) auto auto; }
  .docs-search { grid-column: 1 / -1; grid-row: 2; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .docs-main { padding-top: 36px; }
  .endpoint-summary { grid-template-columns: 66px 1fr auto; }
  .endpoint-title { grid-column: 2 / -1; }
  .endpoint-details { padding-left: 18px; }
}

@media (max-width: 640px) {
  .docs-header { grid-template-columns: minmax(0,1fr) auto; padding: 12px 16px; gap: 10px; }
  .docs-brand { min-width: 0; }
  .docs-brand > span:last-child { min-width: 0; }
  .docs-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .docs-brand small { display: none; }
  .language-switch { grid-column: 2; grid-row: 1; }
  .language-switch button { min-height: 32px; padding: 0 8px; font-size: 10px; }
  .docs-search { grid-column: 1 / -1; grid-row: 2; }
  .header-actions { grid-column: 1 / -1; grid-row: 3; justify-content: space-between; }
  .text-link { display: inline-flex; }
  .trial-button { min-height: 38px; padding: 0 11px; font-size: 11px; }
  .docs-main { padding: 30px 18px 70px; }
  .docs-intro { display: grid; }
  .service-status { justify-self: start; }
  .quickstart-grid, .protocol-grid, .error-table { grid-template-columns: 1fr; gap: 22px; }
  .endpoint-summary { grid-template-columns: 60px minmax(0,1fr); gap: 10px; }
  .endpoint-title, .access-pill { grid-column: 1 / -1; justify-self: start; }
  .parameter-row, .response-row { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 390px) {
  .docs-header { padding-inline: 12px; }
  .brand-mark { width: 36px; height: 36px; }
  .language-switch button { padding-inline: 7px; }
  .docs-main { padding-inline: 14px; }
  .endpoint-summary { padding-inline: 14px; }
  .endpoint-details { padding-inline: 14px; }
}
