/* ==========================================================================
   Fragment API — docs3
   Mustaqil dizayn tizimi. Hech qanday tashqi kutubxona yoki shrift yuklanmaydi.
   ========================================================================== */

/* ------------------------------------------------------------- 1. tokens */

:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --bg: #fafaf9;
  --bg-tint: #f4f4f2;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --surface-3: #ededeb;
  --line: #e6e5e2;
  --line-2: #d7d6d2;
  --fg: #1a1a19;
  --fg-2: #56544f;
  --fg-3: #8b8880;

  --accent: #5b3df5;
  --accent-2: #4a2ce4;
  --accent-fg: #ffffff;
  --accent-soft: #f0ecff;
  --accent-line: #d9d0ff;

  --ok: #15803d;
  --ok-soft: #e8f6ec;
  --ok-line: #bfe3c9;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --warn-line: #f0dcb9;
  --danger: #c62b28;
  --danger-soft: #fdeceb;
  --danger-line: #f4cbc9;

  --code-bg: #121214;
  --code-bar: #1a1a1d;
  --code-line: #262629;
  --code-fg: #d7d7d9;
  --c-key: #8ab4ff;
  --c-str: #a8df9b;
  --c-num: #f0b070;
  --c-bool: #c9a2ff;
  --c-null: #8b8b93;
  --c-punc: #6f6f78;
  --c-kw: #c9a2ff;
  --c-fn: #8ab4ff;
  --c-com: #6b6b74;

  --shadow-1: 0 1px 2px rgba(16, 16, 20, 0.05);
  --shadow-2: 0 4px 14px rgba(16, 16, 20, 0.07);
  --shadow-3: 0 24px 60px rgba(16, 16, 20, 0.16);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;

  --topbar: 56px;
  --nav-w: 268px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c0c0d;
  --bg-tint: #101012;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --surface-3: #212125;
  --line: #26262a;
  --line-2: #333338;
  --fg: #ededec;
  --fg-2: #a3a2a0;
  --fg-3: #767577;

  --accent: #a08fff;
  --accent-2: #b6a8ff;
  --accent-fg: #14121f;
  --accent-soft: #1c1930;
  --accent-line: #322c55;

  --ok: #5cc47c;
  --ok-soft: #12241a;
  --ok-line: #24422e;
  --warn: #e0a252;
  --warn-soft: #241c12;
  --warn-line: #453421;
  --danger: #f0736c;
  --danger-soft: #241414;
  --danger-line: #4a2523;

  --code-bg: #101013;
  --code-bar: #17171a;
  --code-line: #232327;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* -------------------------------------------------------------- 2. reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

svg {
  display: block;
  flex: none;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-variant-ligatures: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: var(--accent);
  color: var(--accent-fg);
}

.fd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fd-skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.18s var(--ease);
}

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

/* ------------------------------------------------------------- 3. topbar */

.fd-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--topbar);
  padding: 0 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.fd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 6px 4px 4px;
  border-radius: 10px;
  transition: background 0.14s var(--ease);
}

.fd-brand:hover {
  background: var(--surface-2);
}

.fd-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.fd-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.fd-brand-name b {
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.fd-brand-name span {
  font-size: 10.5px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fd-top-spacer {
  flex: 1;
  min-width: 0;
}

/* qidiruv tugmasi */
.fd-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 0;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg-3);
  font-size: 13px;
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.fd-search-btn:hover {
  border-color: var(--line-2);
  color: var(--fg-2);
}

.fd-search-btn span {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fd-kbd {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1;
}

.fd-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--fg-2);
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}

.fd-icon-btn:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.fd-icon-btn svg {
  width: 18px;
  height: 18px;
}

.fd-theme-icon--dark,
[data-theme="dark"] .fd-theme-icon--light {
  display: none;
}

[data-theme="dark"] .fd-theme-icon--dark {
  display: block;
}

.fd-top-cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.14s var(--ease), transform 0.14s var(--ease);
}

.fd-top-cta:hover {
  background: var(--accent-2);
}

.fd-top-cta:active {
  transform: scale(0.98);
}

.fd-burger {
  display: none;
}

/* progress */
.fd-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  height: 2px;
  width: 0;
  background: var(--accent);
  opacity: 0;
  transition: width 0.24s var(--ease), opacity 0.2s linear;
}

.fd-progress.is-on {
  opacity: 1;
}

/* --------------------------------------------------------------- 4. shell */

.fd-body {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  align-items: start;
}

