
:root {
  color-scheme: light;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.47 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --border: oklch(0.922 0 0);
  --ring: oklch(0.56 0 0);
  --sidebar: oklch(0.985 0 0);
  --code: oklch(0.965 0 0);
  --success: oklch(0.52 0.14 150);
  --warning: oklch(0.58 0.14 65);
  --danger: oklch(0.56 0.2 25);
  --info: oklch(0.52 0.14 250);
  --border-strong: oklch(0.85 0 0);
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 0.25rem);
  --radius-md: calc(var(--radius) - 0.125rem);
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 5%);
  --font-sans:
    ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:
    ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo,
    Consolas, monospace;
  --text-2xs: 0.625rem;
  --text-xs: 0.6875rem;
  --text-sm: 0.75rem;
  --text-md: 0.8125rem;
  --text-base: 0.875rem;
  --text-lg: 1rem;
  --text-xl: 1.25rem;
  font-family: var(--font-sans);
  font-kerning: normal;
  font-optical-sizing: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  color: var(--foreground);
  background: var(--background);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--background);
}

::selection {
  color: var(--accent-foreground);
  background: color-mix(in oklch, var(--ring) 24%, transparent);
}

button,
input {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  color: var(--background);
  background: var(--foreground);
  border-radius: var(--radius);
  transform: translateY(-150%);
}

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

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 17rem;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--background);
  background: var(--foreground);
  border-radius: var(--radius-md);
  font: 700 var(--text-xs) / 1 var(--font-mono);
  letter-spacing: -0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

.brand small {
  margin-top: 0.15rem;
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  line-height: 1.35;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem;
  padding: 0.45rem 0.6rem;
  color: var(--muted-foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.search:focus-within {
  color: var(--foreground);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 16%, transparent);
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--foreground);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: var(--text-md);
  line-height: 1.4;
}

.search input::placeholder {
  color: var(--muted-foreground);
}

kbd {
  padding: 0.1rem 0.35rem;
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  font-size: var(--text-xs);
}

.route-nav {
  flex: 1;
  padding: 0.125rem 0.5rem 0.75rem;
  overflow: auto;
  overscroll-behavior: contain;
}

.nav-source {
  margin: 0.4rem 0 0.75rem;
}

.nav-source + .nav-source {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.nav-source > strong,
.nav-tag {
  display: block;
  padding-inline: 0.55rem;
}

.nav-source > strong {
  margin-bottom: 0.35rem;
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.012em;
}

.nav-tag {
  margin: 0.65rem 0 0.375rem;
  color: var(--muted-foreground);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.nav-link {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.5rem;
  min-height: 1.625rem;
  padding: 0.1875rem 0.45rem 0.1875rem 0.55rem;
  color: var(--muted-foreground);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.25;
  transition:
    color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease;
}

.nav-link:hover,
.nav-link[aria-current="true"] {
  color: var(--accent-foreground);
  background: var(--accent);
}

.nav-link[aria-current="true"] {
  box-shadow: none;
}

.nav-method {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  width: 2.5rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  background: transparent;
  border: 0;
  font: 600 var(--text-2xs) / 1 var(--font-mono);
  letter-spacing: 0.025em;
  text-align: right;
}

.nav-method.get {
  color: color-mix(
    in oklch,
    var(--success) 38%,
    var(--muted-foreground)
  );
}

.nav-method.post {
  color: color-mix(in oklch, var(--info) 38%, var(--muted-foreground));
}

.nav-method.patch,
.nav-method.put {
  color: color-mix(
    in oklch,
    var(--warning) 38%,
    var(--muted-foreground)
  );
}

.nav-method.delete {
  color: color-mix(in oklch, var(--danger) 38%, var(--muted-foreground));
}

.nav-title {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--success);
  border-radius: 999px;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--success) 14%, transparent);
}

