.runtime-banner {
  display: flex;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  font-size: 0.82rem;
}

.runtime-banner > div {
  display: grid;
  gap: 0.25rem;
}

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

.runtime-banner form {
  flex: 0 0 auto;
  margin: 0;
}

.runtime-banner button {
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.runtime-banner button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.runtime-banner--error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 45%);
  background: color-mix(in srgb, var(--danger), transparent 92%);
}

/* The header is the only explicitly separated region. Everything below it
   participates in one uninterrupted spatial surface. */
main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-inline: 0;
  overflow-x: clip;
}

.shell-intro,
.section-heading,
.runtime-banner,
.error-banner,
.node-details,
.accessible-graph,
footer {
  width: min(calc(100% - 1.25rem), var(--max-width));
  max-width: calc(100% - 1.25rem);
  margin-inline: auto;
}

.graph-section {
  width: 100%;
  max-width: 100%;
  padding-top: 2.5rem;
  border-top: 0;
  overflow-x: clip;
}

.graph-layout {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 1.25rem;
}

.graph-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 34rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.renderer-surface {
  width: 100%;
  max-width: 100%;
  height: min(calc(var(--space-block) * 0.78), 58rem);
  min-height: 34rem;
  overflow: clip;
  background:
    radial-gradient(circle at 50% 45%, var(--accent-soft), transparent 38%),
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
}

.renderer-surface > canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.node-details {
  min-height: 0;
  margin-top: clamp(2rem, 5vw, 4rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.node-details__header,
.node-metadata,
.document-tabs {
  border-color: color-mix(in srgb, var(--border), transparent 45%);
}

.runtime-banner,
.error-banner,
.accessible-graph {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.runtime-banner,
.error-banner {
  padding-inline: 0;
}

.accessible-graph ol {
  border-top-color: color-mix(in srgb, var(--border), transparent 55%);
}

.runtime-footer {
  align-items: center;
  flex-wrap: wrap;
}

footer {
  border-top: 0;
}

@media (min-width: 980px) {
  .graph-layout {
    display: block;
  }

  .node-details {
    max-height: none;
  }
}

@media (max-width: 40rem) {
  .runtime-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .runtime-banner form,
  .runtime-banner button {
    width: 100%;
  }

  .renderer-surface {
    height: calc(var(--space-block) * 0.72);
  }

  .runtime-footer__time {
    width: 100%;
    margin-inline-start: 0;
    justify-content: center;
  }
}
