body {
  margin: 0;
  color: #142437;
  font-family: system-ui, sans-serif;
}

.portal-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 2rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: #fff;
  color: #231837;
  border-bottom: 1px solid #e9e1f4;
}

.brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.brand strong {
  font-size: 1.25rem;
}

.portal-header a {
  color: #5813dc;
  text-underline-offset: 0.2em;
}

.sandbox-note {
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid #e4d7ff;
  background: #f5efff;
}

.sandbox-note p {
  margin: 0.25rem 0 0;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand img {
  display: block;
}

.portal-actions,
.language-picker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-picker {
  gap: 0.25rem;
}

.language-picker button {
  padding: 0.3rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  color: #412a65;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.language-picker button[aria-pressed="true"] {
  border-color: #e4d7ff;
  background: #f5efff;
  color: #5813dc;
}

[hidden] { display: none !important; }
.portal-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.portal-nav a { text-decoration: none; }
.portal-nav a[data-active] { font-weight: 700; text-decoration: underline; }
:focus-visible { outline: 2px solid #6415ff; outline-offset: 3px; }

.quickstart { max-width: 68rem; margin: auto; padding: clamp(1rem, 5vw, 4rem); }
.intro { margin-bottom: 2.5rem; }
.intro h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: -0.04em; }
.intro p { max-width: 38rem; line-height: 1.6; color: #4c4560; }
.workbench { border: 1px solid #e4d7ff; border-radius: 1rem; padding: clamp(1rem, 3vw, 2rem); }
.workbench h2 { margin-top: 0; }
.scenario-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.scenario-controls label { display: grid; gap: 0.35rem; }
.scenario-controls select, .secondary, .primary {
  padding: 0.55rem 0.85rem;
  border: 1px solid #cab9e7;
  border-radius: 0.45rem;
  font: inherit;
  color: #3d226a;
  background: white;
}
.primary { display: inline-block; color: #fff; background: #5813dc; border-color: #5813dc; text-decoration: none; }
button.primary, button.secondary { cursor: pointer; }
button:disabled { opacity: 0.6; cursor: wait; }
.exchange { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.exchange pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; border-radius: 0.5rem; background: #211737; color: #f3ebff; }
.exchange output { color: #5813dc; font-family: monospace; }
@media (max-width: 44rem) { .exchange { grid-template-columns: 1fr; } }

#request-body,
.integration pre {
  box-sizing: border-box;
  width: 100%;
  padding: 1rem;
  border: 1px solid #cab9e7;
  border-radius: 0.5rem;
  background: #211737;
  color: #f3ebff;
  font: 0.875rem/1.5 ui-monospace, monospace;
}
#request-body { resize: vertical; }
#response-explanation { color: #4c4560; line-height: 1.5; }
#response-explanation:empty { display: none; }
#map-frame { display: block; width: 100%; height: 18rem; border: 1px solid #e4d7ff; border-radius: 0.5rem; }
.integration { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e4d7ff; }
.integration summary { cursor: pointer; font-weight: 700; }
.integration pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.integration select { margin-left: 0.5rem; }