.fd-nav {
  position: sticky;
  top: var(--topbar);
  height: calc(100dvh - var(--topbar));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 12px 40px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}

.fd-nav-close {
  display: none;
}

.fd-nav-group + .fd-nav-group {
  margin-top: 18px;
}

.fd-nav-label {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.fd-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--fg-2);
  font-size: 13.5px;
  transition: background 0.13s var(--ease), color 0.13s var(--ease);
}

.fd-nav-link:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.fd-nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.fd-nav-link.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 3px;
  height: 18px;
  margin-top: -9px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.fd-nav-link svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
}

.fd-nav-link.is-active svg {
  opacity: 1;
}

.fd-nav-txt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-nav-badge {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
}

.fd-nav-foot {
  margin-top: 22px;
  padding: 12px 10px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.fd-nav-foot a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--fg-3);
  transition: color 0.13s var(--ease);
}

.fd-nav-foot a:hover {
  color: var(--accent);
}

.fd-nav-foot svg {
  width: 13px;
  height: 13px;
}

.fd-scrim {
  display: none;
}

/* --------------------------------------------------------------- 5. view */

.fd-view {
  min-width: 0;
  padding: 0 0 96px;
}

.fd-page {
  max-width: 1180px;
  padding: 30px 30px 0;
  margin: 0 auto;
  animation: fd-in 0.26s var(--ease) both;
}

@keyframes fd-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.fd-crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--fg-3);
  margin-bottom: 12px;
}

.fd-crumb svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.fd-h1 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 680;
  letter-spacing: -0.024em;
  line-height: 1.18;
}

.fd-lead {
  margin-top: 10px;
  max-width: 62ch;
  font-size: 15.5px;
  color: var(--fg-2);
}

.fd-h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.fd-sec {
  margin-top: 34px;
}

.fd-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 14px;
}

.fd-sec-head p {
  font-size: 13px;
  color: var(--fg-3);
}

.fd-sec-head p button {
  font-size: 13px;
}

/* --------------------------------------------------------- 6. primitives */

.fd-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.fd-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg-2);
  white-space: nowrap;
}

.fd-pill--method {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.fd-pill--ok {
  border-color: var(--ok-line);
  background: var(--ok-soft);
  color: var(--ok);
}

.fd-pill--warn {
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: var(--warn);
}

.fd-pill--danger {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger);
}

.fd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.fd-live .fd-dot {
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
  animation: fd-pulse 2.4s ease-out infinite;
}

@keyframes fd-pulse {
  70%,
  100% {
    box-shadow: 0 0 0 5px transparent;
  }
}

.fd-mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* -------------------------------------------------------------- 7. hero */

.fd-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.fd-hero::after {
  content: "";
  position: absolute;
  inset: -60% -20% auto auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 68%
  );
  pointer-events: none;
}

.fd-hero > * {
  position: relative;
}

.fd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.fd-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.fd-quick-item {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
}

.fd-quick-item dt {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.fd-quick-item dd {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg);
  word-break: break-all;
}

/* copy field */
.fd-copyfield {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-tint);
  min-width: 0;
}

.fd-copyfield code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 12.5px;
  scrollbar-width: none;
}

.fd-copyfield code::-webkit-scrollbar {
  display: none;
}

/* --------------------------------------------------------------- 8. grids */

.fd-grid {
  display: grid;
  gap: 12px;
}

.fd-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.fd-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.fd-step {
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.fd-step-n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 11px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.fd-step h3 {
  font-size: 14.5px;
  font-weight: 640;
  letter-spacing: -0.008em;
}

.fd-step p {
  margin-top: 5px;
  font-size: 13.2px;
  color: var(--fg-2);
}

.fd-step code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  font-size: 12px;
}

/* endpoint kartochkalari (boshlash sahifasi) */
.fd-eplist {
  display: grid;
  gap: 8px;
}

.fd-epcard {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.14s var(--ease), transform 0.14s var(--ease),
    box-shadow 0.14s var(--ease);
}

.fd-epcard:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.fd-epcard-body {
  flex: 1;
  min-width: 0;
}

.fd-epcard-body b {
  display: block;
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.008em;
}

.fd-epcard-body code {
  font-size: 12px;
  color: var(--fg-3);
}

.fd-epcard-body p {
  margin-top: 3px;
  font-size: 13px;
  color: var(--fg-2);
}

.fd-epcard-go {
  color: var(--fg-3);
  transition: transform 0.16s var(--ease), color 0.14s var(--ease);
}