.page {
  min-height: 100vh;
  margin-left: 17rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.6rem clamp(1.25rem, 3vw, 3rem);
  background: color-mix(in oklch, var(--background) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted-foreground);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar code {
  display: block;
  overflow: hidden;
  font-size: var(--text-sm);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-links {
  display: flex;
  gap: 0.4rem;
}

.quiet-button,
.copy-button,
.source-link,
.retry-button {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 120ms ease,
    background 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.quiet-button:hover,
.copy-button:hover,
.source-link:hover,
.retry-button:hover {
  background: var(--accent);
  border-color: var(--border-strong);
}

.quiet-button:active,
.copy-button:active,
.source-link:active,
.retry-button:active {
  transform: translateY(1px);
}

main {
  width: min(100%, 88rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3rem) clamp(1.25rem, 3.5vw, 4rem) 6rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted-foreground);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 15ch;
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lede {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--muted-foreground);
  font-size: var(--text-base);
  line-height: 1.55;
  text-wrap: pretty;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 1.25rem;
  margin: 0;
}

.summary div {
  min-width: 0;
}

.summary dt {
  margin-bottom: 0.2rem;
  color: var(--muted-foreground);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: var(--text-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.source-section {
  padding-top: 2.25rem;
}

.source-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.15rem;
}

.source-heading h2 {
  margin-bottom: 0.3rem;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.source-heading p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: var(--text-md);
  line-height: 1.45;
}

.tag-section + .tag-section {
  margin-top: 2rem;
}

.tag-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.tag-heading h3 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tag-heading span {
  display: grid;
  min-width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: 999px;
  font-size: var(--text-2xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.endpoint-list {
  position: relative;
  display: grid;
  gap: 0.625rem;
}

.endpoint-list::before {
  display: none;
}

.endpoint {
  position: relative;
  scroll-margin-top: 5.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.endpoint::before {
  display: none;
}

.endpoint:target {
  border-color: var(--border-strong);
  box-shadow:
    0 0 0 1px var(--border-strong),
    var(--shadow-xs);
}

.endpoint-head {
  padding: 0.85rem 1rem 0.75rem;
}

.route-line,
.endpoint-title-line,
.endpoint-actions,
.badges {
  display: flex;
  align-items: center;
}

.route-line {
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.method {
  display: inline-flex;
  min-width: 3.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: 700 var(--text-2xs) / 1 var(--font-mono);
  letter-spacing: 0.06em;
}

.method.get {
  color: var(--success);
  background: color-mix(in oklch, var(--success) 9%, var(--card));
}

.method.post {
  color: var(--info);
  background: color-mix(in oklch, var(--info) 9%, var(--card));
}

.method.patch,
.method.put {
  color: var(--warning);
  background: color-mix(in oklch, var(--warning) 9%, var(--card));
}

.method.delete {
  color: var(--danger);
  background: color-mix(in oklch, var(--danger) 9%, var(--card));
}

.route-path {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.012em;
}

.endpoint-title-line {
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.endpoint h4 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  text-wrap: pretty;
}

.endpoint-actions {
  flex: none;
  align-self: center;
  gap: 0.4rem;
}

.endpoint-description {
  max-width: 48rem;
  margin: 0.4rem 0 0;
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  line-height: 1.5;
  text-wrap: pretty;
}

.badges {
  gap: 0.4rem;
  margin-left: auto;
}

.badge {
  display: inline-flex;
  min-height: 1.4rem;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.operation-body {
  border-top: 1px solid var(--border);
}

.panel {
  padding: 0.7rem 1rem;
}

.panel + .panel {
  border-top: 1px solid var(--border);
}

.panel > summary {
  display: flex;
  min-height: 1.35rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  transition: color 120ms ease;
}

.panel > summary::-webkit-details-marker {
  display: none;
}

.panel > summary:hover {
  color: var(--accent-foreground);
}

.panel > summary::after {
  content: "+";
  color: var(--muted-foreground);
  font: 500 var(--text-lg) / 1 var(--font-mono);
}

.panel[open] > summary::after {
  content: "−";
}

.panel-content {
  padding-top: 0.7rem;
}

.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.panel-count {
  min-width: 1.25rem;
  padding: 0.1rem 0.35rem;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: 999px;
  font-size: var(--text-2xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.parameter-table,
.schema {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.parameter-row,
.schema-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(8rem, 1.8fr);
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.parameter-row + .parameter-row,
.schema-row + .schema-row {
  border-top: 1px solid var(--border);
}

.field-name {
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-weight: 600;
}

.field-meta {
  color: var(--muted-foreground);
  line-height: 1.5;
}

.required {
  margin-left: 0.35rem;
  color: var(--danger);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.content-type {
  margin: 0 0 0.6rem;
  color: var(--muted-foreground);
  font: var(--text-xs) / 1.5 var(--font-mono);
}

.response-list {
  display: grid;
  gap: 0.4rem;
}

.response {
  padding: 0.6rem 0.75rem;
  background: var(--muted);
  border-radius: var(--radius-md);
}

.response-head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: var(--text-sm);
}

.status-code {
  min-width: 2.15rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status-2xx {
  color: var(--success);
}

.status-4xx,
.status-5xx {
  color: var(--danger);
}

.response-description {
  color: var(--muted-foreground);
}

.response details {
  margin-top: 0.45rem;
}

.response summary {
  color: var(--muted-foreground);
  font-size: var(--text-xs);
  line-height: 1.45;
  cursor: pointer;
}

pre {
  margin: 0.55rem 0 0;
  padding: 0.75rem;
  overflow: auto;
  color: var(--card-foreground);
  background: var(--code);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.55;
  tab-size: 2;
}

.loading-state,
.error-state,
.empty-state {
  display: flex;
  min-height: 16rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  text-align: left;
}

.loading-state {
  color: var(--muted-foreground);
}

.loading-state strong {
  color: var(--foreground);
}

.loading-state p,
.error-state p,
.empty-state p {
  margin: 0.35rem 0 0;
  color: var(--muted-foreground);
  font-size: var(--text-md);
}

.spinner {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--border);
  border-top-color: var(--foreground);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.error-state,
.empty-state {
  flex-direction: column;
  text-align: center;
}

.error-state h2,
.empty-state h2 {
  margin: 0;
  font-size: var(--text-lg);
}

.mobile-menu {
  display: none;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  padding: 0.65rem 0.85rem;
  color: var(--background);
  background: var(--foreground);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgb(0 0 0 / 18%);
  font-size: var(--text-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: min(20rem, calc(100% - 3rem));
    box-shadow: 12px 0 40px rgb(0 0 0 / 18%);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

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

  .page {
    margin-left: 0;
  }

  .mobile-menu {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    color: var(--background);
    background: var(--foreground);
    border: 0;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgb(0 0 0 / 18%);
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .summary {
    justify-content: start;
  }
}

@media (max-width: 600px) {
  .topbar {
    min-height: 3.75rem;
    padding-inline: 1rem;
  }

  .topbar-links {
    display: none;
  }

  main {
    padding: 1.75rem 1rem 7rem;
  }

  h1 {
    font-size: 2.15rem;
  }

  .summary {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .source-section {
    padding-top: 2rem;
  }

  .source-heading {
    flex-direction: column;
    align-items: start;
  }

  .endpoint-list {
    gap: 0.5rem;
    padding-left: 0;
  }

  .endpoint-list::before,
  .endpoint::before {
    display: none;
  }

  .endpoint-title-line {
    align-items: start;
  }

  .badges {
    width: 100%;
    margin-left: 0;
  }

  .endpoint-actions .copy-button {
    display: none;
  }

  .parameter-row,
  .schema-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.178 0 0);
    --card-foreground: oklch(0.985 0 0);
    --muted: oklch(0.225 0 0);
    --muted-foreground: oklch(0.71 0 0);
    --accent: oklch(0.245 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --border: oklch(1 0 0 / 12%);
    --ring: oklch(0.71 0 0);
    --sidebar: oklch(0.16 0 0);
    --code: oklch(0.12 0 0);
    --success: oklch(0.72 0.16 150);
    --warning: oklch(0.78 0.16 75);
    --danger: oklch(0.72 0.19 25);
    --info: oklch(0.72 0.14 250);
    --border-strong: oklch(1 0 0 / 22%);
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 22%);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
