:root {
  --bg: #fbfcfd;
  --surface: #ffffff;
  --surface-soft: #f2f7f6;
  --text: #12201e;
  --muted: #5f706d;
  --line: #d8e4e1;
  --brand: #0d8d7b;
  --brand-2: #0a685b;
  --accent: #d95f43;
  --purple: #d84fff;
  --code: #f6faf8;
  --code-text: #1f302c;
  --code-border: #d6e5e0;
  --copy-bg: #ffffff;
  --copy-text: #2a3d39;
  --hero-aura: rgba(13, 141, 123, 0.12);
  --page-start: #ffffff;
  --sidebar-bg: rgba(255, 255, 255, 0.86);
  --topbar-bg: rgba(251, 252, 253, 0.88);
  --input-bg: #ffffff;
  --nav-text: #3f5350;
  --nav-active-bg: #e8f6f2;
  --nav-active-text: #0a685b;
  --callout-bg: #f1fbf8;
  --callout-border: #b9dfd4;
  --table-head-text: #31423f;
  --table-body-text: #3f5350;
  --table-row-alt: #f7fbfa;
  --inline-code-bg: #eef6f3;
  --inline-code-text: #16342e;
  --tag-text: #3b4f4b;
  --topbar-border: rgba(216, 228, 225, 0.8);
  --primary-button-text: #ffffff;
  --wordmark-text: #111815;
  --theme-track: #edf4f2;
  --theme-active: #ffffff;
  --theme-active-text: #101918;
  --diagram-glow: rgba(13, 141, 123, 0.14);
  --diagram-step: #ffffff;
  --diagram-rail: #cfe1dd;
  --logo-filter: none;
  --radius: 8px;
  --shadow: 0 18px 42px rgba(24, 42, 39, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-soft: #181818;
  --text: #f0ede8;
  --muted: #9a958b;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #e8d5a3;
  --brand-2: #e8d5a3;
  --accent: #4caf7d;
  --purple: #e35cff;
  --code: #151515;
  --code-text: #ddd7c8;
  --code-border: rgba(232, 213, 163, 0.14);
  --copy-bg: rgba(255, 255, 255, 0.07);
  --copy-text: #d9d0bf;
  --hero-aura: rgba(232, 213, 163, 0.10);
  --page-start: #0a0a0a;
  --sidebar-bg: rgba(10, 10, 10, 0.88);
  --topbar-bg: rgba(10, 10, 10, 0.9);
  --input-bg: #141414;
  --nav-text: #a19d94;
  --nav-active-bg: rgba(232, 213, 163, 0.12);
  --nav-active-text: #f0e0b6;
  --callout-bg: rgba(232, 213, 163, 0.08);
  --callout-border: rgba(232, 213, 163, 0.32);
  --table-head-text: #d9d0bf;
  --table-body-text: #c4bcad;
  --table-row-alt: rgba(255, 255, 255, 0.025);
  --inline-code-bg: rgba(232, 213, 163, 0.08);
  --inline-code-text: #eadcb8;
  --tag-text: #d9d0bf;
  --topbar-border: rgba(255, 255, 255, 0.10);
  --primary-button-text: #0a0a0a;
  --wordmark-text: #f7f7f2;
  --theme-track: rgba(255, 255, 255, 0.06);
  --theme-active: rgba(232, 213, 163, 0.16);
  --theme-active-text: #f0e0b6;
  --diagram-glow: rgba(232, 213, 163, 0.16);
  --diagram-step: #121212;
  --diagram-rail: rgba(232, 213, 163, 0.24);
  --logo-filter: none;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, var(--hero-aura), transparent 360px),
    linear-gradient(180deg, var(--page-start), var(--bg) 300px);
  font-size: 15px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:not(pre) > code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--inline-code-bg);
  color: var(--inline-code-text);
  padding: 1px 5px;
  font-size: 0.92em;
}

.layout {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr) 230px;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  width: max-content;
  font-family: "Slackey", "Rogient Block", "Rogient", ui-sans-serif, system-ui, sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--wordmark-text);
  text-transform: lowercase;
  transform: scaleX(1.02);
  transform-origin: left center;
}

.wordmark .colon {
  position: relative;
  display: inline-flex;
  width: 0.34em;
  height: 0.86em;
  margin: 0 0.055em 0 0.075em;
  color: transparent;
  vertical-align: -0.05em;
}

.wordmark .colon::before,
.wordmark .colon::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0.26em;
  height: 0.26em;
  border-radius: 999px;
  background: var(--purple);
  transform: translateX(-50%);
  box-shadow: 0 0 24px rgba(227, 92, 255, 0.44);
}

.wordmark .colon::before {
  top: 0.13em;
}

.wordmark .colon::after {
  bottom: 0.12em;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.brand-meta span + span {
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  margin-bottom: 18px;
}

.search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 141, 123, 0.14);
}

.nav-group {
  margin: 20px 0;
}

.nav-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-link {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--nav-text);
  font-size: 13px;
  line-height: 1.3;
}

.nav-link:hover,
.nav-link.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
}

.main {
  min-width: 0;
  padding: 0 44px 80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: end;
  gap: 0;
  margin: 0 -44px;
  padding: 14px 28px 0;
  border-bottom: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
}

