:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #5b6475;
  --line: #dce5f2;
  --accent: #0b4ba2;
  --accent-2: #0c68c8;
  --success: #1d9a62;
  --danger: #cf3542;
  --warning: #f08a1f;
  --mono: "IBM Plex Mono", monospace;
  --sans: "Plus Jakarta Sans", "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1000px 400px at 10% -10%, #dcecff 0%, transparent 65%),
    radial-gradient(900px 360px at 100% -10%, #d8f6ec 0%, transparent 62%),
    var(--bg);
  font-family: var(--sans);
}

.bg-orb {
  position: fixed;
  z-index: -1;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

.orb-1 {
  width: 300px;
  height: 300px;
  left: -80px;
  top: 220px;
  background: #84b8ff;
  border-radius: 50%;
}

.orb-2 {
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: 60px;
  background: #7ee6b6;
  border-radius: 50%;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.87);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 26px;
}

.brand-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 450;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  font-size: 12px;
  border: 1px solid #bfd7f7;
  background: #eaf4ff;
  color: #0b4ba2;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
}

.cta {
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 390px;
  min-height: calc(100vh - 64px);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #f8fbff;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
}

.sidebar-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #f8fbff;
  z-index: 3;
}

.sidebar-title {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 700;
}

.search {
  width: 100%;
  border: 1px solid #cad8ee;
  border-radius: 10px;
  height: 36px;
  padding: 0 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
}

.search:focus {
  outline: none;
  border-color: #92b4e8;
  box-shadow: 0 0 0 3px rgba(11, 75, 162, 0.12);
}

.sidebar-nav {
  padding: 10px;
}

.menu-group {
  margin-bottom: 12px;
}

.menu-group-title {
  padding: 10px 12px;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #566a8f;
  font-weight: 700;
}

.tag-block {
  margin-bottom: 6px;
}

.tag-head {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background .18s ease, border-color .18s ease;
}

.tag-block.open .tag-head {
  background: #eaf1ff;
  border-color: #d8e4fa;
}

.tag-head:hover {
  background: #eef4ff;
  border-color: #dbe6fa;
}

.tag-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-name {
  font-size: 13px;
  font-weight: 560;
  color: #334f7b;
  letter-spacing: -0.01em;
}

.tag-count {
  font-size: 10px;
  color: #6f83a6;
  background: #f3f7ff;
  border: 1px solid #d6e2f5;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  padding: 1px 6px;
  font-weight: 600;
}

.tag-chevron {
  width: 20px;
  height: 20px;
  color: #55698f;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(0deg);
  transition: transform .2s ease, color .2s ease;
}

.tag-chevron svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.tag-chevron.open {
  transform: rotate(90deg);
  color: #3f5885;
}

.ops {
  display: none;
  padding: 8px 0 6px;
  margin-left: 4px;
  margin-bottom: 6px;
  grid-template-columns: 1fr;
  gap: 6px;
}

.ops.open {
  display: grid;
}

.op-link {
  text-decoration: none;
  font-size: 12.5px;
  color: #2c3444;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  padding: 8px 10px 8px 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  line-height: 1.35;
}

.op-link:hover {
  background: #f4f8ff;
  border-color: #d8e4f8;
}

.op-link.active {
  background: #e9f1ff;
  border-color: #bfd5f7;
}

.op-title {
  overflow-wrap: anywhere;
  font-weight: 500;
  line-height: 1.35;
}

.op-link .verb {
  width: 58px;
  min-width: 58px;
  justify-self: start;
}