.fd-epcard:hover .fd-epcard-go {
  color: var(--accent);
  transform: translateX(2px);
}

.fd-epcard-go svg {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------- 9. table */

.fd-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.fd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.4px;
}

.fd-table th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}

.fd-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--fg-2);
}

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

.fd-table td:first-child {
  color: var(--fg);
  white-space: nowrap;
}

.fd-table code {
  font-size: 12.4px;
}

/* ------------------------------------------------------------ 10. endpoint */

.fd-ep-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
}

.fd-ep-url {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 5px 5px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.fd-ep-url code {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
  scrollbar-width: none;
}

.fd-ep-url code::-webkit-scrollbar {
  display: none;
}

.fd-ep-url code .fd-dim {
  color: var(--fg-3);
  font-weight: 400;
}

.fd-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: 26px;
  align-items: start;
  margin-top: 26px;
}

.fd-split-side {
  position: sticky;
  top: calc(var(--topbar) + 20px);
}

/* maydonlar */
.fd-field {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.fd-field + .fd-field {
  margin-top: 8px;
}

.fd-field-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.fd-field-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 620;
}

.fd-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}

.fd-tag--req {
  color: var(--danger);
  font-weight: 600;
}

.fd-tag--opt {
  color: var(--fg-3);
}

.fd-field p {
  margin-top: 4px;
  font-size: 13.2px;
  color: var(--fg-2);
}

.fd-input,
.fd-select {
  width: 100%;
  height: 36px;
  margin-top: 10px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--bg-tint);
  font-family: var(--mono);
  font-size: 13px;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease);
}

.fd-input:hover,
.fd-select:hover {
  border-color: var(--fg-3);
}

.fd-input:focus,
.fd-select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.fd-select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.fd-empty {
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  font-size: 13.2px;
  color: var(--fg-3);
}

/* eslatmalar */
.fd-note {
  display: flex;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--r);
  background: var(--surface);
}

.fd-note + .fd-note {
  margin-top: 8px;
}

.fd-note svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.fd-note b {
  display: block;
  font-size: 13.6px;
  font-weight: 640;
}

.fd-note p {
  margin-top: 3px;
  font-size: 13.2px;
  color: var(--fg-2);
}

.fd-note--info {
  border-left-color: var(--accent);
}

.fd-note--info svg {
  color: var(--accent);
}

.fd-note--warn {
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface));
}

.fd-note--warn svg {
  color: var(--warn);
}

.fd-note--danger {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface));
}

.fd-note--danger svg {
  color: var(--danger);
}

/* ------------------------------------------------------------- 11. console */

.fd-console {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: var(--shadow-2);
}

.fd-console + .fd-console {
  margin-top: 12px;
}

.fd-console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 12px;
  background: var(--code-bar);
  border-bottom: 1px solid var(--code-line);
}

.fd-console-title {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8b8b93;
  white-space: nowrap;
}

.fd-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.fd-tabs::-webkit-scrollbar {
  display: none;
}

.fd-tab {
  padding: 4px 9px;
  border-radius: 7px;
  color: #8b8b93;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  scroll-snap-align: end;
  transition: background 0.13s var(--ease), color 0.13s var(--ease);
}

.fd-tab:hover {
  color: #d7d7d9;
  background: rgba(255, 255, 255, 0.05);
}

.fd-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fd-tab--st[aria-selected="true"] {
  font-family: var(--mono);
}

.fd-tab--ok[aria-selected="true"] {
  background: rgba(92, 196, 124, 0.16);
  color: #7fd99a;
}

.fd-tab--warn[aria-selected="true"] {
  background: rgba(224, 162, 82, 0.16);
  color: #e8b871;
}

.fd-tab--danger[aria-selected="true"] {
  background: rgba(240, 115, 108, 0.16);
  color: #f28b84;
}

.fd-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  color: #8b8b93;
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 0.13s var(--ease), color 0.13s var(--ease);
}

.fd-copy:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.fd-copy svg {
  width: 13px;
  height: 13px;
}

.fd-copy.is-done {
  color: #7fd99a;
}

.fd-copy--light {
  color: var(--fg-3);
}

.fd-copy--light:hover {
  background: var(--surface-3);
  color: var(--fg);
}

.fd-copy--light.is-done {
  color: var(--ok);
}

.fd-copy-icon--done,
.fd-copy.is-done .fd-copy-icon--idle {
  display: none;
}

