:root {
  color-scheme: light dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #171717;
  background: #f7f7f5;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  color: #ffffff;
  background: #1f2937;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.site-header,
.example-header,
.example-layout,
.example-index {
  width: min(100% - 32px, 960px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  border-bottom: 1px solid #d4d4d4;
}

.site-header img {
  display: block;
  width: min(360px, 62vw);
  height: auto;
}

.site-header p {
  margin: 0;
  color: #525252;
  font-size: 0.9rem;
  font-weight: 650;
}

.example-index {
  padding-block: 40px 72px;
}

.example-index nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.example-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px 20px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  background: #ffffff;
  text-decoration: none;
}

.example-index a:hover,
.example-index a:focus-visible {
  border-color: #2563eb;
  outline: none;
}

.example-index strong {
  font-size: 1rem;
}

.example-index span {
  color: #525252;
  font-size: 0.82rem;
}

.example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border-bottom: 1px solid #d4d4d4;
}

.example-header a {
  color: #404040;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #a3a3a3;
  border-radius: 999px;
  color: #404040;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.status::before {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #ca8a04;
  content: "";
}

.status[data-state="connected"]::before {
  background: #16a34a;
}

.status[data-state="error"] {
  border-color: #dc2626;
  color: #991b1b;
}

.status[data-state="error"]::before {
  background: #dc2626;
}

.status[data-state="ready"]::before {
  background: #2563eb;
}

.example-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 40px;
  padding-block: 44px 72px;
}

.example-layout h1 {
  margin: 0 0 28px;
  font-size: 2.5rem;
  letter-spacing: 0;
}

.results {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.results th {
  padding: 0 0 10px;
  border-bottom: 1px solid #d4d4d4;
  color: #525252;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
}

.results th:last-child,
.result-row td:last-child {
  width: 64px;
  text-align: right;
}

.result-row td {
  height: 56px;
  padding: 0;
  border-bottom: 1px solid #d4d4d4;
  vertical-align: middle;
}

.result-row td:first-child {
  padding-right: 16px;
}

.result-row code {
  color: #404040;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
}

.result-row output {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  font-weight: 750;
}

.example-action {
  margin-top: 24px;
}

.endpoint {
  min-height: 220px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  background: #ffffff;
}

iframe.endpoint {
  width: 100%;
}

.endpoint-body {
  display: grid;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  color: #525252;
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 650;
}

@media (prefers-color-scheme: dark) {
  :root {
    color: #f5f5f5;
    background: #171717;
  }

  .site-header,
  .example-header,
  .results,
  .result-row {
    border-color: #404040;
  }

  .site-header p,
  .example-index span,
  .example-header a,
  .results th,
  .result-row code {
    color: #a3a3a3;
  }

  .example-index a,
  .status,
  .endpoint,
  .endpoint-body {
    border-color: #404040;
    color: #f5f5f5;
    background: #262626;
  }

  .status[data-state="error"] {
    border-color: #f87171;
    color: #fecaca;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  .example-index nav,
  .example-layout {
    grid-template-columns: 1fr;
  }

  .example-index a {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }

  .example-layout {
    gap: 28px;
  }

  .example-layout h1 {
    font-size: 1.75rem;
  }
}
