:root {
  --ink: #112235;
  --muted: #657281;
  --cream: #fff7ec;
  --paper: #fffdfa;
  --line: #eaded0;
  --navy: #16324a;
  --teal: #178d83;
  --sky: #5a9fd6;
  --sun: #f2bb5f;
  --coral: #f47a5a;
  --shadow: 0 24px 60px -38px rgba(17, 34, 53, 0.45);
  --radius: 26px;
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--sun) 32%, transparent), transparent 26rem),
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--sky) 26%, transparent), transparent 22rem),
    linear-gradient(135deg, #fffaf4 0%, #eef7f7 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

.hero,
main,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.hero {
  padding: 28px 0 24px;
}

.topbar,
.hero-grid,
.controls,
.category,
.endpoint {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 999px;
}

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

.mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fffeea;
  font-weight: 900;
  letter-spacing: -0.05em;
}

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

.brand strong {
  font-family: "Baloo 2", ui-rounded, system-ui, sans-serif;
  font-size: 1.1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.repo,
.chip,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.repo {
  padding: 10px 16px;
  background: var(--navy);
  color: #fffeea;
  font-size: 0.82rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  margin-top: 22px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius);
  overflow: hidden;
}

.eyebrow,
.summary-k,
.category-k {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-family: "Baloo 2", ui-rounded, system-ui, sans-serif;
  font-size: clamp(2.3rem, 6vw, 5.1rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.7;
}

.summary-card {
  align-self: end;
  min-height: 210px;
  padding: 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 14%, color-mix(in srgb, var(--coral) 36%, transparent), transparent 7rem),
    linear-gradient(145deg, var(--navy), #0f5d68);
  color: #fffeea;
}

.summary-card strong {
  display: block;
  font-family: "Baloo 2", ui-rounded, system-ui, sans-serif;
  font-size: 4.6rem;
  line-height: 0.9;
}

.summary-card span:last-child {
  color: color-mix(in srgb, #fffeea 74%, transparent);
  font-weight: 700;
}

.controls {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 24px;
}

.search span {
  display: block;
  margin: 0 0 8px;
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--ink);
  background: white;
  font: inherit;
  outline: none;
}

.search input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 14%, transparent);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  border: 1px solid var(--line);
  padding: 8px 12px;
  color: var(--muted);
  background: white;
  white-space: nowrap;
  cursor: pointer;
}

.chip.is-on {
  border-color: var(--navy);
  background: var(--navy);
  color: #fffeea;
}

.catalog {
  display: grid;
  gap: 22px;
  padding: 22px 0 42px;
}

.category {
  border-radius: var(--radius);
  overflow: hidden;
}

.category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.category h2 {
  margin: 0;
  font-family: "Baloo 2", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.category p {
  max-width: 790px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.count {
  align-self: start;
  padding: 8px 13px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sky) 18%, white);
  color: var(--navy);
  font-weight: 900;
}

.endpoint-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: 14px;
  padding: 16px;
}

.endpoint {
  box-shadow: none;
  border-radius: 20px;
  padding: 18px;
}

.endpoint-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.endpoint h3 {
  margin: 0;
  font-family: "Baloo 2", ui-rounded, system-ui, sans-serif;
  font-size: 1.34rem;
  line-height: 1.05;
}

.method {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 10px;
  background: var(--navy);
  color: #fffeea;
  font-size: 0.72rem;
  font-weight: 900;
}

.route {
  display: block;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #102437;
  color: #fffeea;
  overflow-x: auto;
  white-space: nowrap;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.84rem;
}

.desc {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.56;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill {
  padding: 6px 9px;
  background: color-mix(in srgb, var(--sun) 24%, white);
  color: var(--ink);
  font-size: 0.72rem;
}

details {
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

details + details {
  margin-top: 10px;
}

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

.fields {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.field {
  display: grid;
  grid-template-columns: 140px minmax(110px, 160px) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--cream) 70%, white);
}

.field strong,
.field code {
  overflow-wrap: anywhere;
}

.field code {
  color: var(--teal);
  font-size: 0.78rem;
}

.field span {
  color: var(--muted);
  line-height: 1.45;
}

.backend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.backend code {
  padding: 5px 8px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.74rem;
}

.empty {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.footer {
  padding: 0 0 36px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .hero-grid,
  .category-head {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 150px;
  }

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