.fd-copy.is-done .fd-copy-icon--done {
  display: block;
}

.fd-pre {
  margin: 0;
  padding: 14px 16px;
  max-height: 60vh;
  overflow: auto;
  color: var(--code-fg);
  font-size: 12.6px;
  line-height: 1.65;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3f transparent;
}

.fd-pre::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.fd-pre::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 9px;
  background: #3a3a3f;
  background-clip: content-box;
}

.fd-pre code {
  font-size: inherit;
}

.t-key {
  color: var(--c-key);
}
.t-str {
  color: var(--c-str);
}
.t-num {
  color: var(--c-num);
}
.t-bool {
  color: var(--c-bool);
}
.t-null {
  color: var(--c-null);
}
.t-punc {
  color: var(--c-punc);
}
.t-kw {
  color: var(--c-kw);
}
.t-fn {
  color: var(--c-fn);
}
.t-com {
  color: var(--c-com);
  font-style: italic;
}

.fd-console-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--code-line);
  background: var(--code-bar);
  font-size: 11.5px;
  color: #8b8b93;
}

.fd-console-foot strong {
  color: #d7d7d9;
  font-weight: 600;
}

/* API kalit maydoni */
.fd-keyrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 12px;
}

.fd-keyrow svg {
  width: 15px;
  height: 15px;
  color: var(--fg-3);
}

.fd-keyrow input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--bg-tint);
  font-family: var(--mono);
  font-size: 12.5px;
}

.fd-keyrow input:focus {
  outline: none;
  border-color: var(--accent);
}

.fd-keyrow small {
  font-size: 11px;
  color: var(--fg-3);
  white-space: nowrap;
}

/* prev / next */
.fd-pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.fd-pager a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.14s var(--ease), transform 0.14s var(--ease);
}

.fd-pager a:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
}

.fd-pager .fd-pager-next {
  justify-content: flex-end;
  text-align: right;
}

.fd-pager span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.fd-pager b {
  font-size: 14px;
  font-weight: 620;
}

.fd-pager svg {
  width: 16px;
  height: 16px;
  color: var(--fg-3);
}

/* ------------------------------------------------------------- 12. errors */

.fd-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  position: sticky;
  top: calc(var(--topbar) + 8px);
  z-index: 20;
  box-shadow: var(--shadow-1);
}

.fd-filter-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--bg-tint);
  font-size: 14px;
}

.fd-filter-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.fd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fd-chip {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 550;
  transition: background 0.13s var(--ease), color 0.13s var(--ease),
    border-color 0.13s var(--ease);
}

.fd-chip:hover {
  border-color: var(--line-2);
  color: var(--fg);
}

.fd-chip.is-on {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}

.fd-count {
  font-size: 12.5px;
  color: var(--fg-3);
}

.fd-err {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.14s var(--ease);
}

.fd-err + .fd-err {
  margin-top: 8px;
}

.fd-err[open] {
  border-color: var(--line-2);
  box-shadow: var(--shadow-1);
}

.fd-err summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.fd-err summary::-webkit-details-marker {
  display: none;
}

.fd-err summary:hover {
  background: var(--surface-2);
}

.fd-err-title {
  flex: 1;
  min-width: 0;
  font-size: 13.8px;
  font-weight: 570;
}

.fd-err-chev {
  width: 15px;
  height: 15px;
  color: var(--fg-3);
  transition: transform 0.18s var(--ease);
}

.fd-err[open] .fd-err-chev {
  transform: rotate(180deg);
}

.fd-err-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.fd-err-body dl {
  margin: 0 0 12px;
  display: grid;
  gap: 9px;
}

.fd-err-body dt {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.fd-err-body dd {
  margin: 3px 0 0;
  font-size: 13.3px;
  color: var(--fg-2);
}

.fd-err-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.fd-err-links a {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--fg-2);
  transition: border-color 0.13s var(--ease), color 0.13s var(--ease);
}

.fd-err-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fd-noresult {
  padding: 34px 20px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  color: var(--fg-3);
  font-size: 13.5px;
}

/* ------------------------------------------------------------ 13. palette */

.fd-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 12vh 16px 16px;
  background: rgba(12, 12, 14, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fd-fade 0.16s var(--ease) both;
}

.fd-modal[hidden] {
  display: none;
}

@keyframes fd-fade {
  from {
    opacity: 0;
  }
}

.fd-palette {
  width: min(620px, 100%);
  max-height: 74vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: fd-pop 0.2s var(--ease) both;
}