.verb {
  min-width: 30px;
  text-align: center;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0 7px;
  color: white;
  height: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.verb.get { background: #219b58; }
.verb.post { background: #0c68c8; }
.verb.patch { background: #a457d6; }
.verb.put { background: #c88014; }
.verb.delete { background: #d3424f; }

.content {
  padding: 22px 26px 90px;
}

.path-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f1d33;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 14px;
}

.path-value {
  opacity: 0.95;
  overflow-wrap: anywhere;
}

.title {
  font-size: 28px;
  margin: 8px 0;
}

.subtext {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.intro-landing {
  max-width: 900px;
}

.intro-title {
  margin: 8px 0 18px;
  font-size: 42px;
  line-height: 1.08;
}

.intro-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 15px;
  margin-bottom: 12px;
}

.intro-download {
  text-decoration: none;
  border: 1px solid #7ba8ef;
  color: #2e6dd2;
  background: #f4f8ff;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}

.intro-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: #40516f;
  margin-bottom: 26px;
}

.intro-links a {
  color: #2f6bdd;
  text-decoration: none;
}

.intro-landing p {
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 1.6;
  color: #2d384d;
  max-width: 54ch;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 18px 0 14px;
}

.doc-card {
  border: 1px solid #d9e4f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 14px 15px;
  box-shadow: 0 10px 24px rgba(16, 41, 79, 0.04);
}

.doc-card p {
  margin: 0;
  color: #33415c;
  font-size: 13px;
  line-height: 1.55;
}

.doc-card-primary {
  background: linear-gradient(180deg, #eff6ff, #f8fbff);
  border-color: #cddcf5;
}

.doc-kicker {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5572a3;
}

.auth-row {
  margin: 16px 0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.auth-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #43506a;
}

.auth-key {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid #d2dded;
  background: #fbfdff;
  border-radius: 8px;
  padding: 4px 8px;
}

.section {
  margin-top: 22px;
}

.section h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.section-lead {
  margin: 0 0 12px;
  color: #63718b;
  font-size: 13px;
  line-height: 1.5;
}

.tbl {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.tbl-row {
  display: grid;
  grid-template-columns: 220px 130px 1fr;
  border-bottom: 1px solid #e8eef8;
}

.tbl-row:last-child { border-bottom: 0; }

.tbl-cell {
  padding: 10px 12px;
  font-size: 13px;
}

.tbl-cell.key {
  font-family: var(--mono);
  background: #fbfdff;
}

.req {
  color: var(--danger);
  font-size: 10px;
  text-transform: uppercase;
  margin-left: 6px;
  font-weight: 700;
}

.samples {
  border-left: 1px solid var(--line);
  background: #111a2b;
  color: #dbe5ff;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
  padding: 16px;
}

.samples h3 {
  margin-top: 0;
  color: #f2f6ff;
}

.auth-box {
  background: #162640;
  border: 1px solid #2b3c5f;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.auth-box label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ea4cc;
  display: block;
  margin-bottom: 6px;
}

.auth-box input {
  width: 100%;
  border: 1px solid #2b3d62;
  background: #0e1728;
  color: #dbe7ff;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11px;
}

.auth-box input::placeholder {
  color: #5b6c8f;
}

.op-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.try-it {
  border: 0;
  background: linear-gradient(120deg, #1d9a62, #27c37b);
  color: #fff;
  border-radius: 12px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all .2s ease;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.try-it:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 154, 98, 0.3);
}

.try-it:active {
  transform: translateY(0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal {
  background: #111a2b;
  border: 1px solid #2b3c5f;
  border-radius: 16px;
  padding: 24px;
  max-width: 600px;
  width: 90vw;
  max-height: 80vh;
  overflow: auto;
  color: #dbe5ff;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2b3d62;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: 0;
  color: #8ea4cc;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #dbe5ff;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  font-size: 12px;
  color: #8ea4cc;
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group input, .form-group textarea {
  width: 100%;
  border: 1px solid #2b3d62;
  background: #0e1728;
  color: #dbe7ff;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(120deg, #0c68c8, #1460bf);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
}

.btn-primary:hover {
  opacity: 0.9;
}

.response-display {
  background: #0e1728;
  border: 1px solid #2b3d62;
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
  max-height: 200px;
  overflow: auto;
}

.response-status {
  font-size: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2b3d62;
}

.response-status.success {
  color: #3ac47f;
}

.response-status.error {
  color: #e25b66;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 0;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.tab {
  border: 1px solid #2b3c5f;
  color: #d7e4ff;
  background: #162640;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab.active {
  border-color: #6ea7ff;
  background: #1f3b69;
}

.codebox {
  border: 1px solid #2a3f64;
  background:
    linear-gradient(180deg, rgba(33, 51, 81, 0.75), rgba(12, 22, 39, 0.92));
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.codehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #95abd4;
  font-size: 12px;
  font-weight: 600;
}

.copy {
  border: 0;
  background: #223b66;
  color: #eff5ff;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

pre {
  margin: 0;
  color: #d9e7ff;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.code-content {
  border-radius: 10px;
  padding: 4px 2px;
}

.tok-key {
  color: #7ec8ff;
}

.tok-string {
  color: #8ce9a6;
}

.tok-number {
  color: #7cc4ff;
}

.tok-boolean,
.tok-null {
  color: #ff9a73;
}

.tok-keyword {
  color: #7ec8ff;
  font-weight: 600;
}

.tok-comment {
  color: #6e829f;
  font-style: italic;
}

.tok-flag {
  color: #ffd27d;
}

.resp-codes {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.code-pill {
  border-radius: 10px;
  border: 1px solid;
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}

.code-pill.active {
  transform: translateY(-1px);
  font-weight: 700;
}

.code-pill.c2 { border-color: #33b873; color: #6ce0a0; background: rgba(51, 184, 115, 0.12); }
.code-pill.c4 { border-color: #d68a22; color: #f5b351; background: rgba(214, 138, 34, 0.12); }
.code-pill.c5 { border-color: #cf4e59; color: #ff8b95; background: rgba(207, 78, 89, 0.12); }
.code-pill.c0 { border-color: #6d80a7; color: #aab7d0; background: rgba(109, 128, 167, 0.12); }

.code-pill.c2.active { background: #1c6e49; border-color: #56d592; color: #f2fff8; }
.code-pill.c4.active { background: #7b5318; border-color: #f2aa4d; color: #fff3df; }
.code-pill.c5.active { background: #7d3039; border-color: #ff929c; color: #fff0f2; }
.code-pill.c0.active { background: #354666; border-color: #aab7d0; color: #f3f6fc; }

.samples-subtitle {
  margin-top: 18px;
}

.response-list {
  border: 1px solid #d6e3f6;
  border-radius: 12px;
  overflow: hidden;
}

.response-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  border-bottom: 1px solid #e5edf9;
  font-size: 13px;
}

.response-row:last-child { border-bottom: 0; }

.response-row .status {
  font-family: var(--mono);
  padding: 9px 10px;
}

.response-row .desc {
  padding: 9px 10px;
}

.skeleton {
  border: 1px dashed #bfd0eb;
  background: #f8fbff;
  border-radius: 10px;
  padding: 14px;
  color: #5372a7;
  font-size: 13px;
}

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

  .content {
    padding: 20px 18px 72px;
  }

  .samples {
    padding: 12px;
  }

  .intro-title {
    font-size: 34px;
  }

  .intro-landing p {
    font-size: 18px;
  }

}

@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .samples {
    display: none;
  }

  .content {
    padding: 16px;
  }

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