.topbar-main {
  display: grid;
  grid-template-columns: minmax(220px, 430px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
}

.topbar-search {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 12px;
}

.topbar-search > span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 1.35rem;
  line-height: 1;
}

.topbar-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.topbar-search kbd {
  border: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.theme-switch {
  grid-column: 2;
}

.topbar-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
}

.topbar-tabs a {
  position: relative;
  padding: 11px 0 12px;
  color: var(--muted);
  font-weight: 720;
}

.topbar-tabs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transform: scaleX(0.4);
  opacity: 0;
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    background 140ms ease;
}

.topbar-tabs a:hover,
.topbar-tabs a:focus-visible,
.topbar-tabs a.active {
  color: var(--text);
}

.topbar-tabs a:hover::after,
.topbar-tabs a:focus-visible::after,
.topbar-tabs a.active::after {
  background: var(--brand);
  transform: scaleX(1);
  opacity: 1;
}

.content {
  max-width: 880px;
  padding-top: 52px;
}

section {
  scroll-margin-top: 88px;
}

.eyebrow {
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 780;
  margin-bottom: 10px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: 0;
}

h1 {
  max-width: 790px;
  font-size: 48px;
}

.text-accent {
  color: var(--brand);
}

h2 {
  margin-top: 66px;
  padding-top: 16px;
  font-size: 30px;
}

h3 {
  margin-top: 34px;
  font-size: 21px;
}

h4 {
  margin-top: 24px;
  font-size: 16px;
}

p {
  color: var(--muted);
  margin: 12px 0 0;
}

.lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  margin-top: 18px;
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.value-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.value-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

.value-item p {
  margin: 0;
  font-size: 13px;
}

.actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  font-weight: 760;
  font-size: 13px;
}

.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--primary-button-text);
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--theme-track);
  padding: 4px;
}

.theme-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-weight: 760;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.theme-option span {
  transform: translateY(-1px);
}

.theme-option[aria-pressed="true"] {
  background: var(--theme-active);
  color: var(--theme-active-text);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 780;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(20, 32, 31, 0.03);
}

.card strong {
  display: block;
  margin-bottom: 6px;
}

.card p {
  margin: 0;
  font-size: 14px;
}

.flow-diagram {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.flow-step {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--diagram-step);
  padding: 18px;
}

.flow-node {
  display: block;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.flow-step h4 {
  margin: 0;
  color: var(--brand);
  font-size: 15px;
}

.flow-step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.callout {
  margin-top: 20px;
  border: 0;
  border-left: 3px solid var(--callout-border);
  border-radius: 0;
  background: transparent;
  padding: 2px 0 2px 16px;
  color: var(--muted);
}

pre {
  position: relative;
  margin: 16px 0 0;
  padding: 16px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--code-border);
  background: var(--code);
  color: var(--code-text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  font-size: 13px;
  line-height: 1.55;
}

pre code {
  color: inherit;
}

.example-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--brand);
  color: var(--primary-button-text);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--copy-bg);
  color: var(--copy-text);
  padding: 0 8px;
  cursor: pointer;
  font-size: 12px;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

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

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

td {
  color: var(--table-body-text);
}

td:first-child {
  color: var(--text);
  font-weight: 760;
}

th {
  background: var(--surface-soft);
  color: var(--table-head-text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

tbody tr:nth-child(even) td {
  background: var(--table-row-alt);
}

.method {
  display: inline-flex;
  justify-content: center;
  min-width: 52px;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--primary-button-text);
  background: var(--brand);
  font-size: 12px;
  font-weight: 850;
}

.method.get {
  background: #246fbd;
  color: #ffffff;
}

.method.ws {
  background: #6a55b5;
  color: #ffffff;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px 10px;
  color: var(--tag-text);
  font-size: 12px;
  font-weight: 750;
}

.tester {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.tester-panel {
  padding: 16px;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
}

.tester-stage {
  padding: 16px;
  min-width: 0;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.field[hidden] {
  display: none;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
  font: inherit;
}

.field textarea {
  min-height: 210px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.tester-output {
  min-height: 260px;
  white-space: pre-wrap;
}

.tester-hint {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.45;
}

details {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
}

summary {
  cursor: pointer;
  font-weight: 760;
}

.toc {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  padding: 92px 22px 22px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 13px;
}

.toc a:hover {
  color: var(--brand-2);
}

.mobile-toggle {
  display: none;
}

mark {
  background: #fff0a8;
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px;
}

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

  .toc {
    display: none;
  }
}

@media (max-width: 820px) {
  .layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(82vw, 310px);
    transform: translateX(-105%);
    transition: transform 160ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .main {
    padding: 0 20px 56px;
  }

  .topbar {
    min-height: 64px;
    margin: 0 -20px;
    padding: 8px 20px 0;
  }

  .topbar-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .topbar-search,
  .theme-switch {
    grid-column: auto;
  }

  .topbar-tabs,
  .topbar-search kbd {
    display: none;
  }

  .content {
    padding-top: 32px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    margin-top: 48px;
    font-size: 25px;
  }

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

  .value-strip {
    grid-template-columns: 1fr;
  }

  .flow-diagram {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-height: 0;
  }

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

  .tester-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}