@keyframes fd-pop {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

.fd-palette-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.fd-palette-top svg {
  width: 17px;
  height: 17px;
  color: var(--fg-3);
}

.fd-palette-top input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 15.5px;
}

.fd-palette-top input:focus {
  outline: none;
}

.fd-palette-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  overscroll-behavior: contain;
}

.fd-pl-group {
  padding: 10px 10px 4px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.fd-pl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
  transition: background 0.1s linear;
}

.fd-pl-item[aria-selected="true"] {
  background: var(--accent-soft);
}

.fd-pl-item[aria-selected="true"] .fd-pl-name {
  color: var(--accent);
}

.fd-pl-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--fg-3);
}

.fd-pl-item[aria-selected="true"] .fd-pl-icon {
  background: var(--accent);
  color: var(--accent-fg);
}

.fd-pl-icon svg {
  width: 14px;
  height: 14px;
}

.fd-pl-body {
  flex: 1;
  min-width: 0;
}

.fd-pl-name {
  display: block;
  font-size: 13.8px;
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-pl-sub {
  display: block;
  font-size: 11.8px;
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-palette-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--fg-3);
}

.fd-palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* --------------------------------------------------------------- 14. toast */

.fd-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  font-weight: 550;
  box-shadow: var(--shadow-3);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.24s var(--ease);
}

.fd-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fd-toast svg {
  width: 15px;
  height: 15px;
}

/* -------------------------------------------------------------- 15. footer */

.fd-foot {
  max-width: 1180px;
  margin: 46px auto 0;
  padding: 22px 30px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 12.5px;
  color: var(--fg-3);
}

.fd-foot a:hover {
  color: var(--accent);
}

/* --------------------------------------------------------- 16. responsive */

@media (max-width: 1180px) {
  .fd-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .fd-split-side {
    position: static;
    order: -1;
  }
}

@media (max-width: 980px) {
  .fd-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .fd-burger {
    display: grid;
  }

  .fd-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 110;
    width: min(310px, 86vw);
    height: 100dvh;
    padding-top: 14px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    transform: translateX(-102%);
    transition: transform 0.28s var(--ease);
    visibility: hidden;
  }

  body.fd-nav-open .fd-nav {
    transform: translateX(0);
    visibility: visible;
  }

  .fd-nav-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0 0 10px auto;
    border-radius: 9px;
    color: var(--fg-2);
    background: var(--surface-2);
  }

  .fd-nav-close svg {
    width: 16px;
    height: 16px;
  }

  .fd-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(12, 12, 14, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s var(--ease);
  }

  body.fd-nav-open .fd-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  body.fd-nav-open {
    overflow: hidden;
  }

  .fd-page {
    padding: 22px 18px 0;
  }

  .fd-foot {
    padding: 22px 18px 0;
  }

  .fd-search-btn span,
  .fd-search-btn .fd-kbd {
    display: none;
  }

  .fd-search-btn {
    width: 34px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14.5px;
  }

  .fd-hero {
    padding: 20px 18px;
    border-radius: var(--r);
  }

  .fd-hero::after {
    display: none;
  }

  .fd-quick {
    grid-template-columns: minmax(0, 1fr);
  }

  .fd-top-cta {
    display: none;
  }

  .fd-brand-name span {
    display: none;
  }

  .fd-pre {
    font-size: 12px;
    padding: 12px 13px;
    max-height: 52vh;
  }

  .fd-modal {
    padding: 0;
  }

  .fd-palette {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .fd-palette-foot {
    display: none;
  }

  .fd-filters {
    position: static;
  }

  .fd-pager {
    margin-top: 32px;
  }

  .fd-sec {
    margin-top: 26px;
  }

  .fd-sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .fd-ep-head {
    gap: 8px 10px;
  }

  .fd-ep-url {
    flex: 1 1 100%;
    order: 2;
  }

  .fd-ep-head > [data-copy-link] {
    margin-left: auto;
  }

  .fd-err summary {
    flex-wrap: wrap;
    padding: 11px 12px;
  }

  .fd-err-title {
    flex: 1 1 100%;
    order: 3;
  }

  .fd-err-chev {
    margin-left: auto;
  }

  .fd-table th,
  .fd-table td {
    padding: 9px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .fd-topbar,
  .fd-nav,
  .fd-scrim,
  .fd-modal,
  .fd-toast,
  .fd-pager {
    display: none !important;
  }

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