.api-preview {
  min-height: 0;
  gap: .625rem;
  padding: clamp(1rem, 2.2vw, 1.375rem);
  border-color: #284b68;
  background: linear-gradient(145deg, #204f72, #102d46);
  color: #f1f7fc;
}
.api-case-link {
  display: grid;
  gap: .75rem;
  color: inherit;
  text-decoration: none;
}
.api-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 1.5rem;
}
.api-wordmark { display: block; width: min(8rem, 46%); min-width: 0; height: auto; }
.api-link-label {
  color: #f1f7fc;
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.api-case-link:is(:hover, :focus-visible) { color: inherit; }
.api-case-link:is(:hover, :focus-visible) .api-link-label {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.api-case-link:is(:hover, :focus-visible) .api-stage {
  border-color: #b6e4ff;
  box-shadow: 0 0 0 2px #a2d9fa70, 0 5px 16px #071f35a0;
}
.api-case-link:focus-visible { outline: 2px solid #9bd9ff; outline-offset: 5px; border-radius: 5px; }
.api-stage {
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #6f97b4;
  border-radius: 7px;
  background: #f4f6f7;
  box-shadow: 0 4px 14px #12385624;
}
.api-screen { position: absolute; inset: 0; overflow: hidden; }
/* Published 1440px-wide screens share a 70px global navigation bar. */
.api-page { display: block; width: 100%; height: auto; margin-top: -4.9%; }
.api-screen--search::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #152e45a6;
}
.api-modal {
  position: absolute;
  z-index: 1;
  width: 74%;
  top: 5%;
  left: 13%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 28px #07182975;
}
.api-steps[hidden] { display: none; }
.api-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border: 1px solid #8cacc2;
  border-radius: 7px;
  background: #e8f2fa;
}
.api-preview button {
  min-height: 44px;
  padding: 0 .25rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #15354e;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
}
.api-preview button:hover { background: #eaf4fc; }
.api-preview button[aria-pressed="true"] { background: #153b56; color: #fff; }
.api-preview button:focus-visible { outline: 2px solid #9bd9ff; outline-offset: 2px; }
.api-preview .api-caption {
  color: #e8f2fa;
  font-size: .8125rem;
  line-height: 1.4;
}
@media (prefers-reduced-motion: no-preference) {
  .api-stage { transition: border-color 160ms ease, box-shadow 160ms ease; }
  .api-screen:not([hidden]) { animation: api-enter 260ms ease-out both; }
  .api-screen--search:not([hidden]) .api-modal { animation: api-open 300ms ease-out both; }
  @keyframes api-enter { from { opacity: .3; } to { opacity: 1; } }
  @keyframes api-open {
    from { opacity: 0; transform: translateY(5px) scale(.98); }
    to { opacity: 1; transform: none; }
  }
}
